/* public/assets/components.css
   Shared component styles. Web Components use Light DOM (no shadow root)
   so these apply throughout.
*/

/* ============================================================
   TOP NAV  (shared by every page)
   ============================================================ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
}
.topnav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.brand .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  transform: translateY(-2px);
  margin-left: 4px;
}
.nav-links { display: flex; gap: 2px; }
.nav-link {
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--r-pill);
  transition: all var(--dur-base) var(--ease);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.active { color: var(--text); background: var(--bg-elev); }
.nav-link .badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-glow);
  border-radius: 8px;
  font-family: var(--font-mono);
}
.nav-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.nav-search input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 11px 18px 11px 44px;
  color: var(--text);
  font-size: 15px;
  transition: all var(--dur-base) var(--ease);
}
.nav-search input:focus { outline: none; border-color: var(--accent-soft); background: var(--bg-elev-2); }
.nav-search svg {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  width: 18px; height: 18px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  position: relative;
  transition: all var(--dur-base) var(--ease);
}
.icon-btn:hover { background: var(--bg-elev); color: var(--text); }
.icon-btn .dot-notif {
  position: absolute; top: 9px; right: 11px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.avatar-nav {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6B46C1, #FF6B35);
  border: 2px solid var(--border-strong);
  cursor: pointer;
  margin-left: 8px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
  color: white;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.main {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 32px 80px;
  display: grid;
  grid-template-columns: var(--rail-left) 1fr var(--rail-right);
  gap: var(--gap-grid);
  align-items: start;
}
.left-rail, .right-rail {
  position: sticky;
  top: calc(var(--topnav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main--narrow { grid-template-columns: 1fr; max-width: 760px; }

@media (max-width: 1180px) {
  .main { grid-template-columns: 280px 1fr; }
  .right-rail { display: none; }
}
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; padding: 20px; }
  .left-rail { position: static; }
  .topnav { padding: 12px 16px; }
  .nav-links, .nav-search { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform 80ms var(--ease);
  text-decoration: none;
  font-family: inherit;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--accent); color: #0A0A0B; font-weight: 600; }
.btn--primary:hover:not(:disabled) { background: var(--accent-hi); transform: translateY(-1px); }
.btn--ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover:not(:disabled) { background: var(--bg-elev-2); border-color: var(--accent-soft); }
.btn--subtle { background: var(--bg-elev-2); color: var(--text); }
.btn--subtle:hover:not(:disabled) { background: var(--bg-elev-3); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid transparent; }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #0A0A0B; }

.btn--sm   { height: 34px; padding: 0 14px; font-size: 14px; }
.btn--lg   { height: 50px; padding: 0 22px; font-size: 16px; }
.btn--icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.btn--block { width: 100%; }

/* ============================================================
   BADGES / PILLS
   ============================================================ */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-transform: uppercase;
}
.badge--accent  { background: var(--accent-soft); color: var(--accent-glow); border-color: var(--accent-soft); }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--danger  { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--info    { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* ============================================================
   AVATARS
   ============================================================ */

.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6B46C1, #FF6B35);
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
  display: grid; place-items: center;
  color: white; font-weight: 600;
}
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }
.avatar--md { width: 44px; height: 44px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--xl { width: 96px; height: 96px; font-size: 32px; }
.avatar.green  { background: linear-gradient(135deg, #10B981, #047857); }
.avatar.purple { background: linear-gradient(135deg, #8B5CF6, #5B21B6); }
.avatar.amber  { background: linear-gradient(135deg, #F59E0B, #B45309); }
.avatar.blue   { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.avatar.teal   { background: linear-gradient(135deg, #14B8A6, #0F766E); }

/* ============================================================
   CARD primitive
   ============================================================ */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card--padded   { padding: 22px; }
.card--no-hover { pointer-events: auto; }
.card--no-hover:hover { border-color: var(--border); }

/* ============================================================
   PROFILE (left rail) — used by u-profile-card
   ============================================================ */

.profile-card { overflow: hidden; border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--border); }
.profile-cover {
  height: 84px;
  background:
    linear-gradient(135deg, #1a1a1f 0%, #2a1a15 50%, #1a1a1f 100%),
    radial-gradient(circle at 70% 30%, rgba(255,107,53,0.4), transparent 50%);
  background-blend-mode: screen;
}
.profile-body { padding: 0 20px 22px; margin-top: -36px; position: relative; }
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid var(--bg-elev);
  background: linear-gradient(135deg, #6B46C1, #FF6B35);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 600;
  color: white;
  margin-bottom: 10px;
  background-size: cover; background-position: center;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 24px; line-height: 1.15; font-weight: 400;
  font-style: italic; letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}
.profile-bio { font-size: 14px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }
.profile-meta {
  font-size: 13px; color: var(--text-mute);
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
}
.profile-meta::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--success);
}

.stats-card { padding: 18px 20px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-xl); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.stat-row + .stat-row { border-top: 1px solid var(--border); }
.stat-label { font-size: 14px; color: var(--text-dim); }
.stat-value {
  font-family: var(--font-mono);
  font-size: 17px; font-weight: 500;
  color: var(--accent-glow);
  font-variant-numeric: tabular-nums;
}

.quick-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font-size: 15px; font-weight: 500;
  color: var(--text);
  transition: all var(--dur-base) var(--ease);
  text-decoration: none;
}
.quick-link:hover { background: var(--bg-elev-2); border-color: var(--border-strong); transform: translateY(-1px); }
.quick-link-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent-glow);
}
.quick-link-text { flex: 1; }
.quick-link-sub { font-size: 12px; color: var(--text-mute); font-weight: 400; margin-top: 2px; }

/* ============================================================
   HERO panel (top of feed / settings)
   ============================================================ */

.hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,107,53,0.15), transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-glow);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 400; line-height: 1.05;
  font-style: italic;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  max-width: 520px;
}
.hero-title em { font-style: italic; color: var(--accent-glow); }
.hero-sub {
  font-size: 16px; color: var(--text-dim);
  line-height: 1.55; max-width: 540px;
  margin-bottom: 20px;
}
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 600px) { .hero-title { font-size: 32px; } .hero { padding: 24px; } }

/* ============================================================
   COMPOSER
   ============================================================ */

u-composer {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 22px 24px;
}
.composer-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.composer-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 14px 22px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  cursor: text;
  text-align: left;
  transition: all var(--dur-base) var(--ease);
}
.composer-input:hover { border-color: var(--border-strong); background: var(--bg-elev-2); }
.composer-input::placeholder { color: var(--text-mute); }

.composer-expanded { margin-top: 14px; }
.composer-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.55;
  min-height: 140px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
}
.composer-textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-elev-2); }

.composer-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.composer-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--r-pill);
  transition: all var(--dur-base) var(--ease);
}
.composer-chip:hover { background: var(--bg-elev-2); color: var(--text); }
.composer-chip[data-kind="repo"]:hover    { color: #A78BFA; }
.composer-chip[data-kind="photo"]:hover   { color: #4ECDC4; }
.composer-chip[data-kind="video"]:hover   { color: #F87171; }
.composer-chip[data-kind="article"]:hover { color: var(--accent); }
.composer-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
}

/* ============================================================
   POST CARDS
   ============================================================ */

u-post {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease);
}
u-post:hover { border-color: var(--border-strong); }

.post-header { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 14px; }
.post-author {
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none;
}
.post-author:hover { color: var(--accent-glow); }
.verified {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent); color: var(--bg);
}
.post-role { font-size: 14px; color: var(--text-dim); margin-top: 2px; }
.post-time { font-size: 13px; color: var(--text-mute); font-family: var(--font-mono); margin-top: 2px; }
.post-meta { flex: 1; min-width: 0; }
.post-body {
  padding: 0 22px 16px;
  font-size: 17px; line-height: 1.55;
  color: var(--text);
  word-wrap: break-word;
}
.post-body a { color: var(--accent-glow); }
.post-body strong { color: var(--accent-glow); font-weight: 500; }

.post-media {
  display: block;
  margin: 0;
  aspect-ratio: 16/10;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  object-fit: cover; width: 100%;
}

.post-actions { display: flex; gap: 0; padding: 6px 8px; border-top: 1px solid var(--border); }
.post-action {
  flex: 1;
  padding: 10px 4px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease);
}
.post-action:hover { background: var(--bg-elev-2); color: var(--text); }
.post-action[data-active="true"] { color: var(--accent); }
.post-action[data-active="true"] svg { fill: currentColor; }
.action-count { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ============================================================
   GITHUB EMBED
   ============================================================ */

u-gh-embed {
  display: block;
  margin: 0 22px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  transition: border-color var(--dur-base) var(--ease);
}
u-gh-embed:hover { border-color: var(--border-strong); }
u-gh-embed a { color: inherit; text-decoration: none; display: block; }
.gh-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.gh-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-elev-2);
  display: grid; place-items: center;
  color: #A78BFA;
  flex-shrink: 0;
}
.gh-repo {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 500;
  color: var(--text);
}
.gh-repo strong { font-weight: 700; }
.gh-desc { font-size: 14px; color: var(--text-dim); margin-top: 4px; margin-left: 48px; }
.gh-stats {
  display: flex; gap: 14px;
  margin-top: 8px; margin-left: 48px;
  font-size: 13px; color: var(--text-mute);
  font-family: var(--font-mono);
}
.gh-stat { display: flex; align-items: center; gap: 4px; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ============================================================
   JOB CARD
   ============================================================ */

u-job-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px 22px;
  transition: all var(--dur-base) var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
u-job-card:hover { border-color: var(--accent-soft); transform: translateY(-1px); }
.job-row { display: flex; gap: 16px; align-items: flex-start; }
.job-logo {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-display); font-style: italic;
  font-size: 22px; color: var(--accent-glow);
  background-size: cover; background-position: center;
}
.job-title { font-size: 17px; font-weight: 500; letter-spacing: -0.005em; color: var(--text); }
.job-company { font-size: 14px; color: var(--text-dim); margin-top: 3px; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.job-tag {
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.job-tag.remote { color: var(--success); border-color: rgba(74,222,128,0.2); }
.job-tag.match  { color: var(--accent-glow); border-color: var(--accent-soft); background: var(--accent-soft); }
.match-pill {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--success-soft); color: var(--success);
}

/* ============================================================
   APP CARD
   ============================================================ */

u-app-card {
  display: flex; gap: 14px; align-items: center;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-base) var(--ease);
  text-decoration: none;
  color: inherit;
}
u-app-card:hover { border-color: var(--border-strong); }
.app-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF6B35, #6B46C1);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 18px;
  font-family: var(--font-display); font-style: italic;
  flex-shrink: 0;
  background-size: cover; background-position: center;
}
.app-info  { flex: 1; min-width: 0; }
.app-name  { font-size: 15px; font-weight: 500; color: var(--text); display: block; text-decoration: none; }
.app-tag   { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.app-stats { display: flex; gap: 12px; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); }
.app-cta {
  padding: 6px 14px;
  background: var(--accent-soft); color: var(--accent-glow);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.app-cta:hover { background: var(--accent); color: var(--bg); }

/* ============================================================
   AD CARD (in feed)
   ============================================================ */

u-ad-card {
  display: block;
  background: linear-gradient(135deg, rgba(255,107,53,0.06), rgba(120,92,255,0.04));
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-2xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
u-ad-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,107,53,0.2), transparent 70%);
  pointer-events: none;
}
.ad-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-glow); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.ad-headline {
  font-family: var(--font-display); font-style: italic;
  font-size: 26px; line-height: 1.1; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.ad-body { font-size: 15px; color: var(--text-dim); line-height: 1.55; margin-bottom: 16px; }
.ad-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
}

/* ============================================================
   COMMENTS
   ============================================================ */

u-comments { display: block; padding: 0 22px 18px; border-top: 1px solid var(--border); }
.comments-list { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.comment {
  display: flex; gap: 12px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-bubble {
  background: var(--bg-elev-2);
  border-radius: 14px;
  padding: 10px 14px;
}
.comment-author { font-size: 14px; font-weight: 600; }
.comment-text   { font-size: 15px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.comment-meta   { font-size: 12px; color: var(--text-mute); margin-top: 6px; font-family: var(--font-mono); }
.comment-form { display: flex; gap: 10px; margin-top: 14px; }
.comment-input {
  flex: 1; background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 10px 16px; font-size: 15px;
}

/* ============================================================
   FILTER CHIPS
   ============================================================ */

.filter-bar {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  padding: 9px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: all var(--dur-base) var(--ease);
  flex-shrink: 0;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ============================================================
   RAIL CARDS (right rail)
   ============================================================ */

.rail-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.rail-header {
  padding: 20px 22px 10px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.rail-title { font-family: var(--font-display); font-style: italic; font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.rail-sub { font-size: 12px; color: var(--text-mute); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }

.rail-item {
  padding: 14px 22px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
}
.rail-item:hover { background: var(--bg-elev-2); }

.trend-rank {
  font-family: var(--font-display); font-style: italic;
  font-size: 30px; color: var(--text-mute);
  line-height: 1; margin-right: 12px;
  float: left; margin-top: 2px;
}

/* ============================================================
   EMPTY / SKELETON
   ============================================================ */

u-empty {
  display: grid; place-items: center;
  padding: 56px 20px;
  text-align: center;
}
.empty-title { font-family: var(--font-display); font-style: italic; font-size: 24px; margin-bottom: 8px; }
.empty-sub   { color: var(--text-dim); max-width: 360px; line-height: 1.55; }

u-skeleton { display: block; }

/* ============================================================
   TOASTS
   ============================================================ */

.toast-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
u-toast {
  display: block; pointer-events: auto;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 15px; color: var(--text);
  box-shadow: var(--shadow-md);
  animation: toast-in 200ms var(--ease);
  max-width: 360px;
}
u-toast[data-kind="success"] { border-left: 3px solid var(--success); }
u-toast[data-kind="error"]   { border-left: 3px solid var(--danger); }
u-toast[data-kind="info"]    { border-left: 3px solid var(--accent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
