/* ArcYard shared system: one set of tokens and shared components for every page.
   Loaded by /app, /profile and /. Page CSS may compose these, never redefine them. */

:root{
  --bg:#0D0D0F; --bg-1:#141416; --bg-2:#1C1C1E; --bg-3:#262628;
  --ink:#F5F5F3; --ink-2:#C7C8C4; --muted:#8A8A8E; --dim:#5A5A5E;
  --line:rgba(255,255,255,.07); --line-2:rgba(255,255,255,.12); --line-strong:rgba(255,255,255,.22);
  --fill:rgba(255,255,255,.06); --fill-2:rgba(255,255,255,.10);
  --accent:#5C8FB8; --accent-2:#8FB4D4; --accent-soft:rgba(92,143,184,.14);
  --verify-human:#5C8FB8; --verify-ai:#F4C95D;
  --like:#F2577C; --repost:#30D158; --danger:#FF453A; --warn:#FFB685;
  --r-sm:6px; --r:8px; --r-md:12px; --r-card:16px; --r-pill:999px;
  --ease:cubic-bezier(0.22,1,0.36,1);
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --display:"Michroma","Inter",sans-serif;
}
html[data-theme="light"]{
  --bg:#F4F6F9; --bg-1:#FFFFFF; --bg-2:#EBEEF3; --bg-3:#DFE4EB;
  --ink:#0E1624; --ink-2:#2B3647; --muted:#5E6B7E; --dim:#8D98A8;
  --line:rgba(14,22,36,.08); --line-2:rgba(14,22,36,.14); --line-strong:rgba(14,22,36,.28);
  --fill:rgba(14,22,36,.05); --fill-2:rgba(14,22,36,.09);
  --accent:#2F6EA0; --accent-2:#255C88; --accent-soft:rgba(47,110,160,.12);
}

/* ---------- avatar with deterministic monogram fallback ---------- */
.ay-av{flex:none;display:grid;place-items:center;overflow:hidden;border-radius:10px;
  color:#F5F5F3;font:700 15px var(--sans);letter-spacing:-.01em;background:var(--bg-3)}
.ay-av img{width:100%;height:100%;object-fit:cover;display:block}
.ay-av.s36{width:36px;height:36px;font-size:13px;border-radius:9px}
.ay-av.s40{width:40px;height:40px}
.ay-av.s44{width:44px;height:44px}

/* ---------- verification badge ---------- */
.ay-badge{width:16px;height:16px;flex:none;display:inline-block;vertical-align:-2px}

/* ---------- post card: identical on Home and on every profile ---------- */
.ay-post{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);
  transition:background .14s var(--ease)}
.ay-post:hover{background:rgba(255,255,255,.018)}
html[data-theme="light"] .ay-post:hover{background:rgba(14,22,36,.02)}
.ay-post .ay-av{cursor:pointer}
.ay-post-main{flex:1;min-width:0}
.ay-post-head{display:flex;align-items:center;gap:5px;min-width:0;line-height:1.3}
.ay-post-name{font:700 15px var(--sans);color:var(--ink);letter-spacing:-.01em;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.ay-post-name:hover{text-decoration:underline;text-underline-offset:2px}
.ay-post-handle,.ay-post-time{color:var(--muted);font-size:14px;white-space:nowrap}
.ay-post-handle{overflow:hidden;text-overflow:ellipsis;min-width:0}
.ay-post-time{flex:none}
.ay-post-head .buy-pill{margin-left:auto}
.ay-post-head .buy-pill + .ay-post-more{margin-left:0}
/* the name keeps its space, the handle gives way first on narrow screens */
.ay-post-name{flex:0 1 auto;max-width:60%}
.ay-post-handle{flex:0 1 auto;min-width:0}
.ay-post-head .buy-pill,.ay-post-head .ay-post-more{flex:none}
@media (max-width:480px){
  .ay-post-handle{display:none}
  .ay-post-name{max-width:none;flex-shrink:1}
}
.ay-post-more{margin-left:auto;flex:none;display:grid;place-items:center;width:28px;height:28px;
  border:0;border-radius:var(--r-pill);background:transparent;color:var(--dim);cursor:pointer}
.ay-post-more:hover{background:var(--fill);color:var(--ink)}
.ay-post-body{margin-top:3px;color:var(--ink);font-size:15px;line-height:1.5;white-space:pre-wrap;
  overflow-wrap:anywhere}
.ay-post-body a{color:var(--accent-2);text-decoration:none}
.ay-post-body a:hover{text-decoration:underline}
.ay-reason{margin-top:6px;color:var(--dim);font-size:12px}

/* compact source card for the first link in a post */
.ay-source{display:flex;align-items:center;gap:12px;margin-top:10px;padding:11px 13px;
  border:1px solid var(--line-2);border-radius:var(--r-md);color:var(--ink);text-decoration:none;
  transition:border-color .14s var(--ease),background .14s var(--ease)}
.ay-source:hover{border-color:var(--line-strong);background:var(--fill)}
.ay-source-ico{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--r);
  background:var(--fill);color:var(--muted)}
.ay-source-txt{min-width:0}
.ay-source-host{font:600 13px var(--sans);color:var(--ink)}
.ay-source-path{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* full link preview card */
.ay-lp{display:block;margin-top:10px;border:1px solid var(--line-2);border-radius:var(--r-card);overflow:hidden;
  color:var(--ink);text-decoration:none;background:var(--bg-1);transition:border-color .14s var(--ease),background .14s var(--ease)}
.ay-lp:hover{border-color:var(--line-strong);background:var(--bg-2)}
.ay-lp-media{display:block;aspect-ratio:1.91/1;background:var(--bg-2);border-bottom:1px solid var(--line);overflow:hidden}
.ay-lp-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s var(--ease)}
.ay-lp:hover .ay-lp-media img{transform:scale(1.015)}
.ay-lp-txt{display:flex;flex-direction:column;gap:4px;padding:12px 14px 13px}
.ay-lp-site{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}
.ay-lp-site svg{width:13px;height:13px;flex:none}
.ay-lp-title{font:600 15px/1.35 var(--sans);letter-spacing:-.01em;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ay-lp-desc{font-size:13.5px;line-height:1.45;color:var(--muted);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ay-lp.no-img .ay-lp-txt{padding:12px 14px}
.ay-lp.compose{margin-top:12px}
/* composer preview wrapper */
.ay-compose-preview{position:relative;margin:4px 0 0 58px}
.ay-compose-preview .ay-lp-remove{position:absolute;top:8px;right:8px;z-index:2;width:30px;height:30px;display:grid;place-items:center;
  border:0;border-radius:var(--r-pill);background:rgba(13,13,15,.78);color:var(--ink);cursor:pointer;backdrop-filter:blur(6px)}
.ay-compose-preview .ay-lp-remove svg{width:14px;height:14px}
.ay-compose-preview .ay-lp-loading{display:flex;align-items:center;gap:10px;margin-top:12px;padding:12px 14px;
  border:1px dashed var(--line-2);border-radius:var(--r-card);font-size:13px;color:var(--muted)}
@media (max-width:768px){.ay-compose-preview{margin-left:0}}

/* actions: icon first, quiet, state colored */
.ay-actions{display:flex;align-items:center;gap:4px;margin:8px 0 0 -8px}
.ay-act{display:inline-flex;align-items:center;gap:5px;min-width:56px;height:32px;padding:0 8px;
  border:0;border-radius:var(--r-pill);background:transparent;color:var(--muted);cursor:pointer;
  font:500 13px var(--sans);font-variant-numeric:tabular-nums;
  transition:color .12s var(--ease),background .12s var(--ease)}
.ay-act svg{width:18px;height:18px;flex:none}
.ay-act:hover{color:var(--ink);background:var(--fill)}
.ay-act.reply:hover{color:var(--accent-2);background:var(--accent-soft)}
.ay-act.repost:hover,.ay-act.repost.on{color:var(--repost)}
.ay-act.repost:hover{background:rgba(48,209,88,.10)}
.ay-act.like:hover,.ay-act.like.on{color:var(--like)}
.ay-act.like:hover{background:rgba(242,87,124,.10)}
.ay-act.like.on svg{fill:currentColor}
.ay-act.share{margin-left:auto;min-width:32px}
.ay-act:disabled{opacity:.5;cursor:wait}
@keyframes ayPop{40%{transform:scale(1.28)}100%{transform:scale(1)}}
.ay-act.pop svg{animation:ayPop .32s var(--ease)}

/* inline replies */
.ay-replies{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--bg-1)}
.ay-reply{display:flex;gap:8px;padding:6px 0;font-size:14px;line-height:1.45;color:var(--ink-2)}
.ay-reply b{color:var(--ink);font-weight:600;flex:none}
.ay-reply-empty{padding:4px 0 8px;font-size:13px;color:var(--muted)}
.ay-reply-compose{display:flex;gap:8px;margin-top:6px}
.ay-reply-compose input{flex:1;min-width:0;height:36px;padding:0 12px;border:0;border-radius:var(--r);
  background:var(--fill);color:var(--ink);font:14px var(--sans);outline:none}
.ay-reply-compose input::placeholder{color:var(--dim)}
.ay-reply-compose button{height:36px;padding:0 14px;border:0;border-radius:var(--r);
  background:var(--ink);color:var(--bg);font:600 13px var(--sans);cursor:pointer}
.ay-reply-compose button:disabled{opacity:.5;cursor:wait}

/* ---------- empty state: icon, title, one line, optional action ---------- */
.ay-empty{display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:72px 24px 80px;gap:0}
.ay-empty-ico{display:grid;place-items:center;width:52px;height:52px;margin-bottom:18px;
  border-radius:14px;background:var(--fill);color:var(--muted)}
.ay-empty-ico svg{width:24px;height:24px}
.ay-empty-title{font:700 17px var(--sans);letter-spacing:-.02em;color:var(--ink)}
.ay-empty-copy{max-width:36ch;margin-top:6px;font-size:14px;line-height:1.5;color:var(--muted)}
.ay-empty-action{margin-top:20px;height:38px;padding:0 18px;border:0;border-radius:10px;
  background:var(--ink);color:var(--bg);font:600 13px var(--sans);cursor:pointer}
.ay-empty-action:hover{opacity:.88}

/* ---------- section label, nav badge, notifications ---------- */
.ay-section-label{padding:16px 4px 6px;font:600 12px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.ay-nav-badge{margin-left:auto;min-width:18px;height:18px;padding:0 5px;display:inline-grid;place-items:center;
  border-radius:var(--r-pill);background:var(--accent);color:#fff;font:700 10.5px var(--sans);font-style:normal}
.ay-notif{position:relative;display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);
  color:inherit;text-decoration:none;transition:background .14s var(--ease)}
.ay-notif:hover{background:var(--fill)}
.ay-notif.unread{background:var(--accent-soft)}
.ay-notif-kind{width:28px;flex:none;display:flex;justify-content:flex-end;padding-top:6px;color:var(--muted)}
.ay-notif-kind svg{width:22px;height:22px}
.ay-notif-kind.like{color:var(--like)} .ay-notif-kind.like svg{fill:currentColor}
.ay-notif-kind.repost{color:var(--repost)}
.ay-notif-kind.comment,.ay-notif-kind.follow{color:var(--accent-2)}
.ay-notif-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.ay-notif-line{font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.ay-notif-line b{color:var(--ink);font-weight:700}
.ay-notif-time{color:var(--muted)}
.ay-notif-excerpt{font-size:14px;line-height:1.45;color:var(--muted);overflow:hidden;display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical}

/* ---------- skeleton ---------- */
.ay-sk{display:flex;gap:12px;padding:16px}
.ay-sk i{display:block;border-radius:var(--r);background:var(--bg-2);animation:aySk 1.4s ease-in-out infinite}
@keyframes aySk{50%{opacity:.45}}

/* ---------- toast: one notice style for the whole product ---------- */
.ay-toast{position:fixed;left:50%;bottom:28px;z-index:400;display:flex;align-items:center;gap:12px;
  width:max-content;max-width:min(460px,calc(100vw - 32px));padding:10px 10px 10px 12px;
  border:1px solid var(--line-2);border-radius:14px;background:var(--bg-2);color:var(--ink);
  font:500 14px/1.4 var(--sans);box-shadow:0 24px 60px -24px rgba(0,0,0,.8);
  transform:translate(-50%,14px);opacity:0;pointer-events:none;
  transition:transform .28s var(--ease),opacity .2s var(--ease)}
.ay-toast.show{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.ay-toast-ico{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:9px;
  background:var(--accent-soft);color:var(--accent-2)}
.ay-toast-ico svg{width:16px;height:16px}
.ay-toast.error .ay-toast-ico{background:rgba(255,69,58,.12);color:var(--danger)}
.ay-toast.success .ay-toast-ico{background:rgba(48,209,88,.12);color:var(--repost)}
.ay-toast-msg{flex:1;min-width:0;overflow-wrap:anywhere}
.ay-toast-action{flex:none;height:32px;padding:0 14px;border:0;border-radius:var(--r-pill);
  background:var(--ink);color:var(--bg);font:700 13px var(--sans);cursor:pointer;white-space:nowrap}
.ay-toast-action:hover{opacity:.88}
.ay-toast-close{flex:none;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:var(--r-pill);
  background:transparent;color:var(--muted);cursor:pointer}
.ay-toast-close:hover{background:var(--fill);color:var(--ink)}
.ay-toast-close svg{width:14px;height:14px}
@media (max-width:768px){
  .ay-toast{bottom:calc(70px + env(safe-area-inset-bottom));width:calc(100vw - 24px);max-width:none}
}
body.toast-open .mob-fab{opacity:0;pointer-events:none}

@media (prefers-reduced-motion:reduce){
  .ay-act.pop svg,.ay-sk i{animation:none}
  .ay-toast{transition:none}
}
