:root {
  --blue: #0002FD; --blue2: #2E6BFF; --ink: #fff; --dim: rgba(255,255,255,.66);
  --glass: rgba(14,16,28,.58); --line: rgba(255,255,255,.14); --r: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #04040a; color: var(--ink); }
body { display: flex; flex-direction: column; min-height: 100vh; -webkit-font-smoothing: antialiased; }
#bg { position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,4,10,.35), rgba(4,4,10,.86) 55%, #04040a), url(/bg.jpg) center/cover no-repeat; }
a { color: var(--blue2); text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 20px 10px; position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); background: rgba(4,4,10,.35); }
.brand img { display: block; height: 30px; width: auto; }
nav { display: flex; gap: 6px; }
nav a { color: var(--dim); font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: 999px; }
nav a.on { color: #fff; background: rgba(255,255,255,.12); }
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 12px 18px 40px; }
.foot { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 26px 20px 34px; color: rgba(255,255,255,.4); font-size: 12px; text-align: center; }

/* Liquid-glass card */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 20px 50px rgba(0,0,0,.35); }
.card { padding: 20px; margin: 12px 0; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { text-align: left; padding: 56px 4px 16px; }
.hero h1 { font-size: clamp(40px, 11vw, 64px); line-height: .95; margin: 0 0 14px; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.hero h1 em { color: var(--blue2); font-style: italic; }
.hero p { color: var(--dim); font-size: 18px; line-height: 1.45; margin: 0 0 26px; max-width: 30em; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.feat div { padding: 16px; font-size: 14px; color: var(--dim); }
.feat b { display: block; color: #fff; font-size: 16px; margin: 6px 0 2px; }
.feat i { font-style: normal; font-size: 22px; }

/* Keys: the app's chamfered blue key */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; border: 0; border-radius: 16px;
  font: 700 17px/1 inherit; color: #fff; cursor: pointer; background: linear-gradient(180deg, #2a39ff, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.25), 0 10px 26px rgba(0,2,253,.45);
  transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(2px) scale(.99); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(0,2,253,.4); }
.btn.ghost { background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn.small { min-height: 42px; font-size: 15px; width: auto; padding: 0 16px; border-radius: 12px; }
.btn.danger { background: rgba(255,59,48,.18); color: #ff6b61; box-shadow: none; }
.btn[disabled] { opacity: .5; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Forms */
h2 { font-size: 28px; font-weight: 800; margin: 4px 0 6px; letter-spacing: -.01em; }
.sub { color: var(--dim); margin: 0 0 18px; line-height: 1.4; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin: 14px 0 6px; }
input, textarea { width: 100%; min-height: 54px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.07);
  color: #fff; font: 17px inherit; outline: none; transition: border-color .15s, background .15s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue2); background: rgba(46,107,255,.12); }
.hint { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 6px; }
.err { color: #ff6b61; font-size: 14px; min-height: 20px; margin: 12px 0 0; }
.switch { text-align: center; margin-top: 16px; color: var(--dim); font-size: 15px; }
.switch a { font-weight: 700; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--dim); line-height: 1.4; margin-top: 16px; }

/* Feed */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; margin: 6px 0 4px; }
.seg button { border: 0; background: transparent; color: var(--dim); font: 600 15px inherit; padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: rgba(255,255,255,.16); color: #fff; }
.post { padding: 16px; margin: 12px 0; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.who b { display: block; }
.who small { color: var(--dim); }
.post h3 { margin: 4px 0 8px; font-size: 19px; }
.map { width: 100%; aspect-ratio: 16/10; border-radius: 16px; background: radial-gradient(circle at 30% 20%, #16204a, #070812 70%); display: block; overflow: hidden; }
.map path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s ease-out .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.photo { width: 100%; border-radius: 16px; display: block; margin-top: 8px; }
.stats { display: flex; gap: 18px; margin: 12px 0 4px; }
.stats div { font-size: 12px; color: var(--dim); }
.stats b { display: block; font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; }
.acts { display: flex; gap: 8px; margin-top: 10px; }
.like { border: 0; background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 10px 14px; font: 600 15px inherit; cursor: pointer; transition: transform .15s; }
.like.on { color: #ff4d6d; }
.like.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.22); } }
.empty { text-align: center; color: var(--dim); padding: 40px 10px; }

/* Messages */
.thread { display: flex; gap: 12px; align-items: center; padding: 14px; margin: 8px 0; cursor: pointer; width: 100%; text-align: left; color: #fff; font: inherit; }
.thread p { margin: 2px 0 0; color: var(--dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread > div:last-child { min-width: 0; flex: 1; }
.chat { display: flex; flex-direction: column; gap: 6px; padding: 14px; min-height: 50vh; max-height: 62vh; overflow-y: auto; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 18px; line-height: 1.35; animation: rise .3s ease both; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--blue); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: rgba(255,255,255,.12); border-bottom-left-radius: 6px; }
.compose { display: flex; gap: 8px; margin-top: 10px; }
.compose input { flex: 1; }

/* Profile */
.prof { text-align: center; padding: 26px 20px; }
.prof .av { width: 88px; height: 88px; font-size: 34px; margin: 0 auto 12px; box-shadow: 0 0 0 4px rgba(46,107,255,.35); }
.prof h2 { margin: 0; }
.prof .handle { color: var(--dim); }
.prof .stats { justify-content: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.grid svg { aspect-ratio: 1; border-radius: 12px; }

#toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0;
  background: rgba(20,22,36,.92); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-weight: 600; transition: .3s; pointer-events: none; z-index: 20; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: sp 0.8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .map path { stroke-dashoffset: 0; } }

/* ===== v2: blue + white, diagonal split, no boxes ===== */
@font-face{font-family:"Inter Tight";font-weight:500;font-display:swap;src:url(/inter-tight-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Inter Tight";font-weight:800;font-display:swap;src:url(/inter-tight-latin-800-normal.woff2) format("woff2")}
:root{--blue:#0002FD;--dim:rgba(255,255,255,.72);--line:rgba(255,255,255,.55);
 font-family:"To Mist","Gerstner-Programm FSL","Gerstner Programm","Inter Tight","Helvetica Neue",Helvetica,Arial,sans-serif;color-scheme:light}
html,body{background:var(--blue);color:#fff}
body{position:relative;overflow-x:hidden}
.panel{position:fixed;inset:0;z-index:-1;background:#fff;clip-path:polygon(0 0,52% 0,36% 100%,0 100%)}
.bigR{position:absolute;left:5vw;top:50%;width:min(36vw,66vh*0.773);aspect-ratio:552/714;transform:translateY(-50%);
 background:linear-gradient(135deg,#00018f 0%,var(--blue) 38%,#2a35ff 100%);
 -webkit-mask:url(/r.png) center/contain no-repeat;mask:url(/r.png) center/contain no-repeat;
 filter:drop-shadow(-3px -3px 2px rgba(0,0,60,.28)) drop-shadow(4px 4px 2px rgba(255,255,255,.95))}
a{color:#fff;text-decoration:underline;text-underline-offset:4px}
.top{background:none;backdrop-filter:none;-webkit-backdrop-filter:none;position:static;padding:max(24px,env(safe-area-inset-top)) 6vw 0 56vw}
.brand img{height:30px}
nav a{color:var(--dim);border-radius:0;background:none;padding:8px 0 8px 22px;text-decoration:none;font-weight:500}
nav a.on,nav a:hover{color:#fff;background:none}
main{max-width:none;margin:0;padding:4vh 6vw 40px 56vw}
.foot{padding:20px 6vw 28px 56vw;align-items:flex-start;color:rgba(255,255,255,.55);font-size:12px}
h1.big{font-size:clamp(56px,9vw,132px);line-height:.88;letter-spacing:-.045em;font-weight:800;margin:0 0 4vh;animation:rise .6s cubic-bezier(.2,.8,.2,1) both}
.glass,.card{background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.card{padding:0}
.authf{max-width:420px;display:flex;flex-direction:column;gap:6px}
input,textarea{background:none;border:0;border-bottom:1.5px solid var(--line);border-radius:0;padding:16px 0;min-height:56px;font-size:19px;color:#fff;font-weight:500}
input::placeholder,textarea::placeholder{color:rgba(255,255,255,.62)}
input:focus,textarea:focus{background:none;border-bottom-color:#fff}
.btn{border-radius:0;background:#fff;color:var(--blue);box-shadow:none;font-weight:800;font-size:18px;min-height:60px;margin-top:18px;
 clip-path:polygon(0 0,100% 0,calc(100% - 18px) 100%,0 100%);justify-content:flex-start;padding-left:22px;letter-spacing:-.01em}
.btn:active{transform:none;opacity:.85}
.btn.ghost,.btn.danger{background:none;color:#fff;border:1.5px solid var(--line);clip-path:none}
.err{color:#fff;font-weight:500;margin:6px 0 0;min-height:1em}
.switch{margin-top:14px;color:var(--dim);font-size:15px}
.hint,.sub{display:none}
.feats{display:flex;gap:34px;margin-top:5vh}
.ft{position:relative;width:64px;height:64px;cursor:default;outline:none}
.ft svg{width:64px;height:64px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;overflow:visible;opacity:.7;transition:opacity .3s}
.ft span{position:absolute;left:0;top:76px;font-size:13px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;opacity:0;transform:translateY(-4px);transition:.3s}
.ft:hover svg,.ft:focus svg{opacity:1}
.ft:hover span,.ft:focus span{opacity:1;transform:none}
.ft .draw{stroke-dasharray:130;stroke-dashoffset:0}
.ft:hover .draw,.ft:focus .draw{animation:dr 1.4s ease both}
@keyframes dr{from{stroke-dashoffset:130}to{stroke-dashoffset:0}}
.ft .dot{fill:#fff;stroke:none}
.ft .bars rect{fill:#fff;stroke:none;transform-box:fill-box;transform-origin:center}
.ft:hover .bars rect,.ft:focus .bars rect{animation:bar .7s ease-in-out infinite alternate}
.ft .bars rect:nth-child(2){animation-delay:.1s}.ft .bars rect:nth-child(3){animation-delay:.2s}.ft .bars rect:nth-child(4){animation-delay:.3s}.ft .bars rect:nth-child(5){animation-delay:.4s}
@keyframes bar{from{transform:scaleY(.35)}to{transform:scaleY(1.15)}}
.ft .veil{fill:var(--blue);stroke:none;opacity:0;transition:opacity .4s,r .4s}
.ft:hover .veil,.ft:focus .veil{opacity:1}
.ft .slash{stroke-dasharray:70;stroke-dashoffset:70;transition:stroke-dashoffset .5s}
.ft:hover .slash,.ft:focus .slash{stroke-dashoffset:0}
/* in-app pages: lines, not boxes */
.post,.thread,.row.item{border-bottom:1px solid rgba(255,255,255,.28);background:none}
.msg{border-radius:0}.msg.me{background:#fff;color:var(--blue)}
.av{background:#fff;color:var(--blue)}
@media(max-width:820px){
 .panel{clip-path:polygon(0 0,100% 0,100% 30vh,0 38vh)}
 .bigR{left:50%;top:15vh;width:min(46vw,26vh*0.773);transform:translate(-50%,-50%)}
 .top{padding:calc(40vh) 7vw 0}
 main{padding:3vh 7vw 40px}.foot{padding:20px 7vw 28px}
 h1.big{font-size:clamp(52px,16vw,90px)}
 .feats{gap:26px}
}
body{background:transparent}

#app .switch:last-child{display:none}.authf .switch:last-child{display:none}
h1.big{font-size:clamp(56px,8vw,120px)}
@media(max-width:820px){.top{padding:40vh 7vw 0}.authf .switch:last-child{display:block}}

/* v2.1 apple polish */
.panel{background:none;clip-path:none;filter:drop-shadow(10px 0 22px rgba(0,0,90,.38)) drop-shadow(2px 0 3px rgba(0,0,60,.25))}
.pane{position:absolute;inset:0;background:linear-gradient(100deg,#fff 40%,#f1f3ff);clip-path:polygon(0 0,52% 0,36% 100%,0 100%)}
h1.big{font-size:clamp(48px,6.6vw,96px);font-weight:700;letter-spacing:-.035em;line-height:.96;margin:0 0 14px;text-shadow:0 2px 18px rgba(0,0,100,.35)}
.claim{font-size:clamp(20px,2.2vw,30px);font-weight:500;letter-spacing:-.02em;color:rgba(255,255,255,.78);margin:0 0 5vh}
.btn{filter:drop-shadow(0 8px 14px rgba(0,0,90,.45))}
.ft svg{filter:drop-shadow(0 3px 6px rgba(0,0,90,.5))}
.bigR{filter:drop-shadow(-2px -2px 1px rgba(0,0,70,.3)) drop-shadow(3px 4px 2px rgba(255,255,255,1)) drop-shadow(0 18px 24px rgba(0,2,200,.18))}
@media(max-width:820px){.pane{clip-path:polygon(0 0,100% 0,100% 30vh,0 38vh)}h1.big{font-size:clamp(46px,14vw,78px)}}

.eyebrow{margin:0 0 22px;font-size:13px;font-weight:500;letter-spacing:.22em;text-transform:uppercase;color:rgba(255,255,255,.7)}
h1.big{font-size:clamp(44px,5.6vw,84px);font-weight:700;letter-spacing:-.04em;line-height:1}
.claim{font-size:clamp(17px,1.5vw,22px);font-weight:500;letter-spacing:-.01em;line-height:1.35;max-width:24em;margin:0 0 5vh}
h1.big{letter-spacing:-.03em;word-spacing:.06em}
