/* CampusSync additive helper only.
   Homescreen reverted to production CampusSync UI (no re-theme/layout overrides).
   Keep only non-destructive shimmer + composer safety. */

/* skeleton / shimmer */
.feed-skeleton { display: grid; gap: 14px; margin-bottom: 14px; }
.sk-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px; }
.sk-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.sk-media { aspect-ratio: 16 / 9; width: 100%; margin-bottom: 12px; }
.sk-line { height: 12px; margin: 8px 0; }
.sk-short { width: 55%; }
.sk-avatar { width: 44px; height: 44px; border-radius: 9999px; flex: 0 0 auto; }
.sk-title { height: 15px; width: 35%; margin-bottom: 6px; }
.sk-block { position: relative; overflow: hidden; background: rgba(148, 163, 184, 0.16); border-radius: 8px; contain: content; }
.sk-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%); transform: translateX(-100%); animation: sk-sweep 1.4s ease-in-out infinite; }
@keyframes sk-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk-block::after { animation: none; opacity: 0; } .sk-block { background: rgba(148, 163, 184, 0.22); } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* protected composer */
#postAreaContainer, #campussync-new-post,
#postAreaContainer *, #campussync-new-post * { }

@font-face { font-family:'DM Sans'; font-style:normal; font-weight:400; font-display:swap; src:url(../fonts/DM-Sans/DMSans-Regular.ttf) format('truetype'); }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:700; font-display:swap; src:url(../fonts/DM-Sans/DMSans-Bold.ttf) format('truetype'); }
@font-face { font-family:CampusSyncPlatform_Font; font-style:normal; font-weight:400; font-display:swap; src:url(../fonts/DM-Sans/DMSans-Regular.ttf) format('truetype'); }
@font-face { font-family:CampusSyncPlatform_Font; font-style:normal; font-weight:700; font-display:swap; src:url(../fonts/DM-Sans/DMSans-Bold.ttf) format('truetype'); }
:root { --font-primary:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; --font-secondary:var(--font-primary); --bs-body-font-family:var(--font-primary); }
body, body *:not(.icon-\[tabler--home\]):not(i):not(svg) { font-family:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif !important; }
body code, body pre, body .kbd, body .font-mono { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace !important; }

/* Post button elevated like login primary action (only button styling; composer untouched) */
.share-ew-post {
    border-radius: 9999px !important;
    background: linear-gradient(180deg, #247cf0 0%, #1565d8 100%) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    border: none !important;
    padding: 10px 18px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(21, 101, 216, 0.35),
                0 2px 4px rgba(21, 101, 216, 0.22),
                0 1px 2px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.38),
                inset 0 -2px 0 rgba(10, 60, 140, 0.35) !important;
    transition: none !important;
}
.share-ew-post:hover {
    background: linear-gradient(180deg, #1d72e6 0%, #125ac2 100%) !important;
    box-shadow: 0 4px 14px rgba(21, 101, 216, 0.35),
                0 2px 4px rgba(21, 101, 216, 0.22),
                0 1px 2px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.38),
                inset 0 -2px 0 rgba(10, 60, 140, 0.35) !important;
    transform: none !important;
}
.share-ew-post:active {
    background: #145ec7 !important;
    box-shadow: 0 1px 3px rgba(21, 101, 216, 0.3), inset 0 1.5px 2px rgba(0, 0, 0, 0.25) !important;
    transform: none !important;
}
.share-ew-post:disabled { opacity: 0.6 !important; cursor: not-allowed !important; box-shadow: 0 4px 14px rgba(21, 101, 216, 0.35), 0 2px 4px rgba(21, 101, 216, 0.22), 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.38), inset 0 -2px 0 rgba(10, 60, 140, 0.35) !important; transform: none !important; }

/* Avatar: portrait/landscape images fill + crop inside circle (don't 'contain') */
.post-user-avatar > img,
.post-original-user-title-info .post-user-avatar img,
#feed-timeline .post-user-avatar img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: block !important;
    flex: 0 0 auto !important;
    background: #f3f4f6 !important;
}

/* VTU Q&A complete page + composer link */
.cs-static-page { display:block; width:100%; max-width:920px; margin:24px auto; padding:0 16px; box-sizing:border-box; color:#111827; }
.cs-static-page-card { width:100%; box-sizing:border-box; background:#fff; border:1px solid #e3e6ea; border-radius:16px; padding:24px; overflow-wrap:anywhere; }
.cs-static-page-head { border-bottom:1px solid #eef0f3; margin-bottom:18px; padding-bottom:14px; }
.cs-static-page-title { font-size:clamp(24px,3vw,34px); line-height:1.2; margin:0 0 8px; }
.cs-static-page-sub { color:#5f6368; line-height:1.5; margin:0; }
.cs-qa-page .cs-static-page-card { max-width:860px; margin:0 auto; }
.cs-qa-page form { max-width:100%; }
.cs-qa-page label { min-width:0; }
.cs-qa-page input,.cs-qa-page textarea { max-width:100%; }
.cs-qa-form { border-top:1px solid #e5e7eb; margin-top:24px; padding-top:20px; display:grid; gap:12px; }
.cs-qa-form label { display:grid; gap:6px; font-weight:600; }
.cs-qa-form input,.cs-qa-form textarea { width:100%; box-sizing:border-box; border:1px solid #d5d5d5; border-radius:10px; padding:10px; font:inherit; background:#fff; color:#111; }
.cs-qa-form textarea { min-height:140px; }
.cs-qa-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:640px) { .cs-qa-grid { grid-template-columns:1fr; } .cs-static-page { padding:0 10px; margin-top:12px; } .cs-static-page-card { padding:16px; border-radius:12px; } }
.cs-qa-compose-link { display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; margin:0 8px; border:1px solid #d5d5d5; border-radius:9999px; background:#fff; color:#1565d8; font-size:13px; font-weight:700; text-decoration:none; white-space:nowrap; }
.cs-qa-compose-link:hover { background:#eef4ff; border-color:#1565d8; color:#0f4fa8; text-decoration:none; }

/* Q&A anti-shatter safeguards */
body .cs-qa-page.cs-static-page { display:block !important; width:100% !important; max-width:920px !important; margin:24px auto !important; padding:0 16px !important; box-sizing:border-box !important; }
body .cs-qa-page .cs-static-page-card { width:100% !important; max-width:860px !important; margin-left:auto !important; margin-right:auto !important; box-sizing:border-box !important; overflow-wrap:anywhere !important; }
body .cs-qa-page .cs-qa-form, body .cs-qa-page .cs-qa-list, body .cs-qa-page .cs-qa-answers, body .cs-qa-page .cs-qa-question, body .cs-qa-page .cs-qa-answer { width:100% !important; max-width:100% !important; box-sizing:border-box !important; }
body .cs-qa-page .cs-qa-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px !important; width:100% !important; max-width:100% !important; }
body .cs-qa-page .cs-qa-grid label { min-width:0 !important; }
body .cs-qa-page input, body .cs-qa-page textarea { width:100% !important; max-width:100% !important; box-sizing:border-box !important; }
body .cs-qa-page .cs-qa-meta { min-width:0 !important; }
@media (max-width:640px) { body .cs-qa-page .cs-qa-grid { grid-template-columns:1fr !important; } body .cs-qa-page.cs-static-page { padding:0 10px !important; } }

body .cs-qa-page.cs-static-page { margin-left:auto !important; margin-right:auto !important; }

/* VTU Q&A uses CampusSync home feed width, card, type, spacing (not random forum) */
body .cs-qa-page { max-width:610px !important; margin:0 auto !important; padding:0 !important; }
body .cs-qa-page .cs-static-page-card { max-width:610px !important; border-radius:14px !important; padding:16px !important; background:var(--color-base-100,#fff) !important; border:1px solid var(--color-border,#e3e3e8) !important; box-shadow:none !important; }
body .cs-qa-page .cs-static-page-title { font-size:20px !important; font-weight:700 !important; }
body .cs-qa-page .cs-qa-question { border-radius:14px !important; border:1px solid var(--color-border,#e3e3e8) !important; background:var(--color-base-100,#fff) !important; padding:16px !important; }
body .cs-qa-page .cs-qa-form input, body .cs-qa-page .cs-qa-form textarea { border-radius:12px !important; border:1px solid var(--color-border,#d9d7e0) !important; padding:10px !important; }
body .cs-qa-page .btn-primary { border-radius:9999px !important; padding:10px 18px !important; font-weight:500 !important; }

/* VTU Q&A: no right rail; wider reading column */
body .cs-qa-page { max-width:820px !important; }
body .cs-qa-page .cs-static-page-card { max-width:820px !important; }

/* VTU Q&A filter UI + ask dialog / mobile bottom sheet */
body .cs-qa-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; margin:16px 0 20px; padding:16px; border:1px solid var(--color-border,#e3e3e8); border-radius:14px; background:var(--color-base-200,#f8f9fb); }
body .cs-qa-filters label { display:grid; gap:6px; min-width:0; font-size:13px; font-weight:700; color:var(--color-base-content,#111); }
body .cs-qa-filters select, body .cs-qa-filters button, body .cs-qa-filters a.btn { width:100%; box-sizing:border-box; border-radius:10px; padding:10px; font:inherit; }
body .cs-qa-filters select { background:var(--color-base-100,#fff); color:var(--color-base-content,#111); border:1px solid var(--color-border,#d9d7e0); }
body .cs-qa-filters button { border:1px solid var(--color-primary,#1565d8); background:var(--color-primary,#1565d8); color:#fff; font-weight:700; cursor:pointer; }
body .cs-qa-filters a.btn { text-align:center; border:1px solid var(--color-border,#d9d7e0); background:var(--color-base-100,#fff); color:var(--color-base-content,#111); font-weight:700; text-decoration:none; }
@media (max-width:640px) { body .cs-qa-filters { grid-template-columns:1fr; padding:12px; } }
body .cs-qa-fab { position:fixed; right:22px; bottom:22px; z-index:999; width:56px; height:56px; border-radius:50%; border:none; background:var(--color-primary,#1565d8); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 8px 22px rgba(0,0,0,.18); }
body .cs-qa-fab svg { width:26px; height:26px; fill:currentColor; }
body .cs-qa-dialog { width:min(560px,calc(100vw - 32px)); max-width:560px; border:none; border-radius:18px; padding:0; background:var(--color-base-100,#fff); color:var(--color-base-content,#111); box-shadow:0 24px 60px rgba(0,0,0,.25); }
body .cs-qa-dialog::backdrop { background:rgba(0,0,0,.45); }
body .cs-qa-dialog .cs-qa-form { border-top:none; margin:0; padding:18px; }
body .cs-qa-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
body .cs-qa-close { width:36px; height:36px; border-radius:50%; border:1px solid var(--color-border,#e3e3e8); background:transparent; font-size:24px; cursor:pointer; }
@media (max-width:640px) {
  body .cs-qa-dialog.cs-qa-bottom-sheet { width:100vw; max-width:100vw; margin:auto auto 0; border-radius:18px 18px 0 0; padding-bottom:env(safe-area-inset-bottom); }
  body .cs-qa-fab { right:16px; bottom:76px; }
}

/* Home header professional VTU Q&A entry */
.cs-home-qa-header { display:flex; justify-content:flex-end; margin:0 0 12px; }
.cs-home-qa-link { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:9999px; border:1px solid var(--color-border,#e3e3e8); background:var(--color-base-100,#fff); color:var(--color-base-content,#111); font-weight:700; font-size:13px; text-decoration:none; }
.cs-home-qa-link:hover { border-color:var(--color-primary,#1565d8); color:var(--color-primary,#1565d8); background:var(--color-base-200,#f8f9fb); text-decoration:none; }
.cs-home-qa-link span { font-size:16px; line-height:1; }

/* Desktop <dialog> centered; don't let production *{margin:0} kill native centering */
body .cs-qa-dialog { position:fixed !important; inset:0 !important; margin:auto !important; left:50% !important; top:50% !important; right:auto !important; bottom:auto !important; transform:translate(-50%,-50%) !important; }
@media (max-width:640px) {
  body .cs-qa-dialog.cs-qa-bottom-sheet { inset:auto !important; left:0 !important; right:0 !important; top:auto !important; bottom:0 !important; margin:auto auto 0 !important; transform:none !important; }
}

/* Modern VTU Q&A, still CampusSync home grammar */
body .cs-qa-page .cs-static-page-card { padding:22px !important; border-radius:18px !important; }
body .cs-qa-page .cs-qa-hero { margin:-22px -22px 22px !important; padding:28px 24px !important; border-bottom:none !important; background:linear-gradient(135deg,#f8f9fb 0%,#eef4ff 100%) !important; border-radius:18px 18px 0 0 !important; }
body .cs-qa-page .cs-qa-kicker { display:inline-flex; padding:5px 10px; border-radius:9999px; background:#dbeafe; color:#1565d8 !important; font-size:12px !important; font-weight:700; letter-spacing:.02em; }
body .cs-qa-page .cs-static-page-title { letter-spacing:-.02em; }
body .cs-qa-page .cs-qa-filters { position:sticky; top:12px; z-index:5; background:rgba(248,249,251,.96) !important; backdrop-filter:blur(10px); }
body .cs-qa-page .cs-qa-question { transition:border-color .15s ease, transform .15s ease; }
body .cs-qa-page .cs-qa-question:hover { border-color:#1565d8 !important; transform:translateY(-1px); }
body .cs-qa-page .cs-qa-question h3 a { color:#111; font-weight:700; text-decoration:none; }
body .cs-qa-page .cs-qa-question h3 a:hover { color:#1565d8; }
body .cs-qa-page .cs-qa-meta > * { background:#f1f5f9; color:#475569; }
body .cs-qa-page .cs-qa-answer--accepted { background:linear-gradient(135deg,#f0fdf4,#fff) !important; }
body .cs-qa-page .btn-primary, body .cs-qa-page .cs-qa-add, body .cs-qa-page .cs-qa-fab { background:linear-gradient(180deg,#247cf0,#1565d8) !important; border:none !important; }
body .cs-qa-page :focus-visible { outline:2px solid #1565d8; outline-offset:2px; }
@media (prefers-reduced-motion:reduce){ body .cs-qa-page *{transition:none !important; transform:none !important;} }

/* Professional app UI, not accessibility-page rendering */
body .cs-qa-page { --qa-space-4:4px; --qa-space-8:8px; --qa-space-12:12px; --qa-space-16:16px; --qa-space-24:24px; --qa-ink:#0f172a; --qa-muted:#475569; --qa-line:#e4ecfc; --qa-accent:#2563eb; --qa-accent-2:#0891b2; --qa-success:#137333; --qa-bg:#f8fafc; }
body .cs-qa-page .cs-static-page-card { background:#fff !important; color:var(--qa-ink) !important; border-color:var(--qa-line) !important; }
body .cs-qa-page .cs-qa-hero { background:linear-gradient(135deg,#f8fafc,#eef4ff) !important; }
body .cs-qa-page .cs-qa-kicker { background:#dbeafe !important; color:var(--qa-accent) !important; }
body .cs-qa-page .cs-static-page-sub, body .cs-qa-page .cs-qa-meta { color:var(--qa-muted) !important; }
body .cs-qa-page .cs-qa-filters { background:rgba(248,250,252,.96) !important; border-color:var(--qa-line) !important; border-radius:14px !important; }
body .cs-qa-page .cs-qa-filters select, body .cs-qa-page .cs-qa-filters button, body .cs-qa-page .cs-qa-filters a.btn { min-height:44px !important; }
body .cs-qa-page .cs-qa-filters button, body .cs-qa-page .btn-primary, body .cs-qa-page .cs-qa-add, body .cs-qa-page .cs-qa-fab { background:linear-gradient(180deg,#3b82f6,#2563eb) !important; border-color:#2563eb !important; color:#fff !important; }
body .cs-qa-page .cs-qa-question h3 a { color:var(--qa-ink) !important; }
body .cs-qa-page .cs-qa-question h3 a:hover { color:var(--qa-accent) !important; }
body .cs-qa-page .cs-qa-meta > * { background:#f1f5f9 !important; color:#475569 !important; }
body .cs-qa-page .cs-qa-answer--accepted strong, body .cs-qa-page .cs-qa-meta strong { color:var(--qa-success) !important; background:#e8f5e9 !important; }
body .cs-qa-page .cs-qa-close { min-width:44px !important; min-height:44px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; }
body .cs-qa-page .cs-qa-close svg { width:18px; height:18px; fill:currentColor; }
body .cs-qa-page .cs-qa-add { min-height:44px !important; }
body .cs-qa-page button, body .cs-qa-page .btn { min-height:44px !important; cursor:pointer !important; }

/* Question titles are feed items, not giant headings */
body .cs-qa-page .cs-qa-question h3 { font-size:16px !important; line-height:1.35 !important; font-weight:700 !important; margin:0 0 8px !important; letter-spacing:-.01em !important; }
body .cs-qa-page .cs-qa-question h3 a { font-size:16px !important; line-height:1.35 !important; }

/* Filters belong outside question cards */
body .cs-qa-page .cs-qa-question .cs-qa-filters, body .cs-qa-page .cs-qa-question form.cs-qa-filters { display:none !important; }
