/* ============================================================
   HumanPatch — design system (mobile-first, per master prompt §5)
   ============================================================ */
:root {
  --navy: #111827;
  --slate: #1F2937;
  --teal: #0F766E;
  --teal-strong: #0D9488;
  --mint: #D1FAE5;
  --offwhite: #F8FAFC;
  --amber: #F59E0B;
  --red: #DC2626;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #FFFFFF;
  --ink: #111827;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(17,24,39,.08), 0 4px 14px rgba(17,24,39,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--offwhite);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- layout ---------- */
.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- product shell (landing/dashboard) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248,250,252,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--teal), #134E4A); display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 17px; height: 17px; }
.brand span small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .12em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(15,118,110,.28); }
.btn-primary:hover { background: var(--teal-strong); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }

/* ---------- landing ---------- */
.hero { padding: 44px 0 28px; }
.hero h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero p.lead { color: #334155; font-size: 16px; margin-bottom: 22px; max-width: 34ch; }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .note { color: var(--muted); font-size: 12.5px; }
.section { padding: 26px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 6px; }
.section .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.cards { display: grid; gap: 12px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card h3 { font-size: 15.5px; margin-bottom: 4px; }
.card p { font-size: 13.5px; color: #475569; }
.icon-tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; }

.domain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.domain-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.domain-item .di { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.domain-item strong { font-size: 12.5px; display: block; }
.domain-item span { font-size: 11.5px; color: var(--muted); }

.persona-demo { display: grid; gap: 10px; }
@media (min-width: 700px) { .persona-demo { grid-template-columns: 1fr 1fr; } }
.persona-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.persona-card .tag { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--teal); text-transform: uppercase; }
.persona-card h4 { font-size: 14.5px; margin: 2px 0 8px; }
.persona-card ul { list-style: none; font-size: 12.5px; color: #475569; }
.persona-card li { padding-left: 18px; position: view; }
.persona-card li::before { content: "→"; position: absolute; left: 0; color: var(--teal); }

.trust-box { background: var(--mint); border: 1px solid #A7F3D0; border-radius: var(--radius); padding: 16px; }
.trust-box strong { color: #065F46; }
.trust-box p { font-size: 13px; color: #064E3B; margin-top: 6px; }

footer.site { padding: 30px 0 40px; border-top: 1px solid var(--line); margin-top: 30px; }
footer.site .links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
footer.site .fine { font-size: 11.5px; color: var(--muted); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); max-width: 400px; margin: 0 auto; width: 100%; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.field input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.field .err { color: var(--red); font-size: 12px; margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--red); }
.field.invalid .err { display: block; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); min-width: 32px; min-height: 32px; display: grid; place-items: center; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--teal); font-weight: 600; text-decoration: none; }
.demo-note { margin-top: 14px; background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; }

/* ---------- profile wizard ---------- */
.wizard-progress { display: flex; gap: 6px; margin: 18px 0 22px; }
.wizard-progress span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.wizard-progress span.done { background: var(--teal); }
.wizard-progress span.cur { background: var(--teal); opacity: .5; }
.choice-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.choice {
  display: flex; gap: 12px; align-items: center; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface);
  min-height: 64px; transition: border-color .15s;
}
.choice:active { border-color: var(--teal); }
.choice.sel { border-color: var(--teal); background: #F0FDFA; box-shadow: 0 0 0 1px var(--teal); }
.choice .ci { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.choice strong { font-size: 14.5px; display: block; }
.choice span { font-size: 12.5px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip2 {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; background: var(--surface); min-height: 38px;
  transition: all .15s;
}
.chip2.sel { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- world prep (loading) ---------- */
.prep-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; }
.prep-inner { text-align: center; }
.prep-phone-mock { width: 150px; height: 150px; margin: 0 auto 24px; border-radius: 34px; background: var(--navy); position: relative; box-shadow: 0 20px 50px rgba(17,24,39,.35); animation: prepFloat 3s ease-in-out infinite; }
.prep-phone-mock::after { content: ""; position: absolute; inset: 8px; border-radius: 26px; background: linear-gradient(160deg, #1F2937, #0F766E); }
@keyframes prepFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.prep-steps { text-align: left; max-width: 300px; margin: 24px auto 0; display: grid; gap: 12px; }
.prep-step { display: flex; gap: 12px; align-items: center; opacity: .35; transition: opacity .3s; }
.prep-step.on { opacity: 1; }
.prep-step.done { opacity: .75; }
.prep-step .spin { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.prep-step.done .spin { animation: none; border-color: var(--teal); background: var(--teal); }
.prep-step.done .spin::after { content: "✓"; color: #fff; font-size: 13px; display: grid; place-items: center; width: 100%; height: 100%; }
.prep-step p { font-size: 14px; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dashboard ---------- */
.dash-hero { display: flex; align-items: center; gap: 14px; padding: 20px 0 6px; }
.avatar-xl { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--mint); flex-shrink: 0; }
.dash-hero h1 { font-size: 19px; letter-spacing: -.01em; }
.dash-hero .lvl-line { font-size: 12.5px; color: var(--muted); }
.lvl-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--navy); color: #FDE68A; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; letter-spacing: .04em; }
.xp-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-strong)); border-radius: 99px; transition: width .5s ease; }
.dash-cta { display: grid; gap: 10px; padding: 14px 0; }
.play-card { background: var(--navy); color: #fff; border-radius: 18px; padding: 18px; position: relative; overflow: hidden; }
.play-card .kicker { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--amber); }
.play-card h2 { font-size: 17px; margin: 4px 0; }
.play-card p { font-size: 12.5px; color: #94A3B8; margin-bottom: 14px; }
.play-card .btn { background: #fff; color: var(--navy); }
.play-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; background: rgba(15,118,110,.25); }
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.journey .jday { text-align: center; }
.journey .jdot { width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 15px; font-weight: 800; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); }
.journey .jday.done .jdot { background: var(--mint); border-color: #A7F3D0; color: #065F46; }
.journey .jday.cur .jdot { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(15,118,110,.35); }
.journey .jday span { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }

/* ---------- THE SIMULATED PHONE ---------- */
.phone-stage { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 50% 0%, #1E293B 0%, var(--navy) 60%); }
.phone-topbar { display: flex; align-items: center; justify-content: stage; justify-content: space-between; padding: 10px 14px; color: #94A3B8; font-size: 12px; }
.phone-topbar .exit { color: #E2E8F0; border: 1px solid #334155; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 11.5px; min-height: 32px; }
.phone-topbar .demo-flag { background: rgba(245,158,11,.15); color: var(--amber); border: 1px solid rgba(245,158,11,.4); border-radius: 999px; padding: 4px 10px; font-size: 10.5px; font-weight: 700; }
.phone-frame {
  width: min(100%, 390px); margin: 0 auto; flex: 1;
  display: flex; flex-direction: column;
  background: var(--offwhite); border-radius: 30px;
  overflow: hidden; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
@media (min-width: 700px) { .phone-frame { margin: 10px auto 24px; max-height: 780px; } }
.statusbar { display: flex; justify-content: space-between; padding: 8px 18px 6px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--offwhite); }
.statusbar .sicons { display: flex; gap: 5px; align-items: center; }
.statusbar .sbatt { font-size: 11px; }

/* lock screen */
.lock { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 20px 36px; background: linear-gradient(165deg, #0F172A 0%, #1E3A34 100%); color: #E2E8F0; position: relative; }
.lock .clock { font-size: 56px; font-weight: 200; letter-spacing: -.02em; line-height: 1; margin-bottom: 4px; }
.lock .date { font-size: 13px; color: #94A3B8; margin-bottom: 26px; }
.lock .notifs { display: grid; gap: 8px; margin-bottom: 22px; }
.lock .ln { background: rgba(255,255,255,.1); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; }
.lock .ln .li { width: 32px; height: screen; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.lock .ln strong { font-size: 12.5px; display: block; }
.lock .ln span { font-size: 12px; color: #CBD5E1; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock .hint { text-align: center; font-size: 12.5px; color: #94A3B8; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* home screen */
.homescreen { flex: 1; padding: 12px 14px 18px; display: flex; flex-direction: column; background: var(--offwhite); overflow-y: auto; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.widget .day-label { font-size: 10px; font-weight: 800; color: var(--teal); letter-spacing: .12em; text-transform: uppercase; }
.widget h3 { font-size: 15px; margin: 2px 0; }
.widget p { font-size: 12px; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.app-icon .ai { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; box-shadow: 0 3px 8px rgba(17,24,39,.12); position: relative; }
.app-icon .ai .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--offwhite); }
.app-icon span.label { font-size: 10.5px; color: #334155; font-weight: 500; text-align: center; }
.dock { margin-top: auto; background: rgba(226,232,240,.6); border-radius: 20px; padding: 10px 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* notification panel */
.notif-panel { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); z-index: 30; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 40px; }
.notif-sheet { background: var(--offwhite); border-radius: 22px 22px 0 0; margin: 0 6px; padding: 14px 14px 20px; box-shadow: 0 -10px 40px rgba(0,0,0,.3); max-height: 78%; overflow-y: auto; }
.notif-sheet h4 { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.ncard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; display: flex; gap: 11px; align-items: flex-start; }
.ncard .ni { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.ncard .nb { flex: 1; min-width: 0; }
.ncard .nt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ncard .nt strong { font-size: 12.5px; }
.ncard .nt time { font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
.ncard p { font-size: 12.5px; color: #475569; margin-top: 1px; }
.ncard.read { opacity: .55; }
.ncard .actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ncard .actions button { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 5px 11px; border: 1px solid var(--line); color: #334155; background: #fff; min-height: 30px; }
.ncard .actions button.pri { background: var(--teal); color: #fff; border-color: var(--teal); }
.ncard .actions button.warn { color: var(--red); border-color: #FECACA; }

/* app window (generic) */
.appwin { position: absolute; inset: 0; background: var(--surface); z-index: 20; display: flex; flex-direction: column; }
.appbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.appbar .back { min-width: 34px; min-height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.appbar h5 { font-size: 15px; flex: 1; }
.appbody { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

/* chat app */
.chat-list-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; }
.chat-list-item:active { background: #F1F5F9; }
.chat-list-item .cav { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.chat-list-item .cb { flex: 1; min-width: 0; }
.chat-list-item .ct { display: flex; justify-content: space-between; align-items: baseline; }
.chat-list-item .ct strong { font-size: 14px; }
.chat-list-item .ct time { font-size: 10.5px; color: var(--muted); }
.chat-list-item p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item.unread strong { color: var(--ink); }
.chat-list-item.unread p { color: #334155; font-weight: 600; }
.chat-list-item .dot-un { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

.bubble-row { display: flex; flex-direction: column; max-width: 78%; }
.bubble-row.me { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; position: relative; white-space: pre-wrap; }
.bubble-row.them .bubble { background: #F1F5F9; border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble-row.me .bubble { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.bubble time { display: block; font-size: 9.5px; opacity: .55; margin-top: 3px; }
.typing { display: flex; gap: 4px; padding: 12px 14px; background: #F1F5F9; border-radius: 16px; width: fit-content; }
.typing i { width: 6px; height: 6px; background: #94A3B8; border-radius: 50%; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

.chat-input-row { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-input-row input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px; min-height: 42px; background: #F8FAFC; }
.chat-input-row input:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.chat-input-row button { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; flex-shrink: 0; }

/* sender details sheet */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); z-index: 40; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); z-index: 41; max-height: 82%; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: sheetUp .25s ease; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 2px; }
.sheet .sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.sheet .row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sheet .row:last-of-type { border-bottom: none; }
.sheet .row b { font-weight: 600; }
.sheet .row span { color: var(--muted); text-align: right; }
.sheet .actions { display: grid; gap: 8px; margin-top: 14px; }
.sheet .note { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* fake browser page */
.fakepage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fakepage .fp-bar { display: flex; align-items: center; gap: 8px; background: #F1F5F9; padding: 8px 10px; font-size: 11px; color: var(--muted); }
.fakepage .fp-bar .fp-url { background: #fff; border-radius: 999px; padding: 4px 10px; flex: 1; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fakepage .fp-body { padding: 16px; }
.fakepage h4 { font-size: 15px; margin-bottom: 8px; }
.fakepage p.hint { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.fakepage .fp-fields { display: grid; gap: 8px; }
.fakepage .fp-fields label { font-size: 11.5px; font-weight: 600; color: #334155; }
.fakepage .fp-fields input { width: 100%; min-height: 40px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 10px; }
.fakepage .fp-cta { width: 100%; margin-top: 12px; min-height: 42px; background: var(--teal); color: #fff; border-radius: 10px; font-weight: 700; font-size: 14px; }
.fakepage .fp-note { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 8px; }

/* toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 90; max-width: min(90vw, 360px); text-align: center; animation: sheetUp .25s ease; }

/* debrief */
.debrief-wrap { min-height: 100dvh; background: linear-gradient(180deg, var(--navy) 0%, #1E3A34 100%); color: #E2E8F0; padding: 30px 0 40px; }
.debrief-wrap .kicker { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.debrief-wrap h1 { font-size: 24px; margin: 6px 0 10px; color: #fff; }
.debrief-wrap .xp-note { font-size: 12.5px; color: #94A3B8; margin-bottom: 18px; }
.deb-cards { display: grid; gap: 12px; max-width: 480px; margin: 0 auto; }
.deb-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px; }
.deb-card h3 { font-size: 14px; color: #fff; margin-bottom: 8px; }
.deb-card p { font-size: 13px; color: #CBD5E1; }
.deb-card .coach { font-style: normal; }
.ind-list { list-style: none; display: grid; gap: 10px; }
.ind-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.pill { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pill.ok { background: rgba(209,250,229,.15); color: #6EE7B7; border: 1px solid rgba(110,231,183,.3); }
.pill.no { background: rgba(252,165,165,.12); color: #FCA5A5; border: 1px solid rgba(252,165,165,.3); }
.pill.todo { background: rgba(148,163,184,.15); color: #CBD5E1; border: 1px solid rgba(148,163,184,.3); }
.log-list { list-style: none; display: grid; gap: 8px; }
.log-list li { display: flex; gap: 10px; font-size: 12.5px; color: #CBD5E1; }
.log-list li b { color: var(--amber); font-weight: 800; flex-shrink: 0; }
.deb-actions { display: grid; gap: 10px; margin-top: 18px; }
.deb-actions .btn-primary { background: var(--teal); }

/* day transition */
.day-splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--navy); color: #fff; text-align: center; padding: 30px; }
.day-splash .daynum { font-size: 13px; font-weight: 800; letter-spacing: .2em; color: var(--amber); }
.day-splash h1 { font-size: 30px; margin: 8px 0; letter-spacing: -.02em; }
.day-splash p { color: #94A3B8; font-size: 14px; max-width: 30ch; margin-bottom: 28px; }
.day-splash .obj { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 18px; font-size: 13px; color: #CBD5E1; margin-bottom: 28px; }

/* journal */
.journal-list { display: grid; gap: 12px; }
.j-entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.j-entry time { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.j-entry h4 { font-size: 14px; margin: 2px 0; }
.j-entry p { font-size: 12.5px; color: #475569; }

/* utilities */
.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.center { text-align: center; }
.dim { color: var(--muted); }
.small { font-size: 12.5px; }


/* ---------- language switcher ---------- */
.langs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn { min-height: 30px; min-width: 34px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 8px; }
.lang-btn.sel { background: var(--teal); color: #fff; }
.langs-dark .lang-btn { color: #94A3B8; }
.langs-dark .lang-btn.sel { background: var(--teal); color: #fff; }
.nav-btn { min-height: 38px; padding: 0 14px; font-size: 13px; }

/* ---------- hero kicker ---------- */
.hero-kicker { color: var(--teal); font-weight: 800; font-size: 11px; letter-spacing: .14em; }

/* ---------- chat sys line ---------- */
.sys-line { align-self: center; text-align: center; font-size: 10.5px; color: var(--muted); background: #F1F5F9; border-radius: 999px; padding: 4px 12px; max-width: 90%; margin: 2px auto; }

/* ---------- desktop layout (>=900px): phone-sim stays phone-shaped; product pages go 2-col ---------- */
@media (min-width: 900px) {
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 44px; }
  .section { padding: 40px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .domain-grid { grid-template-columns: repeat(3, 1fr); }
  .persona-demo { grid-template-columns: 1fr 1fr; }
  .dash-hero { align-items: flex-start; }
  .journey { max-width: 520px; }
  .dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .auth-card { max-width: 440px; }
  .choice-grid { max-width: 560px; }
  .wizard-wrap { max-width: 640px; margin: 0 auto; }
}
@media (min-width: 1200px) {
  .domain-grid { grid-template-columns: repeat(6, 1fr); }
}


/* ---------- hero phone preview (real components, desktop) ---------- */
.hero-visual { display: none; }
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
  .hero-visual { display: block; position: relative; }
  .hero-visual::before { content: ""; position: absolute; inset: -12% -8%; background: radial-gradient(60% 60% at 50% 40%, rgba(15,118,110,.18), transparent 70%); z-index: -1; }
  .hv-phone { width: 300px; margin: 0 auto; background: var(--offwhite); border-radius: 34px; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(17,24,39,.35); overflow: hidden; animation: prepFloat 4s ease-in-out infinite; }
  .hv-status { display: flex; justify-content: space-between; padding: 10px 18px 6px; font-size: 11.5px; font-weight: 600; color: var(--ink); }
  .hv-widget { margin: 6px 12px 12px; background: linear-gradient(150deg, #134E4A, #0F172A); color: #fff; border-radius: 16px; padding: 12px 14px; }
  .hv-widget strong { font-size: 13px; display: block; }
  .hv-widget span { font-size: 11px; color: #99F6E4; }
  .hv-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 14px 12px; }
  .hv-app { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 20px; box-shadow: 0 3px 8px rgba(17,24,39,.14); }
  .hv-notif { padding: 0 12px 14px; display: grid; gap: 6px; }
  .hv-n { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
  .hv-ni { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
  .hv-n strong { font-size: 11px; display: block; }
  .hv-n p { font-size: 10.5px; color: var(--muted); margin: 0; }
}


/* ---------- Day-1 objective card ---------- */
.obj-card { background: rgba(255,255,255,.94); border-radius: 16px; padding: 12px 14px; margin: 0 14px 10px; box-shadow: 0 4px 14px rgba(17,24,39,.18); }
.obj-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.obj-head strong { font-size: 12.5px; letter-spacing: .02em; }
.obj-count { font-size: 11px; font-weight: 800; color: var(--teal); background: var(--mint); padding: 2px 8px; border-radius: 999px; }
.obj-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.obj-list li { font-size: 12px; color: #334155; display: flex; gap: 6px; align-items: baseline; }
.obj-list li.done { color: #0F766E; font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(15,118,110,.4); }
.obj-hint { font-size: 11px; color: #64748B; margin: 0; }

/* statusbar is now a button — normalize */
button.statusbar { background: none; border: none; width: 100%; cursor: pointer; }


/* chat day separator */
.chat-day-sep { text-align: center; font-size: 10px; color: var(--muted); background: #F1F5F9; border-radius: 999px; padding: 4px 10px; width: fit-content; margin: 6px auto; }


/* ============================================================
   ULTRAWIDE / CURVED-SCREEN ADAPTIVE (>=1600px)
   - product pages widen & scale up (no dead center void)
   - phone-sim gets ambient side panels so the stage feels full
   ============================================================ */
@media (min-width: 1600px) {
  html { font-size: 17.5px; }
  .wrap-wide { max-width: 1280px; }
  .hero h1 { font-size: 56px; }
  .hero { grid-template-columns: 1.2fr .8fr; gap: 64px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .domain-grid { grid-template-columns: repeat(6, 1fr); }
  .dash-grid-2 { gap: 24px; }
  .auth-card { max-width: 480px; }
  .wizard-wrap { max-width: 720px; }
  .journey { max-width: 620px; }
}

@media (min-width: 2000px) {
  html { font-size: 19px; }
  .wrap-wide { max-width: 1400px; }
  .hero h1 { font-size: 62px; }
}

/* phone-sim stage on ultrawide: center phone, ambient panels left/right */
@media (min-width: 1100px) {
  .phone-stage { align-items: center; }
  .phone-wrap { position: relative; }
  .phone-wrap::before, .phone-wrap::after {
    content: "";
    position: absolute; top: 12%; height: 40%; width: 150px;
    background: radial-gradient(60% 60% at 50% 50%, rgba(45,212,191,.10), transparent 75%);
    pointer-events: none;
  }
  .phone-wrap::before { left: -190px; }
  .phone-wrap::after { right: -190px; }
}

/* ============================================================
   SITE FOOTER (docs pages nav) — from HumanPatch-GUI concept
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; background: var(--navy); }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 28px 20px 34px; }
@media (min-width: 1600px) { .site-footer .inner { max-width: 1280px; } }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #E2E8F0; font-weight: 800; letter-spacing: .02em; margin-bottom: 14px; }
.footer-note { color: #94A3B8; font-size: 12.5px; max-width: 560px; margin: 0 0 16px; line-height: 1.6; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 18px; }
.footer-nav a, .footer-nav button { color: #CBD5E1; font-size: 13px; text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font-weight: 600; }
.footer-nav a:hover, .footer-nav button:hover { color: var(--mint); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #64748B; font-size: 11.5px; border-top: 1px solid rgba(148,163,184,.15); padding-top: 14px; }
.footer-meta .dot-sep::before { content: "·"; margin-right: 18px; color: #475569; }

/* doc page (About/Privacy/Terms/...) */
.doc-page { min-height: 100dvh; background: var(--offwhite); }
.doc-wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 40px; }
.doc-kicker { color: var(--teal); font-weight: 800; letter-spacing: .14em; font-size: 11px; text-transform: uppercase; }
.doc-wrap h1 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 18px; }
.doc-wrap h2 { font-size: 19px; margin: 26px 0 8px; }
.doc-wrap p, .doc-wrap li { color: #334155; line-height: 1.75; font-size: 14.5px; }
.doc-wrap ul { padding-left: 20px; }
.doc-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; color: var(--teal); font-weight: 700; background: none; border: none; font-size: 14px; cursor: pointer; }

/* doc pagination */
.doc-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 18px; }
.doc-pager button { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; text-align: left; max-width: 48%; }
.doc-pager button:hover { border-color: var(--teal); }
.doc-pager .pg-label { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-pager .pg-title { font-size: 13.5px; color: var(--ink); font-weight: 700; }


/* ============================================================
   FULL-PAGE SCROLL-SNAP LANDING + FLUID FULL-BLEED
   ============================================================ */
html { scroll-behavior: smooth; }
.snap-pages { display: block; padding: 0 !important; max-width: none !important; width: 100%; }
.snap-page {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px clamp(20px, 6vw, 96px) 48px;
  scroll-snap-align: start;
  position: relative;
}
body { scroll-snap-type: y proximity; } /* gentle snap, still free-scrolls inside long sections */
.snap-page .section-inner, .snap-page > .cards, .snap-page > .domain-grid, .snap-page > .persona-demo {
  width: min(1180px, 100%);
  margin-left: auto; margin-right: auto;
}
.snap-page h2 { width: min(1180px, 100%); margin-left: auto; margin-right: auto; }
.snap-page .sub { width: min(1180px, 100%); margin-left: auto; margin-right: auto; }

/* hero stays 2-col but full-bleed width */
.hero.snap-page { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 80px); align-items: center; max-width: 1280px; margin: 0 auto; width: 100%; }
@media (max-width: 899px) { .hero.snap-page { grid-template-columns: 1fr; } .hero-visual { display: none !important; } }

/* fixed topbar over snap pages */
.topbar-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--navy) 72%, transparent); border-bottom: 1px solid rgba(148,163,184,.14); }
.snap-page:first-of-type { padding-top: 120px; }

/* three.js canvas layer */
#bg3d { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.snap-pages { position: relative; z-index: 1; }

/* scroll cue */
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; background: none; border: none; color: var(--muted); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.scroll-cue:hover { color: var(--mint); }
.sc-track { width: 22px; height: 34px; border: 2px solid #475569; border-radius: 12px; display: inline-flex; justify-content: center; padding-top: 5px; }
.sc-dot { width: 4px; height: 8px; border-radius: 4px; background: var(--teal); animation: scDot 1.6s ease-in-out infinite; }
@keyframes scDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* disabled old padding rules that fought snap */
.snap-page .section-inner { padding: 0; }

/* ============================================================
   DOC PAGE bottom fix — full-height layout, footer at bottom
   ============================================================ */
.doc-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--offwhite); }
.doc-page .banner { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--navy) 85%, transparent); backdrop-filter: blur(10px); }
.doc-wrap { flex: 1; width: min(860px, 100%); margin: 0 auto; padding: 34px 22px 48px; }
.site-footer { margin-top: auto; }
@media (min-width: 1600px) { .doc-wrap { max-width: 960px; } }
