/* PULSE — social client styles
   Identity: ink + coral "signal" accent, heartbeat-waveform brand mark. */

:root{
  --bg:#EDEFF3;
  --surface:#FFFFFF;
  --surface-2:#F6F8FB;
  --ink:#15171C;
  --muted:#697385;
  --faint:#9AA3B2;
  --accent:#FF3D68;        /* pulse coral */
  --accent-ink:#D4234B;
  --link:#5B6CFF;          /* signal indigo */
  --line:#E2E6EC;
  --line-2:#EAEDF2;
  --good:#15A05B;
  --radius:16px;
  --shadow:0 1px 2px rgba(21,23,28,.04), 0 8px 24px rgba(21,23,28,.05);
  --maxw:1180px;
  font-synthesis:none;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:15px;
  line-height:1.5;
  letter-spacing:-0.006em;
}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
img{display:block;max-width:100%}

/* ---------- shell ---------- */
.shell{
  max-width:var(--maxw);
  margin:0 auto;
  display:grid;
  grid-template-columns:248px minmax(0,1fr) 320px;
  gap:28px;
  padding:0 20px;
  align-items:start;
}

/* ---------- left nav ---------- */
.side{
  position:sticky;top:0;
  height:100vh;
  padding:18px 8px;
  display:flex;flex-direction:column;
}
.brand{display:flex;align-items:center;gap:10px;padding:8px 12px;margin-bottom:8px}
.brand svg{display:block}
.brand .wordmark{font-family:"Space Grotesk",sans-serif;font-weight:600;font-size:24px;letter-spacing:-0.03em}
.brand .dot{color:var(--accent)}
.nav{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.nav a{
  display:flex;align-items:center;gap:14px;
  padding:11px 14px;border-radius:999px;
  color:var(--ink);font-weight:500;font-size:16px;
}
.nav a:hover{background:var(--surface);text-decoration:none}
.nav a.active{font-weight:700}
.nav a .ic{width:22px;height:22px;flex:0 0 22px;color:var(--muted)}
.nav a.active .ic{color:var(--accent)}
.post-btn{
  margin:14px 12px 0;padding:13px;border:0;border-radius:999px;
  background:var(--accent);color:#fff;font-weight:600;font-size:15px;
  font-family:inherit;cursor:pointer;box-shadow:var(--shadow);
}
.post-btn:hover{background:var(--accent-ink)}
.me{margin-top:auto;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:999px}
.me:hover{background:var(--surface)}
.me .meta{min-width:0}
.me .meta b{display:block;font-size:14px;line-height:1.2}
.me .meta span{display:block;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- center column ---------- */
.feed{min-height:100vh;border-inline:1px solid var(--line);background:transparent}
.feed-head{
  position:sticky;top:0;z-index:5;
  backdrop-filter:saturate(1.4) blur(8px);
  background:color-mix(in srgb,var(--bg) 80%, transparent);
  padding:14px 18px;border-bottom:1px solid var(--line);
}
.feed-head h1{margin:0;font-family:"Space Grotesk",sans-serif;font-size:19px;letter-spacing:-0.02em}
.feed-head .sub{color:var(--muted);font-size:13px;margin-top:2px}

/* composer (decorative, non-functional) */
.composer{display:flex;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:var(--surface)}
.composer .field{flex:1;color:var(--faint);font-size:18px;padding-top:6px}
.composer .row{display:flex;justify-content:space-between;align-items:center;margin-top:14px}
.composer .tools{display:flex;gap:8px;color:var(--accent)}
.composer .tools .ic{width:20px;height:20px}
.composer .send{background:var(--accent);color:#fff;border:0;border-radius:999px;padding:8px 18px;font-weight:600;font-family:inherit;font-size:14px;opacity:.55;cursor:default}

/* ---------- posts ---------- */
.post{display:flex;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:var(--surface)}
.post:hover{background:var(--surface-2)}
.post .body{flex:1;min-width:0}
.pinned{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12.5px;font-weight:600;margin:-2px 0 6px 52px}
.pinned .ic{width:15px;height:15px}
.phead{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.phead .name{font-weight:700;color:var(--ink)}
.phead .name:hover{text-decoration:underline}
.phead .verified{color:var(--link);width:16px;height:16px;align-self:center}
.phead .handle,.phead .time{color:var(--muted);font-size:14px}
.phead .sep{color:var(--faint)}
.ptext{margin:3px 0 0;white-space:pre-wrap;word-wrap:break-word}
.ptext a{color:var(--link)}
.tag{color:var(--link)}
.pmedia{margin-top:12px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.pmedia img{width:100%;height:auto;cursor:zoom-in}
.pmedia .cap{padding:8px 12px;font-size:13px;color:var(--muted);background:var(--surface-2);border-top:1px solid var(--line)}
.pcode{margin-top:12px;background:#101218;color:#D6E1F5;border-radius:12px;padding:12px 14px;
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;
  overflow-x:auto;white-space:pre-wrap;word-break:break-all;line-height:1.55}
.pcode .lbl{display:block;color:#5f6b82;font-size:11px;margin-bottom:6px;letter-spacing:.04em;text-transform:uppercase}

.actions{display:flex;justify-content:space-between;max-width:420px;margin-top:12px;color:var(--muted)}
.actions .a{display:flex;align-items:center;gap:7px;font-size:13px;cursor:default}
.actions .a .ic{width:18px;height:18px}
.actions .a.like:hover{color:var(--accent)}
.actions .a.rt:hover{color:var(--good)}
.actions .a.cm:hover{color:var(--link)}

/* comments */
.comments{margin-top:10px;border-top:1px dashed var(--line-2);padding-top:10px;display:flex;flex-direction:column;gap:12px}
.cmt{display:flex;gap:10px}
.cmt .body{flex:1;min-width:0}
.cmt .chead{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;font-size:13.5px}
.cmt .chead .name{font-weight:600}
.cmt .chead .handle,.cmt .chead .time{color:var(--muted);font-size:12.5px}
.cmt .ctext{margin:1px 0 0;font-size:14px;white-space:pre-wrap}

/* avatars */
.av{border-radius:50%;flex:0 0 auto;display:grid;place-items:center;color:#fff;font-weight:700;font-family:"Space Grotesk",sans-serif;overflow:hidden;background:#888}
.av.lg{width:42px;height:42px;font-size:16px}
.av.sm{width:34px;height:34px;font-size:13px}
.av.xl{width:128px;height:128px;font-size:46px;border:4px solid var(--surface)}

/* ---------- right rail ---------- */
.rail{position:sticky;top:0;padding:14px 0;display:flex;flex-direction:column;gap:16px}
.search{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:11px 16px;color:var(--faint)}
.search .ic{width:18px;height:18px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.card h3{margin:0;padding:14px 16px 8px;font-family:"Space Grotesk",sans-serif;font-size:17px}
.trend{padding:10px 16px;border-top:1px solid var(--line-2)}
.trend:hover{background:var(--surface-2)}
.trend .k{font-size:12px;color:var(--muted)}
.trend .t{font-weight:700;font-size:14.5px;margin:1px 0}
.trend .n{font-size:12px;color:var(--muted)}
.who{padding:12px 16px;border-top:1px solid var(--line-2);display:flex;align-items:center;gap:11px}
.who .meta{flex:1;min-width:0}
.who .meta b{display:block;font-size:14px;line-height:1.15}
.who .meta b:hover{text-decoration:underline}
.who .meta span{display:block;color:var(--muted);font-size:13px}
.who .follow{border:1px solid var(--ink);background:var(--ink);color:#fff;border-radius:999px;padding:6px 15px;font-weight:600;font-size:13px;font-family:inherit;cursor:default}
.footnote{padding:4px 16px;color:var(--faint);font-size:12px;line-height:1.7}
.footnote a{color:var(--faint)}

/* ---------- profile ---------- */
.banner{height:200px;background:linear-gradient(135deg,#2a2f3a,#444b5e);position:relative}
.phead-wrap{padding:0 18px;border-bottom:1px solid var(--line);background:var(--surface)}
.phead-row{display:flex;justify-content:space-between;align-items:flex-end;margin-top:-64px}
.phead-row .edit{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:8px 17px;font-weight:600;font-size:14px;cursor:default;align-self:flex-end;margin-bottom:12px}
.pname{margin:12px 0 0}
.pname h2{margin:0;font-family:"Space Grotesk",sans-serif;font-size:21px;letter-spacing:-0.02em;display:flex;align-items:center;gap:6px}
.pname .handle{color:var(--muted);font-size:15px}
.bio{margin:12px 0;font-size:15px;white-space:pre-wrap}
.pmeta{display:flex;flex-wrap:wrap;gap:16px;color:var(--muted);font-size:14px;margin-bottom:12px}
.pmeta .m{display:flex;align-items:center;gap:6px}
.pmeta .ic{width:17px;height:17px}
.pstats{display:flex;gap:20px;font-size:14px;margin-bottom:14px}
.pstats b{color:var(--ink)}
.pstats span{color:var(--muted)}
.tabs{display:flex;border-bottom:1px solid var(--line);background:var(--surface)}
.tabs .tab{flex:1;text-align:center;padding:15px;color:var(--muted);font-weight:600;font-size:14.5px;cursor:default;border-bottom:3px solid transparent}
.tabs .tab.active{color:var(--ink);border-bottom-color:var(--accent)}

/* lightbox */
.lb{position:fixed;inset:0;background:rgba(10,11,15,.92);display:none;place-items:center;z-index:50;padding:24px}
.lb.open{display:grid}
.lb img{max-width:92vw;max-height:88vh;border-radius:10px}
.lb .x{position:absolute;top:18px;right:22px;color:#fff;font-size:30px;cursor:pointer;line-height:1;background:none;border:0}

/* mobile */
.mobile-only{display:none}
@media (max-width:1000px){
  .shell{grid-template-columns:72px minmax(0,1fr);gap:0;padding:0}
  .rail{display:none}
  .brand .wordmark,.nav a span.lbl,.me .meta,.post-btn span{display:none}
  .nav a{justify-content:center;padding:12px}
  .post-btn{width:46px;height:46px;padding:0;display:grid;place-items:center;margin:14px auto 0}
  .feed{border-left:1px solid var(--line);border-right:0}
}
@media (max-width:680px){
  .shell{grid-template-columns:1fr}
  .side{display:none}
  .feed{border:0}
  .mobile-only{display:flex}
  .mobile-bar{position:sticky;top:0;z-index:6;display:flex;align-items:center;justify-content:space-between;
    padding:12px 16px;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
  .mobile-tabbar{position:fixed;bottom:0;left:0;right:0;z-index:20;display:flex;justify-content:space-around;
    padding:9px 0 calc(9px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line)}
  .mobile-tabbar a{color:var(--muted);padding:6px}
  .mobile-tabbar a.active{color:var(--accent)}
  .mobile-tabbar .ic{width:24px;height:24px}
  .feed{padding-bottom:64px}
  .banner{height:140px}
  .av.xl{width:88px;height:88px;font-size:32px}
  .phead-row{margin-top:-46px}
}

@media (prefers-reduced-motion:no-preference){
  .brand .pulse-line{stroke-dasharray:120;animation:trace 3.6s ease-in-out infinite}
  @keyframes trace{0%{stroke-dashoffset:120}40%{stroke-dashoffset:0}70%{stroke-dashoffset:0}100%{stroke-dashoffset:-120}}
}
:focus-visible{outline:2px solid var(--link);outline-offset:2px;border-radius:6px}
