/* ==========================================================================
   Student Social Network — design tokens
   Palette: deep academic navy + campus gold seal + cool paper + quiet teal
   Type: Fraunces (display) / Inter (UI+body) / JetBrains Mono (meta/handles)
   ========================================================================== */
:root{
	--ssn-navy: #16223F;
	--ssn-navy-2: #1E2E52;
	--ssn-ink: #10162B;
	--ssn-paper: #F5F6FA;
	--ssn-card: #FFFFFF;
	--ssn-line: #E3E6EF;
	--ssn-muted: #6B7288;
	--ssn-gold: #D4A72C;
	--ssn-gold-2: #B98D18;
	--ssn-teal: #2F7A6D;
	--ssn-danger: #C4432E;
	--ssn-success: #2F7A48;
	--ssn-radius: 14px;
	--ssn-font-display: 'Fraunces', Georgia, serif;
	--ssn-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--ssn-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

.ssn-root, .ssn-root *{ box-sizing: border-box; }
.ssn-root{
	font-family: var(--ssn-font-body);
	color: var(--ssn-ink);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.ssn-root button{ font-family: inherit; }
.ssn-root svg{ width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* Seal signature element ------------------------------------------------ */
.ssn-seal{ width: 56px; height: 56px; margin: 0 auto 14px; }
.ssn-seal svg{ width: 100%; height: 100%; }
.ssn-seal polygon{ fill: var(--ssn-navy); stroke: var(--ssn-gold); stroke-width: 3; }
.ssn-seal-check{ stroke: var(--ssn-gold); }
.ssn-seal-muted polygon{ fill: #cfd4e2; stroke: #b7bdd0; }
.ssn-seal-sm{ width: 30px; height: 30px; margin: 0; }

.ssn-verified-badge{ display: inline-flex; width: 17px; height: 17px; border-radius: 4px; background: linear-gradient(135deg, var(--ssn-gold), var(--ssn-gold-2)); align-items:center; justify-content:center; flex: 0 0 auto; }
.ssn-verified-badge svg{ width: 12px; height: 12px; fill: var(--ssn-navy); }
.ssn-admin-badge{ font-family: var(--ssn-font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; background: var(--ssn-navy); color: var(--ssn-gold); padding: 2px 7px; border-radius: 20px; }

/* Buttons ---------------------------------------------------------------- */
.ssn-btn{ border: none; border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .1s ease, background .15s ease; white-space: nowrap; flex-shrink: 0; }
.ssn-btn:active{ transform: scale(.97); }
.ssn-btn-primary{ background: var(--ssn-navy); color: #fff; }
.ssn-btn-primary:hover{ background: var(--ssn-navy-2); }
.ssn-btn-ghost{ background: transparent; border: 1px solid var(--ssn-line); color: var(--ssn-ink); width: 100%; margin: 14px 0; }
.ssn-btn-sm{ padding: 6px 14px; font-size: 13px; }
.ssn-btn-outline{ background:#fff; border:1.5px solid var(--ssn-navy); color: var(--ssn-navy); }
.ssn-btn-outline.is-following{ background: var(--ssn-navy); color:#fff; }
.ssn-link-btn{ background:none; border:none; color: var(--ssn-teal); font-size: 13px; cursor:pointer; text-decoration: underline; padding: 6px 0; }

/* Alerts ------------------------------------------------------------------*/
.ssn-alert{ border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.ssn-alert-success{ background: #E7F4EC; color: var(--ssn-success); }
.ssn-alert-error{ background: #FBEAE6; color: var(--ssn-danger); }

/* ==========================================================================
   Auth page
   ========================================================================== */
.ssn-auth-page{ min-height: 100vh; background: linear-gradient(180deg, var(--ssn-navy) 0%, var(--ssn-navy) 320px, var(--ssn-paper) 320px); display:flex; align-items:center; justify-content:center; padding: 60px 20px; }
.ssn-auth-wrap{ width: 100%; max-width: 420px; }
.ssn-auth-brand{ text-align:center; color:#fff; margin-bottom: 26px; }
.ssn-auth-brand h1{ font-family: var(--ssn-font-display); font-weight: 600; font-size: 30px; margin: 0 0 6px; }
.ssn-tagline{ color: #C7CEE0; font-size: 14px; margin:0 0 14px; }
.ssn-auth-card{ background: var(--ssn-card); border-radius: var(--ssn-radius); box-shadow: 0 20px 50px rgba(16,22,43,.18); padding: 26px; }
.ssn-tabs{ display:flex; gap: 6px; background: var(--ssn-paper); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.ssn-tab{ flex:1; border:none; background:none; padding: 9px 0; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--ssn-muted); cursor:pointer; }
.ssn-tab.is-active{ background: var(--ssn-navy); color: #fff; }
.ssn-panel{ display:none; flex-direction:column; gap: 12px; }
.ssn-panel.is-active{ display:flex; }
.ssn-panel label{ font-size: 12.5px; font-weight:600; color: var(--ssn-muted); display:flex; flex-direction:column; gap: 6px; }
.ssn-panel label.ssn-checkbox-label{ flex-direction:row; align-items:flex-start; gap:8px; font-weight:500; }
.ssn-panel label.ssn-checkbox-label input{ margin-top:2px; flex-shrink:0; }
.ssn-panel label.ssn-checkbox-label span{ line-height:1.4; }
.ssn-panel input, .ssn-panel textarea{ font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--ssn-line); color: var(--ssn-ink); }
.ssn-panel input:focus, .ssn-panel textarea:focus{ outline: 2px solid var(--ssn-teal); outline-offset: 1px; border-color: var(--ssn-teal); }
.ssn-fineprint{ font-size: 12px; color: var(--ssn-muted); text-align:center; margin: 4px 0 0; }

.ssn-status-page{ min-height: 100vh; background: var(--ssn-paper); display:flex; align-items:center; justify-content:center; padding: 40px 20px; }
.ssn-status-card{ background:#fff; border-radius: var(--ssn-radius); box-shadow: 0 10px 30px rgba(16,22,43,.08); padding: 36px; max-width: 460px; text-align:center; }
.ssn-status-card h2{ font-family: var(--ssn-font-display); margin: 0 0 10px; }
.ssn-status-card-danger{ border-top: 4px solid var(--ssn-danger); }

/* ==========================================================================
   App shell — Facebook-style: persistent top bar + 3 column body
   ========================================================================== */
.ssn-topbar{ display:flex; align-items:center; gap: 14px; padding: 10px 22px; background: var(--ssn-card); border-bottom: 1px solid var(--ssn-line); position: sticky; top: 0; z-index: 40; }
.ssn-topbar-left{ display:flex; align-items:center; gap: 10px; flex-shrink:0; }
.ssn-topbar-brand-name{ font-family: var(--ssn-font-display); font-weight:600; font-size: 17px; color: var(--ssn-navy); white-space:nowrap; }
.ssn-topbar-search{ display:flex; align-items:center; gap:8px; background: var(--ssn-paper); border:none; border-radius:999px; padding: 9px 16px; color: var(--ssn-muted); font-size: 13.5px; cursor:pointer; flex: 0 1 260px; min-width: 0; }
.ssn-topbar-search span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ssn-topbar-search svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; flex-shrink:0; }
.ssn-topbar-search:hover{ background:#ECEEF5; }

.ssn-topbar-icons{ display:flex; align-items:center; gap: 4px; margin-left:auto; }
.ssn-topbar-icons .ssn-nav-link{ display:flex; flex-direction:column; align-items:center; gap: 2px; border:none; background:none; cursor:pointer; text-decoration:none; color: var(--ssn-muted); font-size: 11px; font-weight:600; padding: 7px 14px; border-radius: 10px; position:relative; }
.ssn-topbar-icons .ssn-nav-link:hover{ background: var(--ssn-paper); }
.ssn-topbar-icons .ssn-nav-link.is-active{ color: var(--ssn-navy); }
.ssn-topbar-icons .ssn-nav-link.is-active svg{ stroke: var(--ssn-navy); }
.ssn-topbar-icons .ssn-nav-link svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.ssn-topbar-avatar{ width: 24px; height: 24px; border-radius:50%; object-fit:cover; }
.ssn-profile-nav-btn.is-active .ssn-topbar-avatar{ box-shadow: 0 0 0 2px var(--ssn-gold); }

.ssn-topbar-action{ display:flex; align-items:center; justify-content:center; width: 38px; height: 38px; border-radius:50%; border:none; background:none; color: var(--ssn-muted); cursor:pointer; text-decoration:none; flex-shrink:0; position:relative; }
.ssn-topbar-action .ssn-badge{ position:absolute; top:2px; right:2px; margin-left:0; font-size:10px; padding:0 5px; }
.ssn-topbar-action:hover{ background: var(--ssn-paper); color: var(--ssn-navy); }
.ssn-topbar-action svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; }

.ssn-body{ display:grid; grid-template-columns: 260px minmax(0,600px) 300px; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; align-items:start; }

.ssn-left-col{ position: sticky; top: 76px; display:flex; flex-direction:column; gap: 14px; }
.ssn-me-card-mini{ display:flex; align-items:center; gap:10px; text-align:left; }
.ssn-me-card-mini .ssn-me-name{ justify-content:flex-start; margin-top:0; font-size:14.5px; }
.ssn-me-card-mini .ssn-me-handle{ margin-bottom:4px; }
.ssn-me-card-mini .ssn-me-stats{ justify-content:flex-start; gap:12px; }
.ssn-left-links{ display:flex; flex-direction:column; gap: 2px; }
.ssn-left-links .ssn-nav-link{ display:flex; align-items:center; gap: 12px; text-decoration:none; border:none; background:none; text-align:left; font-size: 14.5px; font-weight: 600; color: var(--ssn-ink); padding: 10px 12px; border-radius: 999px; cursor:pointer; position: relative; }
.ssn-left-links .ssn-nav-link:hover{ background: #EAECF4; }
.ssn-left-links .ssn-nav-link.is-active{ color: var(--ssn-navy); background: #E8E2CE33; }
.ssn-left-links .ssn-nav-link svg{ width:22px; height:22px; fill:none; stroke: currentColor; stroke-width: 1.8; }

.ssn-badge{ background: var(--ssn-danger); color:#fff; font-size: 11px; font-weight:700; border-radius: 999px; padding: 1px 6px; margin-left: auto; }
.ssn-topbar-icons .ssn-badge, .ssn-bottombar .ssn-badge{ position:absolute; top:2px; right:8px; margin-left:0; font-size:10px; padding: 0 5px; }

.ssn-bottombar{ display:none; }

.ssn-main{ min-width:0; background: var(--ssn-card); border: 1px solid var(--ssn-line); border-radius: var(--ssn-radius); overflow: hidden; }
.ssn-view{ display:none; }
.ssn-view.is-active{ display:block; }
.ssn-view-header{ padding: 16px 20px; border-bottom: 1px solid var(--ssn-line); }
.ssn-view-header h2{ font-family: var(--ssn-font-display); font-size: 20px; margin:0; }

.ssn-composer{ display:flex; gap: 12px; padding: 18px 20px; border-bottom: 8px solid var(--ssn-paper); }
.ssn-composer-body{ flex:1; display:flex; flex-direction:column; gap: 10px; }
.ssn-composer textarea{ width:100%; border:none; resize:none; min-height: 56px; font-size: 16px; font-family: inherit; }
.ssn-composer textarea:focus{ outline:none; }
.ssn-composer-preview{ position:relative; max-width: 260px; }
.ssn-composer-preview img{ width:100%; border-radius: 12px; display:block; }
.ssn-remove-image{ position:absolute; top:6px; right:6px; background: rgba(16,22,43,.7); color:#fff; border:none; border-radius:50%; width:24px; height:24px; cursor:pointer; }
.ssn-composer-actions{ display:flex; align-items:center; justify-content:space-between; }
.ssn-icon-btn{ color: var(--ssn-teal); cursor:pointer; display:inline-flex; }
.ssn-icon-btn svg{ fill:none; stroke: currentColor; stroke-width: 1.6; }

.ssn-avatar{ width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--ssn-line); flex: 0 0 auto; }
.ssn-avatar-lg{ width: 64px; height: 64px; }

.ssn-feed-list{ }
.ssn-post{ display:flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ssn-line); }
.ssn-post-body{ flex:1; min-width:0; }
.ssn-post-head{ display:flex; align-items:center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.ssn-post-avatar{ cursor:pointer; }
.ssn-post-name{ font-weight: 700; cursor:pointer; }
.ssn-post-name:hover, .ssn-post-handle:hover{ text-decoration:underline; }
.ssn-post-handle, .ssn-post-time{ color: var(--ssn-muted); font-family: var(--ssn-font-mono); font-size: 12.5px; }
.ssn-post-handle{ cursor:pointer; }
.ssn-post-dot{ color: var(--ssn-muted); }
.ssn-post-content{ margin: 4px 0 8px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.ssn-post-image{ max-width:100%; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--ssn-line); }
.ssn-post-actions{ display:flex; gap: 26px; }
.ssn-post-action{ display:flex; align-items:center; gap: 6px; background:none; border:none; color: var(--ssn-muted); cursor:pointer; font-size: 13px; padding: 4px; }
.ssn-post-action svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.ssn-like-btn.is-liked{ color: var(--ssn-danger); }
.ssn-like-btn.is-liked svg{ fill: var(--ssn-danger); stroke: var(--ssn-danger); }
.ssn-pin-btn.is-pinned{ color: var(--ssn-gold-2); }
.ssn-pin-btn.is-pinned svg{ fill: var(--ssn-gold); stroke: var(--ssn-gold-2); }
.ssn-delete-btn:hover{ color: var(--ssn-danger); }
.ssn-post.is-admin-post{ background: linear-gradient(180deg, #FBF6E6, transparent 60%); }
.ssn-post-pinned-row{ display:flex; align-items:center; gap:6px; color: var(--ssn-gold-2); font-size: 12px; font-weight:700; margin-bottom: 4px; }
.ssn-post-pinned-row svg{ width:13px; height:13px; fill: var(--ssn-gold); }

/* Shared post embed (Twitter-style "quote share" card) */
.ssn-shared-post-embed{ border: 1px solid var(--ssn-line); border-radius: 12px; padding: 12px 14px; margin: 6px 0 10px; }
.ssn-shared-post-head{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ssn-shared-post-head .ssn-avatar{ width:26px; height:26px; }
.ssn-shared-post-headtext{ display:flex; align-items:center; gap:5px; flex-wrap:wrap; font-size:13px; }
.ssn-shared-post-name{ font-weight:700; }
.ssn-shared-post-time{ color: var(--ssn-muted); font-size:12px; }
.ssn-shared-post-time::before{ content:'· '; }
.ssn-shared-post-content{ font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.ssn-shared-post-image{ max-width:100%; border-radius:10px; margin-top:8px; display:block; }
.ssn-shared-post-missing{ color: var(--ssn-muted); font-size: 13px; font-style: italic; }
.ssn-share-btn.is-shared{ color: var(--ssn-teal); }
.ssn-share-btn svg{ fill:none; stroke:currentColor; stroke-width:1.7; }

.ssn-comments{ margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ssn-line); display:flex; flex-direction:column; gap:10px; }
.ssn-comment{ display:flex; gap:8px; font-size: 13.5px; }
.ssn-comment-author{ font-weight:700; margin-right:4px; }
.ssn-comment-form{ display:flex; gap: 8px; }
.ssn-comment-form input{ flex:1; border:1px solid var(--ssn-line); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; }

/* Profile view */
.ssn-profile-cover{ height: 160px; background: linear-gradient(120deg, var(--ssn-navy), var(--ssn-navy-2)); background-size: cover; background-position:center; position:relative; }
.ssn-cover-edit-btn{ position:absolute; right:14px; bottom:14px; width:36px; height:36px; border-radius:50%; background: rgba(16,22,43,.55); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; backdrop-filter: blur(2px); }
.ssn-cover-edit-btn:hover{ background: rgba(16,22,43,.75); }
.ssn-cover-edit-btn svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.ssn-profile-head{ padding: 0 20px 16px; }
.ssn-profile-avatar-wrap{ position:relative; width: 88px; margin-top: -44px; }
.ssn-profile-head .ssn-avatar-lg{ width: 88px; height:88px; border: 4px solid #fff; margin-top: 0; display:block; }
.ssn-avatar-edit-btn{ position:absolute; right:-2px; bottom:-2px; width:28px; height:28px; border-radius:50%; background: var(--ssn-navy); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; border:2px solid #fff; }
.ssn-avatar-edit-btn:hover{ background: var(--ssn-navy-2); }
.ssn-avatar-edit-btn svg{ width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2; }
.ssn-profile-name-row{ display:flex; align-items:center; gap:8px; margin-top:10px; font-family: var(--ssn-font-display); font-size: 21px; font-weight:600; }
.ssn-profile-handle{ color: var(--ssn-muted); font-family: var(--ssn-font-mono); font-size: 13px; }
.ssn-profile-bio{ margin: 10px 0; font-size: 14.5px; }
.ssn-profile-interests{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom: 10px; }
.ssn-interest-tag{ background: var(--ssn-paper); color: var(--ssn-navy); font-size:12px; font-weight:600; padding: 4px 11px; border-radius: 999px; }
.ssn-profile-meta{ display:flex; gap:16px; flex-wrap:wrap; color: var(--ssn-muted); font-size: 13px; margin-bottom: 10px; }
.ssn-profile-meta span{ display:inline-flex; align-items:center; gap:5px; }
.ssn-meta-icon{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.7; flex-shrink:0; }
.ssn-profile-link{ color: var(--ssn-teal); text-decoration:none; font-weight:600; }
.ssn-profile-link:hover{ text-decoration:underline; }
.ssn-profile-stats{ display:flex; gap:18px; font-size: 13.5px; margin-bottom: 12px; }
.ssn-profile-actions{ display:flex; gap:10px; margin-bottom: 10px; }
.ssn-btn-icon{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; margin-right:2px; vertical-align:-2px; }
.ssn-btn-outline.is-friend{ background: #E7F4EC; border-color: var(--ssn-success); color: var(--ssn-success); }

.ssn-locked-notice{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding: 40px 24px; color: var(--ssn-muted); }
.ssn-locked-notice svg{ width:34px; height:34px; fill:none; stroke: var(--ssn-muted); stroke-width:1.5; }
.ssn-locked-notice p{ margin:0; font-size: 14px; max-width: 320px; }

.ssn-friend-req-list{ display:flex; flex-direction:column; gap:4px; max-height: 60vh; overflow-y:auto; }
.ssn-friend-req-row{ display:flex; align-items:center; gap:10px; padding: 10px 4px; border-bottom: 1px solid var(--ssn-line); }
.ssn-friend-req-row:last-child{ border-bottom:none; }
.ssn-friend-req-info{ flex:1; min-width:0; display:flex; flex-direction:column; cursor:pointer; }
.ssn-friend-req-info span{ color: var(--ssn-muted); font-size:12px; }
.ssn-friend-req-row img{ cursor:pointer; }

/* Messages */
.ssn-messages-wrap{ display:grid; grid-template-columns: 260px 1fr; height: min(70vh, 640px); min-height: 420px; }
.ssn-conversations{ border-right: 1px solid var(--ssn-line); overflow-y:auto; }
.ssn-user-search{ padding: 10px 14px; position:relative; }
.ssn-user-search input{ width:100%; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--ssn-line); font-size: 13.5px; }
.ssn-search-results{ position:absolute; left:14px; right:14px; background:#fff; border:1px solid var(--ssn-line); border-radius: 10px; box-shadow: 0 8px 20px rgba(16,22,43,.12); z-index: 5; max-height: 260px; overflow-y:auto; }
.ssn-search-result-item{ display:flex; align-items:center; gap:8px; padding: 8px 12px; cursor:pointer; font-size: 13.5px; }
.ssn-search-result-item:hover{ background: var(--ssn-paper); }
.ssn-conversation-item{ display:flex; gap:10px; align-items:center; padding: 10px 14px; cursor:pointer; border-bottom: 1px solid var(--ssn-line); }
.ssn-conversation-item:hover, .ssn-conversation-item.is-active{ background: var(--ssn-paper); }
.ssn-conversation-info{ min-width:0; }
.ssn-conversation-name{ font-weight:600; font-size:13.5px; display:flex; align-items:center; gap:4px; }
.ssn-conversation-last{ font-size:12.5px; color: var(--ssn-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ssn-chat-window{ display:flex; flex-direction:column; min-height:0; height:100%; }
.ssn-chat-empty{ margin:auto; color: var(--ssn-muted); font-size: 14px; text-align:center; padding: 24px; }
.ssn-chat-active{ display:flex; flex-direction:column; height:100%; min-height:0; }
.ssn-chat-header{ padding: 12px 16px; border-bottom: 1px solid var(--ssn-line); font-weight:700; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.ssn-chat-messages{ flex:1; min-height:0; overflow-y:auto; padding: 14px 16px; display:flex; flex-direction:column; gap:8px; }
.ssn-msg{ max-width: 70%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; overflow-wrap: break-word; }
.ssn-msg-them{ background: var(--ssn-paper); align-self:flex-start; }
.ssn-msg-mine{ background: var(--ssn-navy); color:#fff; align-self:flex-end; }
.ssn-chat-input{ display:flex; gap:8px; padding: 12px 16px; border-top:1px solid var(--ssn-line); flex-shrink:0; }
.ssn-chat-input input{ flex:1; min-width:0; border:1.5px solid var(--ssn-line); border-radius: 999px; padding: 9px 14px; font-size: 13.5px; }
.ssn-chat-input .ssn-btn{ flex-shrink:0; }

/* Sidebar */
.ssn-sidebar{ position: sticky; top: 76px; display:flex; flex-direction:column; gap: 16px; }
.ssn-card{ background: var(--ssn-card); border: 1px solid var(--ssn-line); border-radius: var(--ssn-radius); padding: 16px; }
.ssn-me-card{ text-align:center; }
.ssn-me-name{ margin-top: 8px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:6px; }
.ssn-me-handle{ color: var(--ssn-muted); font-family: var(--ssn-font-mono); font-size: 12.5px; margin-bottom: 10px; }
.ssn-me-stats{ display:flex; justify-content:center; gap:16px; font-size: 12.5px; color: var(--ssn-muted); }
.ssn-footer-note{ font-size: 12px; color: var(--ssn-muted); }

/* Ads */
.ssn-ad-slot{ padding: 10px; }
.ssn-ad{ display:flex; flex-direction:column; text-decoration:none; color: var(--ssn-ink); gap:8px; }
.ssn-ad-label{ font-family: var(--ssn-font-mono); font-size: 10px; text-transform:uppercase; letter-spacing:.06em; color: var(--ssn-muted); }
.ssn-ad img{ width:100%; border-radius: 10px; display:block; }
.ssn-ad-title{ font-size: 13.5px; font-weight:600; }
.ssn-ad-divider{ margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ssn-line); }
.ssn-ad-code-container{ max-width: 100%; overflow: hidden; }
.ssn-ad-code-container > *{ max-width: 100%; }
.ssn-ad-banner-code{ flex: 1; min-width:0; max-width: 100%; overflow: hidden; display:flex; justify-content:center; }
.ssn-ad-banner-code > *{ max-width: 100%; }
.ssn-feed-ad{ margin: 0; padding: 16px 20px; border-bottom: 8px solid var(--ssn-paper); background:#FBFAF5; }
.ssn-feed-ad .ssn-ad{ flex-direction: row; align-items:center; }
.ssn-feed-ad .ssn-ad img{ width: 90px; height: 90px; object-fit:cover; }

.ssn-ad-banner-slot{ display:none; align-items:center; gap:14px; max-width: 1280px; margin: 0 auto; padding: 10px 16px; position:relative; }
.ssn-ad-banner-slot.is-visible{ display:flex; }
.ssn-ad-banner-label{ font-family: var(--ssn-font-mono); font-size: 10px; text-transform:uppercase; letter-spacing:.06em; color: var(--ssn-muted); flex-shrink:0; }
.ssn-ad-banner-link{ display:flex; align-items:center; gap:12px; flex:1; min-width:0; text-decoration:none; color: var(--ssn-ink); background: #FBFAF5; border:1px solid var(--ssn-line); border-radius: 12px; padding: 8px 14px; }
.ssn-ad-banner-link img{ width: 44px; height: 44px; border-radius: 8px; object-fit:cover; flex-shrink:0; }
.ssn-ad-banner-link span{ font-size: 13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ssn-ad-banner-close{ background:none; border:none; color: var(--ssn-muted); font-size:20px; cursor:pointer; padding: 0 4px; flex-shrink:0; }

/* Modal */
.ssn-modal{ position: fixed; inset:0; z-index: 100; display:flex; align-items:center; justify-content:center; padding: 20px; }
.ssn-modal[hidden]{ display:none; }
.ssn-modal-backdrop{ position:absolute; inset:0; background: rgba(16,22,43,.5); }
.ssn-modal-body{ position:relative; background:#fff; border-radius: var(--ssn-radius); padding: 24px; max-width: 380px; width: 90%; max-height: 85vh; overflow-y:auto; }
.ssn-modal-body-lg{ max-width: 560px; }
.ssn-modal-body h3{ font-family: var(--ssn-font-display); margin: 0 0 16px; font-size: 20px; }
.ssn-edit-profile-form{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ssn-edit-field{ display:flex; flex-direction:column; gap:5px; }
.ssn-edit-field-full{ grid-column: 1 / -1; }
.ssn-edit-field label{ font-size:12.5px; font-weight:600; color: var(--ssn-muted); display:flex; justify-content:space-between; }
.ssn-edit-field input, .ssn-edit-field textarea{ border:1.5px solid var(--ssn-line); border-radius:9px; padding: 9px 11px; font-family: inherit; font-size: 14px; color: var(--ssn-ink); }
.ssn-edit-field input:focus, .ssn-edit-field textarea:focus{ outline:2px solid var(--ssn-teal); outline-offset:1px; border-color: var(--ssn-teal); }
.ssn-edit-field textarea{ resize:vertical; }
.ssn-edit-counter{ font-weight:400; color: var(--ssn-muted); }
.ssn-edit-profile-footer{ grid-column: 1/-1; display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top: 4px; }
.ssn-edit-profile-status{ margin-right:auto; font-size: 12.5px; color: var(--ssn-muted); }
.ssn-modal-close{ position:absolute; top:10px; right:14px; background:none; border:none; font-size:20px; cursor:pointer; }

/* ==========================================================================
   Find Students (search + recommendations)
   ========================================================================== */
.ssn-find-students-search{ display:flex; align-items:center; gap:8px; background: var(--ssn-paper); border-radius:999px; padding:10px 16px; margin-bottom:14px; }
.ssn-find-students-search svg{ width:16px; height:16px; fill:none; stroke: var(--ssn-muted); stroke-width:2; flex-shrink:0; }
.ssn-find-students-search input{ border:none; background:none; outline:none; font-size:14px; width:100%; color: var(--ssn-ink); }
.ssn-find-students-list{ display:flex; flex-direction:column; max-height: 55vh; overflow-y:auto; margin: 0 -8px; }
.ssn-student-row{ display:flex; align-items:center; gap:12px; padding:10px 8px; border-bottom:1px solid var(--ssn-line); }
.ssn-student-row:last-child{ border-bottom:none; }
.ssn-student-row-avatar{ cursor:pointer; }
.ssn-student-row-info{ flex:1; min-width:0; cursor:pointer; }
.ssn-student-row-name{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:2px; }
.ssn-student-row-meta{ font-size:12px; color: var(--ssn-muted); margin-top:1px; }
.ssn-student-row-actions{ display:flex; gap:8px; flex-shrink:0; }
.ssn-student-row-actions .is-friend{ background: #E7F4EC; border-color: var(--ssn-success); color: var(--ssn-success); }

/* ==========================================================================
   Groups
   ========================================================================== */
.ssn-empty-note{ padding: 24px 20px; color: var(--ssn-muted); font-size: 14px; }
.ssn-subheading{ font-family: var(--ssn-font-display); font-size: 14.5px; font-weight:600; margin: 0 0 10px; color: var(--ssn-ink); }

/* Top-level Discover / My Groups switcher */
.ssn-groups-tabs{ display:flex; gap:6px; background: var(--ssn-paper); border-radius:999px; padding:4px; margin: 0 20px 14px; }
.ssn-groups-tabs .ssn-tab{ flex:1; border:none; background:none; padding:9px 0; border-radius:999px; font-weight:600; font-size:13.5px; color: var(--ssn-muted); cursor:pointer; }
.ssn-groups-tabs .ssn-tab.is-active{ background: var(--ssn-navy); color:#fff; }

/* Group cards (Discover / My Groups list) */
.ssn-groups-list{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:14px; padding: 4px 20px 20px; }
.ssn-group-card{ border:1px solid var(--ssn-line); border-radius: 12px; overflow:hidden; background:#fff; display:flex; flex-direction:column; }
.ssn-group-card-cover{ height: 84px; background: linear-gradient(120deg, var(--ssn-navy), var(--ssn-navy-2)); background-size:cover; background-position:center; cursor:pointer; }
.ssn-group-card-body{ padding: 12px 14px 14px; display:flex; flex-direction:column; gap:4px; flex:1; }
.ssn-group-card-name{ font-weight:700; font-size:14.5px; cursor:pointer; }
.ssn-group-card-name:hover{ text-decoration:underline; }
.ssn-group-card-meta{ font-size:12px; color: var(--ssn-muted); }
.ssn-group-privacy-badge{ white-space:nowrap; }
.ssn-group-card-desc{ font-size:12.5px; color: var(--ssn-muted); flex:1; min-height: 16px; }
.ssn-group-card-actions{ margin-top:6px; }
.ssn-group-card-actions .ssn-btn{ width:100%; }

/* Group detail header */
.ssn-group-back{ display:inline-block; margin: 14px 20px 6px; }
.ssn-group-cover{ height: 150px; margin: 0 20px; border-radius: 12px; background: linear-gradient(120deg, var(--ssn-navy), var(--ssn-navy-2)); background-size:cover; background-position:center; }
.ssn-group-detail-head{ padding: 14px 20px 0; }
.ssn-group-detail-name{ font-family: var(--ssn-font-display); font-size: 22px; font-weight:600; }
.ssn-group-detail-meta{ font-size:13px; color: var(--ssn-muted); margin-top:4px; }
.ssn-group-detail-desc{ font-size:14px; margin-top:8px; }
.ssn-group-detail-actions{ display:flex; flex-wrap:wrap; gap:8px; margin: 12px 0; }

/* In-group sub tabs (Posts / Events / Files / Members / About) */
.ssn-group-tabs{ display:flex; gap:2px; padding: 0 20px; border-bottom: 1px solid var(--ssn-line); overflow-x:auto; }
.ssn-group-tabs .ssn-tab{ border:none; background:none; padding: 12px 14px; font-weight:600; font-size:13.5px; color: var(--ssn-muted); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.ssn-group-tabs .ssn-tab.is-active{ color: var(--ssn-navy); border-bottom-color: var(--ssn-gold); }
.ssn-group-tab-content{ min-height: 200px; }
.ssn-group-tab-actions{ padding: 16px 20px 0; }

/* Discussion channel chips */
.ssn-group-channels{ display:flex; gap:8px; flex-wrap:wrap; padding: 16px 20px 0; }
.ssn-channel-chip{ border:1.5px solid var(--ssn-line); background:#fff; color: var(--ssn-ink); border-radius:999px; padding:6px 14px; font-size:12.5px; font-weight:600; cursor:pointer; }
.ssn-channel-chip.is-active{ background: var(--ssn-navy); border-color: var(--ssn-navy); color:#fff; }
.ssn-channel-chip-add{ border-style:dashed; color: var(--ssn-muted); }
.ssn-announcement-check{ display:flex; align-items:center; gap:6px; font-size:12.5px; color: var(--ssn-muted); font-weight:600; }
.ssn-announcement-badge{ font-family: var(--ssn-font-mono); font-size: 10px; letter-spacing:.04em; text-transform:uppercase; background: var(--ssn-gold); color: var(--ssn-navy); padding: 2px 7px; border-radius: 20px; }

/* Events */
.ssn-events-list{ display:flex; flex-direction:column; gap:12px; padding: 16px 20px; }
.ssn-event-card{ border:1px solid var(--ssn-line); border-radius:12px; padding:14px 16px; }
.ssn-event-card.is-past{ opacity:.6; }
.ssn-event-date{ font-family: var(--ssn-font-mono); font-size:12px; color: var(--ssn-teal); font-weight:600; }
.ssn-event-title{ font-family: var(--ssn-font-display); font-size:16px; font-weight:600; margin-top:2px; }
.ssn-event-location, .ssn-event-desc{ font-size:13px; color: var(--ssn-muted); margin-top:4px; }
.ssn-event-going{ font-size:12.5px; color: var(--ssn-muted); margin-top:8px; }
.ssn-event-actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

/* Files */
.ssn-files-list{ display:flex; flex-direction:column; padding: 16px 20px; }
.ssn-file-row{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--ssn-line); }
.ssn-file-row:last-child{ border-bottom:none; }
.ssn-file-icon{ width:26px; height:26px; fill:none; stroke: var(--ssn-muted); stroke-width:1.5; flex-shrink:0; }
.ssn-file-info{ flex:1; min-width:0; display:flex; flex-direction:column; }
.ssn-file-info a{ font-weight:600; font-size:13.5px; color: var(--ssn-ink); text-decoration:none; word-break:break-word; }
.ssn-file-info a:hover{ text-decoration:underline; }
.ssn-file-info span{ font-size:12px; color: var(--ssn-muted); }
.ssn-icon-btn-plain{ background:none; border:none; color: var(--ssn-muted); cursor:pointer; flex-shrink:0; padding:4px; }
.ssn-icon-btn-plain:hover{ color: var(--ssn-danger); }
.ssn-icon-btn-plain svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; }

/* Members */
.ssn-members-list{ display:flex; flex-direction:column; padding: 8px 20px 20px; }
.ssn-member-row{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--ssn-line); }
.ssn-member-row:last-child{ border-bottom:none; }
.ssn-member-info{ flex:1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:4px; cursor:pointer; }
.ssn-member-info strong{ font-size:13.5px; }
.ssn-member-info span{ width:100%; font-size:12px; color: var(--ssn-muted); }
.ssn-member-controls{ display:flex; gap:10px; flex-shrink:0; }
.ssn-role-badge{ font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:2px 8px; border-radius:999px; }
.ssn-role-owner{ background: linear-gradient(135deg, var(--ssn-gold), var(--ssn-gold-2)); color: var(--ssn-navy); }
.ssn-role-mod{ background: var(--ssn-paper); color: var(--ssn-teal); }

/* About tab */
.ssn-about-section{ padding: 16px 20px; border-bottom: 1px solid var(--ssn-line); font-size:14px; line-height:1.6; }
.ssn-about-section:last-child{ border-bottom:none; }

/* Group / event / channel forms */
.ssn-privacy-toggle{ display:flex; flex-direction:column; gap:8px; }
.ssn-privacy-toggle label{ display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:500; color: var(--ssn-ink); cursor:pointer; }

/* Responsive */

/* Large desktop: full 3-column layout (already the default above) */

/* Medium desktop / small laptop: ads move from a side column to a full-width strip below the feed */
@media (max-width: 1150px){
	.ssn-body{ grid-template-columns: 240px minmax(0,1fr); }
	.ssn-sidebar{ grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; gap: 14px; }
	.ssn-sidebar .ssn-card{ flex: 1 1 220px; }
}

/* Tablets: drop the left shortcuts column too, topbar stays full */
@media (max-width: 900px){
	.ssn-body{ grid-template-columns: minmax(0,1fr); padding: 16px 12px 40px; }
	.ssn-left-col{ display:none; }
	.ssn-topbar-search span{ display:none; }
	.ssn-topbar-search{ flex: 0 0 auto; padding: 9px; }
	.ssn-topbar-search svg{ width:18px; height:18px; }
}

/* Phones: the bottom tab bar owns Home/Messages/Profile/Compose, so the
   topbar only needs to carry the logo + search + admin + logout */
@media (max-width: 640px){
	.ssn-topbar{ padding: 8px 10px; gap: 8px; }
	.ssn-topbar-brand-name{ display:none; }
	.ssn-topbar-icons .ssn-nav-link{ display:none; } /* Home/Messages/Profile move to the bottom bar */
	.ssn-topbar-compose{ display:none; } /* the bottom bar's + button handles composing on phones */
	.ssn-topbar-search{ margin-left:auto; }
	.ssn-sidebar{ flex-direction: column; }
	.ssn-body{ padding: 0 0 78px; } /* clear space for the fixed bottom bar */
	.ssn-main{ border-radius: 0; border-left:none; border-right:none; border-bottom:none; }

	.ssn-bottombar{
		display:flex; align-items:center; justify-content:space-around;
		position: fixed; left:0; right:0; bottom:0; z-index: 50;
		background: var(--ssn-card); border-top: 1px solid var(--ssn-line);
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
	}
	.ssn-bottombar .ssn-nav-link{ display:flex; flex-direction:column; align-items:center; gap:2px; border:none; background:none; color: var(--ssn-muted); font-size: 10.5px; font-weight:600; padding: 4px 14px; border-radius: 10px; position:relative; }
	.ssn-bottombar .ssn-nav-link.is-active{ color: var(--ssn-navy); }
	.ssn-bottombar .ssn-nav-link svg{ width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; }
	.ssn-bottombar-avatar{ width:23px; height:23px; border-radius:50%; object-fit:cover; }
	.ssn-bottombar .ssn-nav-link.is-active .ssn-bottombar-avatar{ box-shadow: 0 0 0 2px var(--ssn-gold); }
	.ssn-bottombar-compose{ width: 48px; height: 48px; margin-top: -18px; border-radius:50%; border:none; background: var(--ssn-navy); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow: 0 6px 16px rgba(22,34,63,.35); flex-shrink:0; }
	.ssn-bottombar-compose svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; }
}

@media (max-width: 480px){
	.ssn-view-header{ padding: 12px 14px; }
	.ssn-view-header h2{ font-size: 18px; }
	.ssn-composer{ padding: 12px 14px; gap: 8px; }
	.ssn-post{ padding: 12px 14px; gap: 8px; }
	.ssn-post-actions{ gap: 18px; }
	.ssn-avatar{ width: 38px; height: 38px; }
	.ssn-btn{ padding: 9px 16px; font-size: 13px; }
	.ssn-auth-card{ padding: 20px; }
	.ssn-status-card{ padding: 24px; }
	.ssn-edit-profile-form{ grid-template-columns: 1fr; }
	.ssn-modal{ padding: 12px; align-items: flex-end; }
	.ssn-modal-body{ width: 100%; max-height: 88vh; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
	.ssn-ad-banner-link span{ display:none; }
	.ssn-ad-banner-link{ padding: 6px; }
}

@media (max-width: 640px){
	.ssn-messages-wrap{ grid-template-columns: 1fr; height: auto; }
	.ssn-conversations{ border-right:none; border-bottom: 1px solid var(--ssn-line); max-height: 220px; }
	.ssn-chat-window{ height: min(65vh, 560px); }
}
