/* pc-shared.css
 * The ONE stylesheet of design tokens and components that were copy-pasted as inline <style> into every
 * signed-in Pure Community page. Linked (before the page's own <style>) by feed, leaderboard, members, askai,
 * saved, settings, profile, hub, projects, education, chat, marketplace, events-calendar, job-board, mentor-match.
 *
 * Rules here are byte-for-byte what 3+ pages carried identically. Anything a page needs differently stays in that
 * page's own <style> (it comes after this file, so it wins). Do not "tidy" a value here without checking which
 * pages still define the same selector locally: see prototype/ARCHITECTURE.md ("CSS ownership").
 * Order inside this file is the order the rules had on the pages (equal-specificity rules that touch the same
 * property keep their relative order); sections are for reading only.
 * The shell's own rules (top bar, sidebar, drawer) live in pc-shell.js, not here.
 */

/* ===== TOKENS (dark default) ===== */
:root {
  --orange: #f1420b;
  --blue: #2a93c1;
  --bg: #080a12;
  --text: #e8edf5;
  --muted: #9ca3af;
  --border: rgba(255,255,255,0.08);
  --green: #16a34a;
  --purple: #7c3aed;
  --amber: #d97706;
  --slate: #475569;
  --blue-dim: rgba(42,147,193,0.12);
  --blue-border: rgba(42,147,193,0.25);
  --card: linear-gradient(145deg, rgba(13,26,42,0.85) 0%, rgba(8,10,18,0.9) 100%);
  --modal-bg: #0d1520;
  --gradient-btn: linear-gradient(135deg, #2a93c1 0%, #1a7aaa 100%);
  --gradient-btn-hover: linear-gradient(135deg, #3aa8da 0%, #2a93c1 100%);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.5), 0 1px 3px rgba(42,147,193,0.1);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.6), 0 0 20px rgba(42,147,193,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --cf-green: #16a34a;
  --cf-green-soft: rgba(22,163,74,0.12);
  --cf-amber: #f59e0b;
  --cf-purple: #7c3aed;
  --cf-star: #f5b942;
  --cf-shadow-hover: 0 8px 28px rgba(0,0,0,0.45);
}

/* ===== TOKENS (light theme) ===== */
[data-theme="light"] {
  --bg: #e8eef4;
  --text: #1a1a2e;
  --muted: #4a5568;
  --border: rgba(42,80,120,0.12);
  --blue-dim: rgba(42,147,193,0.08);
  --blue-border: rgba(42,147,193,0.4);
  --card: linear-gradient(145deg, #edf2f7 0%, #e8eef4 100%);
  --modal-bg: #edf2f7;
  --shadow-card: 0 4px 16px rgba(30,60,90,0.08), 0 1px 3px rgba(42,147,193,0.06);
  --shadow-hover: 0 8px 24px rgba(30,60,90,0.12), 0 0 20px rgba(42,147,193,0.15);
  /* STAGING-ADAPTER: brand/semantic tokens were never redefined for light theme, so text and links
     using them directly (var(--blue)/var(--orange)/etc as color, not just as a tint) stayed at their
     dark-tuned values and landed at ~2.2-3.4:1 on the light bg above — below WCAG AA (4.5:1). Darkened
     each, reusing the same hues already established per-page (circles/showcase/messages .ci-ai/.sc-ai/
     .dm-ai -> #5b21b6; .ci-back/.dm-back -> #1a6a94; .ci-joined/.dm-ok -> green family; events-calendar's
     own --cf-amber override -> #92400e) so this is one sitewide fix instead of N page-local ones. Verified
     >=4.5:1 against both --bg (#e8eef4) and --card/--modal-bg (#edf2f7). Dark theme values above are untouched.
  */
  --orange: #b23a0a;
  --blue: #1a6a94;
  --green: #166534;
  --purple: #5b21b6;
  --amber: #92400e;
  --cf-green: #166534;
  --cf-green-soft: rgba(22,101,52,0.10);
  --cf-amber: #92400e;
  --cf-purple: #5b21b6;
  --cf-star: #92400e;
}

/* ===== BASE: reset, typography ===== */
* { box-sizing: border-box; }
.oswald {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ===== LAYOUT SHELL (page frame every page repeats) ===== */
.main-layout { display: flex; padding-top: 60px; min-height: 100vh; }
.feed-area {
  flex: 1; margin-left: 240px; margin-right: 340px;
  padding: 24px 24px 100px;
  min-width: 0;
}
.feed-column { max-width: 720px; margin: 0 auto; }
@media (max-width: 1100px) {
  .feed-area { margin-right: 0; }
}
@media (max-width: 768px) {
  .feed-area { margin-left: 0; padding: 16px 12px 80px; }
}
.fc-content { flex:1 1 0;margin-left:240px;margin-right:260px;padding:24px 28px 100px;min-width:0; }
.fc-rail { position:fixed;top:60px;right:0;bottom:0;width:260px;overflow-y:auto;padding:16px 14px 80px;border-left:1px solid var(--border);background:rgba(8,10,18,0.6);backdrop-filter:blur(10px); }
@media(max-width:1100px) {
  .fc-rail { display:none; }
}
@media(max-width:1100px) {
  .fc-content { margin-right:0; }
}
@media(max-width:768px) {
  .fc-content { margin-left:0;padding:16px 14px 100px; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: #fff;
  border: none; border-radius: var(--radius-sm);
  background: var(--gradient-btn);
  box-shadow: 0 2px 8px rgba(42,147,193,0.25);
  cursor: pointer; transition: var(--transition); font-family: inherit;
}
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--text);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--blue-border); background: var(--blue-dim); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; font-size: 13px; font-weight: 500; color: var(--muted);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.reaction-btn:hover { color: var(--blue); background: var(--blue-dim); border-color: var(--blue-border); }
.reaction-btn.active { color: #fff; background: var(--gradient-btn); border-color: transparent; box-shadow: 0 0 12px var(--blue-glow); }
.save-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; color: var(--muted);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.save-btn:hover { color: var(--blue); border-color: var(--blue-border); background: var(--blue-dim); }
.save-btn.saved { color: #fff; background: var(--gradient-btn); border-color: transparent; }
/* Post card: Report / Edit / Delete are rendered hidden and revealed per viewer (pc-ahsen-feed-actions.js);
   .reaction-btn's display would otherwise beat the UA [hidden] rule. */
.post-actions [hidden] { display: none !important; }
.pc-owner-actions { display: inline-flex; gap: 4px; }
.pc-edit-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.pc-edit-form .pc-edit-title, .pc-edit-form .pc-edit-body { width: 100%; box-sizing: border-box; }
.pc-edit-actions { display: flex; gap: 8px; align-items: center; }
/* Inline thread: own-reply Delete, and the placeholder a reply with replies becomes after its author deletes it. */
.pc-comment-delete { margin-left: 4px; }
.pc-comment-gone .pc-comment-body { color: var(--muted); font-style: italic; }
.btn-primary:hover { background:var(--gradient-btn-hover);transform:translateY(-1px); }
.cf-btn:focus-visible { outline:2px solid var(--blue);outline-offset:2px; }

/* ===== FORM CONTROLS ===== */
.create-post-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.create-input {
  flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px;
  color: var(--muted); font-family: inherit; cursor: text;
  transition: var(--transition);
}
.create-footer { display: flex; justify-content: flex-end; }
.cf-select:focus { outline:none;border-color:var(--blue-border); }
.form-group { margin-bottom:16px; }
.form-select:focus { outline:none;border-color:var(--blue-border); }
.form-textarea:focus { outline:none;border-color:var(--blue-border); }
/* Native select popups: the controls are dark/translucent with appearance:none, so without color-scheme the OS draws a white popup
   with near-white text. color-scheme themes the popup; the option rules cover Firefox/Windows, which paint their own option rows. */
.form-select, .cf-select { color-scheme:dark; }
.form-select option, .cf-select option { background:#0d1520;color:var(--text); }
[data-theme="light"] .form-select, [data-theme="light"] .cf-select { color-scheme:light; }
[data-theme="light"] .form-select option, [data-theme="light"] .cf-select option { background:#edf2f7;color:var(--text); }
/* Modals follow --modal-bg. The pages colour their success lines with an inline #4ade80 (1.5:1 on the light modal), hence !important. */
[data-theme="light"] .modal [style*="#4ade80"] { color:#166534 !important; }

/* ===== CARDS, WIDGETS, LISTS ===== */
.post-meta { flex: 1; min-width: 0; }
.post-author { font-size: 14px; font-weight: 700; color: var(--text); }
.post-ai { font-size: 12px; color: var(--blue); font-weight: 600; }
.post-time { font-size: 12px; color: var(--muted); }
.post-company { font-size: 12px; color: var(--muted); }
.post-sub-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-sub-row .dot { color: var(--muted); }
.post-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.post-title { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 22px; font-weight: 700; letter-spacing: 0.03em; color: var(--text); margin: 0 0 10px; line-height: 1.25; }
.post-image { width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(42,147,193,0.12), rgba(13,26,42,0.8)); border-radius: var(--radius-md); margin-bottom: 14px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.post-image-placeholder { opacity: 0.4; font-style: italic; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.post-actions { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.post-actions .spacer { flex: 1; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { width: 22px; text-align: center; font-size: 13px; font-weight: 700; }
.lb-rank.gold { color: #f59e0b; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #cd7c54; }
.lb-name { flex: 1; font-size: 14px; font-weight: 600; }
.lb-pts { font-size: 13px; color: var(--blue); font-weight: 700; }
.lb-you { background: var(--blue-dim); border-radius: var(--radius-sm); }
.lb-your-rank { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }
.lb-footer { margin-top: 10px; text-align: center; }
.lb-link { font-size: 12px; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; }
.lb-link:hover { text-decoration: underline; }
.live-card { background: var(--blue-dim); border: 1px solid var(--blue-border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 10px; }
.live-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.live-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.live-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.challenge-card { background: linear-gradient(135deg, rgba(42,147,193,0.08), rgba(8,10,18,0.9)); border: 1px solid var(--blue-border); border-radius: var(--radius-md); padding: 14px; }
.challenge-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.challenge-title { font-size: 15px; font-weight: 700; color: var(--text); }
.challenge-req { font-size: 12px; color: var(--muted); margin: 0 0 10px; padding-left: 18px; }
.challenge-req li { margin-bottom: 3px; }
.challenge-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.spotlight-name { font-size: 14px; font-weight: 700; }
.spotlight-role { font-size: 12px; color: var(--muted); }
.spotlight-quote { border-left: 3px solid var(--orange); padding-left: 12px; font-size: 14px; font-style: italic; color: var(--text); opacity: 0.9; line-height: 1.6; }
.spotlight-badge { margin-top: 6px; }
@media (max-width: 480px) {
  .post-title { font-size: 17px; }
}
.post-image img { width:100%; height:100%; object-fit:cover; display:block; }
.widget { background:var(--card);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;margin-bottom:14px;backdrop-filter:blur(10px); }
.widget-title { font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--muted);margin:0 0 12px; }
.pb-hero-content { position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;padding:0 28px;z-index:2;pointer-events:none; }
.pb-hero-content h2 { margin:0;font-family:'Oswald',sans-serif;font-size:26px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:#e8edf5; }
.pb-hero-content h2 .accent { color:var(--orange); }
.pb-hero-content p { margin:4px 0 0;font-size:13px;color:rgba(232,237,245,0.65); }

/* ===== BADGES, PILLS ===== */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 8px rgba(241,66,11,0.6);
  animation: pulse-live 2s ease-in-out infinite;
}
.type-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.type-pill {
  padding: 4px 12px; font-size: 12px; font-weight: 600;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.type-pill:hover { border-color: var(--blue-border); color: var(--text); background: var(--blue-dim); }
.type-pill.selected { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.pin-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); background: var(--blue-dim); border-radius: var(--radius-pill); border: 1px solid var(--blue-border); }
.live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); background: rgba(241,66,11,0.12); border-radius: var(--radius-pill); border: 1px solid rgba(241,66,11,0.3); }
.xp-pill { padding: 3px 10px; font-size: 12px; font-weight: 700; color: #fbbf24; background: rgba(217,119,6,0.15); border-radius: var(--radius-pill); border: 1px solid rgba(217,119,6,0.3); }

/* ===== AVATARS ===== */
/* Base size for shell pages (circles, showcase, messages, hub) that don't carry Ahsen's inline .avatar rules:
   without it a real profile photo rendered at natural size over the page (Waqas report 2026-10-21). Mirrors feed.html. */
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #2a93c1 0%, #1a5a7a 100%); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

/* ===== MODALS ===== */
.modal-backdrop { display:none;position:fixed;inset:0;background:rgba(0,0,0,0.7);backdrop-filter:blur(4px);z-index:500;align-items:center;justify-content:center; }
.modal-backdrop.open { display:flex; }
.modal-header { padding:20px 24px 0;display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.modal-body { padding:20px 24px 28px; }

/* ===== COMING-SOON BANNER ===== */
/* The ribbon starts below the 60px fixed topnav so it never covers the top-right account area (Sign in / avatar). */
.pc-cs-ribbon { position:fixed;top:60px;right:0;width:200px;height:200px;overflow:hidden;z-index:9998;pointer-events:none; }
.pc-cs-ribbon span { position:absolute;top:38px;right:-52px;transform:rotate(45deg);width:240px;text-align:center;background:linear-gradient(135deg,#f1420b 0%,#c9350a 100%);color:#fff;font-family:'Oswald',sans-serif;text-transform:uppercase;letter-spacing:0.14em;font-weight:600;font-size:13px;padding:8px 0;box-shadow:0 4px 14px rgba(0,0,0,0.45); }
.pc-cs-banner { position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:9998;pointer-events:none;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 32px);background:linear-gradient(145deg,rgba(13,26,42,0.92) 0%,rgba(8,10,18,0.95) 100%);border:1px solid rgba(42,147,193,0.35);border-radius:999px;padding:10px 18px;box-shadow:0 8px 32px rgba(0,0,0,0.6),0 0 20px rgba(42,147,193,0.15);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px); }
.pc-cs-banner .pc-cs-dot { width:8px;height:8px;border-radius:50%;background:#f1420b;box-shadow:0 0 10px #f1420b;flex:0 0 auto; }
.pc-cs-banner .pc-cs-tag { font-family:'Oswald',sans-serif;text-transform:uppercase;letter-spacing:0.1em;font-weight:600;font-size:12px;color:#2a93c1;flex:0 0 auto;white-space:nowrap; }
.pc-cs-banner .pc-cs-msg { font-family:'Plus Jakarta Sans',sans-serif;font-size:13px;color:#e8edf5;line-height:1.3; }
@media (max-width:768px) {
  .pc-cs-banner { bottom:80px;padding:9px 14px; }
}
@media (max-width:768px) {
  .pc-cs-banner .pc-cs-msg { font-size:12px; }
}
@media (max-width:768px) {
  .pc-cs-ribbon { width:150px;height:150px; }
}
@media (max-width:768px) {
  .pc-cs-ribbon span { top:30px;right:-60px;font-size:11px; }
}
/* STAGING-ADAPTER (design audit #6): the Coming-Soon banner's background/text were hardcoded for the dark
   theme only, so on a light background it painted near-white text on a near-white pill — unreadable. */
[data-theme="light"] .pc-cs-banner { background: linear-gradient(145deg, rgba(237,242,247,0.95) 0%, rgba(232,238,244,0.97) 100%); border-color: rgba(42,80,120,0.25); box-shadow: 0 8px 32px rgba(30,60,90,0.18), 0 0 20px rgba(42,147,193,0.12); }
[data-theme="light"] .pc-cs-banner .pc-cs-tag { color: #1a6a94; }
[data-theme="light"] .pc-cs-banner .pc-cs-msg { color: #1a1a2e; }

/* ===== PROFILE EDIT FORM (pc-ahsen-profile-edit.js, PR #62) =====
   The simple edit form mounts inside the profile header and uses these classes.
   PR #62 added the script; PR #75 wired /api/me envelope; this CSS closes the
   visual gap. Scoped under .pc-edit-card so we don't collide with the feed
   composer's .pc-edit-form / .pc-edit-title / .pc-edit-body / .pc-edit-actions
   (those are intentionally generic and used elsewhere). */
.pc-edit-card {
  max-width: 640px; margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 30px 30px;
}
.pc-edit-card .pc-edit-head { margin-bottom: 24px; }
.pc-edit-card .pc-edit-title { font-size: 21px; font-weight: 800; margin: 0; color: var(--text); }
.pc-edit-card .pc-edit-field { margin-bottom: 14px; }
.pc-edit-card .pc-edit-field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.pc-edit-card .pc-edit-counter {
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.pc-edit-card .pc-edit-req { color: #f87171; margin-left: 2px; }
.pc-edit-card .pc-edit-field input,
.pc-edit-card .pc-edit-field textarea {
  width: 100%; padding: 11px 13px; font-size: 14.5px; font-family: inherit;
  color: var(--text); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-sizing: border-box; transition: var(--transition);
}
.pc-edit-card .pc-edit-field input:focus,
.pc-edit-card .pc-edit-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim);
}
.pc-edit-card .pc-edit-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.pc-edit-card .pc-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.pc-edit-card .pc-edit-actions .btn-primary,
.pc-edit-card .pc-edit-actions .btn-ghost { padding: 10px 20px; font-size: 14px; }
.pc-edit-card .pc-edit-actions .btn-primary[disabled] { opacity: 0.6; cursor: default; }
.pc-edit-card .pc-edit-msg { font-size: 12.5px; margin-left: 12px; }
@media (max-width: 640px) {
  .pc-edit-card { padding: 20px 16px 24px; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }

}
.fade-in { animation: fadeInUp 200ms cubic-bezier(0.4,0,0.2,1) both; }
@keyframes pulse-live {
  0%  { transform: scale(1);   opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100%{ transform: scale(1);   opacity: 1; }

}

/* ===== LIGHT THEME OVERRIDES ===== */
[data-theme="light"] body {
  background: radial-gradient(ellipse at 20% 20%, rgba(42,147,193,0.04) 0%, transparent 50%), #e8eef4 !important;
  color: #1a1a2e;
}
[data-theme="light"] .right-rail {
  background: rgba(237,242,247,0.9) !important;
  border-left-color: rgba(42,80,120,0.12);
}
[data-theme="light"] .type-pill { background: rgba(255,255,255,0.7); }
[data-theme="light"] .widget { background: #edf2f7; border-color: rgba(42,80,120,0.12); }
[data-theme="light"] .btn-ghost { color: #1a1a2e; }
[data-theme="light"] .post-card, [data-theme="light"] .card { background: linear-gradient(145deg, #edf2f7 0%, #e8eef4 100%); }
[data-theme="light"] .widget-title { color: #5a6b7d; }
[data-theme="light"] .reaction-btn { color: #4a5568; border-color: rgba(42,80,120,0.15); }
[data-theme="light"] .save-btn { color: #4a5568; border-color: rgba(42,80,120,0.15); }
[data-theme="light"] .post-actions { border-top-color: rgba(42,80,120,0.1); }
[data-theme="light"] .create-input { background: rgba(255,255,255,0.8); color: #1a1a2e; }
[data-theme="light"] .tag { background: rgba(255,255,255,0.7); color: #4a5568; }

/* hub.html: .detail-body is `1fr 280px`; a bare 1fr track's minimum is the item's min-content (the unwrapped <pre>
   line), which widened the whole page. Let both grid items shrink so the <pre> scrolls inside its own box. */
.detail-readme, .detail-sidebar-panel { min-width:0; }

/* chat.html: the fixed Coming Soon pill must never cover the composer. The pill stays fixed and click-through; the
   fixed chat page ends above it instead. The pill message is one line (ellipsis) so its height is bounded:
   desktop = bottom 24 + ~40 tall -> reserve 72; mobile = bottom 80 (above the 64px tab bar) + ~38 tall -> reserve 124. */
body:has(.chat-page) .pc-cs-banner .pc-cs-msg { white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0; }
body:has(.pc-cs-banner) .chat-page { bottom:72px; }
@media (max-width:768px) {
  body:has(.pc-cs-banner) .chat-page { bottom:124px; }
}

/* Feed filters: New / Top / Active tabs + the active hashtag chip (pc-ahsen-wire.js). */
.pc-feed-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.pc-sort-seg { display: inline-flex; gap: 3px; padding: 3px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.pc-sort-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 14px; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); background: transparent; border: none; border-radius: var(--radius-pill); cursor: pointer; transition: var(--transition); }
.pc-sort-btn:hover { color: var(--text); background: var(--blue-dim); }
.pc-sort-btn.pc-on { color: #fff; background: var(--blue); box-shadow: 0 0 12px var(--blue-glow); }
.pc-sort-btn:focus-visible, .pc-tag-clear:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pc-tag-active { display: inline-flex; align-items: center; }
.pc-tag-active[hidden] { display: none; }
.pc-tag-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 6px 0 12px; font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-dim); border: 1px solid var(--blue-border); border-radius: var(--radius-pill); }
.pc-tag-clear { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; font-size: 16px; line-height: 1; color: inherit; background: transparent; border: none; border-radius: 50%; cursor: pointer; }
.pc-tag-clear:hover { background: var(--blue-border); }
[data-theme="light"] .pc-sort-seg { background: rgba(255,255,255,0.7); }
/* Members page search box (same look as the Vercel directory) */
.pc-members-search { margin-bottom: 16px; }
.pc-members-search-input { width: 100%; box-sizing: border-box; padding: 10px 14px; font: inherit; color: var(--text); background: var(--card, rgba(255,255,255,0.03)); border: 1px solid var(--border, #26313d); border-radius: 10px; outline: none; }
.pc-members-search-input:focus { border-color: var(--blue); }

/* ===== SETTINGS PAGE (pc-ahsen-settings.js) =====
   Four cards: Appearance, Account, Profile, Session. Ported from the Vercel design (which injected these at runtime);
   buttons reuse .btn-primary / .btn-ghost, tokens come from :root / [data-theme="light"]. */
.pc-settings { width:100%;max-width:640px;margin:0 auto;padding:32px 24px 60px; }
.pc-settings-head { margin:0 0 20px; }
.pc-settings-title { font-family:'Oswald',sans-serif;text-transform:uppercase;letter-spacing:0.05em;font-size:26px;font-weight:700;color:var(--text);margin:0; }
.pc-settings-sub { font-size:13.5px;color:var(--muted);margin:6px 0 0;line-height:1.5; }
.pc-set-card { background:var(--card);border:1px solid var(--blue-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-card);padding:6px 20px;margin-bottom:18px;backdrop-filter:blur(10px); }
.pc-set-card-title { font-family:'Oswald',sans-serif;text-transform:uppercase;letter-spacing:0.06em;font-size:13px;font-weight:700;color:var(--muted);padding:16px 0 4px; }
.pc-set-row { display:flex;align-items:center;gap:16px;padding:16px 0;border-top:1px solid var(--border); }
.pc-set-row:first-of-type { border-top:none; }
.pc-set-main { flex:1;min-width:0; }
.pc-set-label { font-size:14px;font-weight:600;color:var(--text); }
.pc-set-desc { font-size:12.5px;color:var(--muted);margin-top:3px;line-height:1.5;word-break:break-word; }
.pc-set-value { font-size:14px;color:var(--text);font-weight:600;word-break:break-word; }
.pc-set-email { margin-top:4px; }
.pc-set-muted { color:var(--muted);font-weight:400; }
.pc-set-aside { flex:0 0 auto;display:flex;align-items:center;gap:10px; }
.pc-set-card a.btn-primary, .pc-set-card a.btn-ghost { text-decoration:none; }
.pc-toggle { position:relative;width:46px;height:26px;border-radius:999px;border:1px solid var(--border);background:rgba(255,255,255,0.06);cursor:pointer;transition:var(--transition);padding:0;flex:0 0 auto; }
.pc-toggle:hover { border-color:var(--blue-border); }
.pc-toggle:focus-visible { outline:2px solid var(--blue);outline-offset:2px; }
.pc-toggle .pc-toggle-knob { position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#e8edf5;transition:var(--transition);box-shadow:0 1px 3px rgba(0,0,0,0.4); }
.pc-toggle[aria-checked="true"] { background:var(--gradient-btn);border-color:var(--blue-border); }
.pc-toggle[aria-checked="true"] .pc-toggle-knob { left:22px; }
.pc-set-badge { display:inline-flex;align-items:center;gap:5px;padding:3px 10px;font-size:11px;font-weight:700;border-radius:999px;line-height:1; }
.pc-set-badge.ok { color:#4ade80;background:rgba(22,163,74,0.12);border:1px solid rgba(22,163,74,0.28); }
.pc-set-badge.warn { color:#fbbf24;background:rgba(217,119,6,0.12);border:1px solid rgba(217,119,6,0.28); }
.btn-ghost.pc-set-danger { color:#f87171;border-color:rgba(239,68,68,0.35); }
.btn-ghost.pc-set-danger:hover { background:rgba(239,68,68,0.1);border-color:rgba(239,68,68,0.55); }
.pc-set-note { padding:14px 0;font-size:13px;color:var(--muted);line-height:1.6; }
.pc-set-err { padding:12px 0;font-size:13px;color:#f87171;line-height:1.5; }
.pc-set-link { color:var(--blue);font-weight:600;text-decoration:none; }
.pc-set-link:hover { text-decoration:underline; }
[data-theme="light"] .pc-toggle { background:rgba(42,80,120,0.12); }
[data-theme="light"] .pc-set-badge.ok { color:#166534; }
[data-theme="light"] .pc-set-badge.warn { color:#b45309; }
[data-theme="light"] .btn-ghost.pc-set-danger, [data-theme="light"] .pc-set-err { color:#dc2626; }
@media (max-width:768px) {
  .pc-settings { padding:20px 16px 90px; }
  .pc-set-card { padding:4px 16px; }
  .pc-set-row { flex-wrap:wrap; }
}

/* ===== LEADERBOARD tabs: board tabs spacing + "Show more" (leaderboard.html) ===== */
.period-tabs.pc-lb-board-tabs { margin-bottom:12px; }
.pc-lb-more-wrap { display:flex;justify-content:center;margin:14px 0 4px; }
.pc-lb-more { padding:8px 22px;font-size:13px;font-weight:600;border-radius:var(--radius-pill);background:rgba(255,255,255,0.04);border:1px solid var(--border);color:var(--muted);cursor:pointer;transition:var(--transition);font-family:inherit; }
.pc-lb-more:hover { border-color:var(--blue-border);color:var(--text);background:var(--blue-dim); }
.pc-lb-more:focus-visible { outline:2px solid var(--blue);outline-offset:2px; }
.pc-lb-more:disabled { opacity:0.55;cursor:default; }

/* Leaderboard: AI Helpers board explainer note */
.board-note { margin:0 0 14px;padding:9px 13px;font-size:12.5px;line-height:1.45;color:var(--muted);background:rgba(255,255,255,0.03);border:1px solid var(--border);border-radius:var(--radius-md,10px);max-width:640px; }
.board-note strong { color:var(--text);font-weight:600; }
