/* ============================================================================
   COMMUNITY (students.html) — kosher same-gender social network.
   Loads after zone-2026.css; reuses its --z-* tokens. Scoped to .students-page.
   ============================================================================ */

/* Shared avatar element */
body.students-page .student-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  font-weight: 900; font-size: 1.05rem; color: #fff;
  background: var(--avatar, linear-gradient(135deg, var(--z-accent), var(--z-accent-2)));
  background-size: cover; background-position: center;
  border: 3px solid var(--z-card);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
body.students-page .student-avatar.small { width: 40px; height: 40px; font-size: 0.85rem; border-width: 2px; }
body.students-page .student-avatar.large { width: 88px; height: 88px; font-size: 1.6rem; }

/* Layout: feed (main) + people (rail) */
body.students-page .students-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: var(--z-gap);
  align-items: start;
}
@media (max-width: 900px) {
  body.students-page .students-layout { grid-template-columns: 1fr; }
}

/* Wall composer */
body.students-page .wall-composer {
  display: flex; gap: 12px; align-items: flex-start;
  padding: var(--z-pad);
  border: 1px solid var(--z-line); border-radius: var(--z-radius);
  background: var(--z-card); box-shadow: var(--z-shadow);
  margin-bottom: var(--z-gap);
}
body.students-page .wall-composer-form { flex: 1; display: grid; gap: 10px; }
body.students-page .wall-composer-form textarea { min-height: 56px; }
body.students-page .wall-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.students-page .wall-composer-actions .primary-button { min-height: 42px; padding: 0 22px; }

/* Wall feed */
body.students-page .wall-feed { display: grid; gap: 12px; }
body.students-page .wall-post {
  padding: var(--z-pad); border: 1px solid var(--z-line);
  border-radius: var(--z-radius); background: var(--z-card); box-shadow: var(--z-shadow);
}
body.students-page .wall-post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
body.students-page .wall-post-meta { display: flex; flex-direction: column; line-height: 1.2; }
body.students-page .wall-post-meta strong { font-size: 0.95rem; }
body.students-page .wall-post-meta small { color: var(--z-muted); font-size: 0.78rem; }
body.students-page .wall-post-body { margin: 0 0 12px; font-size: 1rem; line-height: 1.55; color: var(--z-ink); white-space: pre-wrap; word-break: break-word; }
body.students-page .wall-post-foot { display: flex; gap: 10px; }
body.students-page .wall-like {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--z-line); background: var(--z-card-2);
  color: var(--z-muted); font-weight: 800; cursor: pointer;
  transition: transform 200ms cubic-bezier(0.16,1,0.3,1), color 150ms ease, background 150ms ease, border-color 150ms ease;
}
body.students-page .wall-like:hover { transform: translateY(-1px); }
body.students-page .wall-like.liked { color: #e0566f; border-color: color-mix(in srgb,#e0566f 45%,transparent); background: color-mix(in srgb,#e0566f 10%,transparent); }

/* People rail */
body.students-page .students-rail {
  position: sticky; top: calc(var(--header-h, 64px) + 14px);
  display: grid; gap: 12px;
}
body.students-page .students-rail-head { display: flex; align-items: center; justify-content: space-between; }
body.students-page .students-rail-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; }

/* Color match bar */
body.students-page .student-color-caption {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.78rem; color: color-mix(in srgb, var(--z-ink) 60%, transparent);
  margin: 2px 0 8px;
}
body.students-page .student-color-mine {
  margin-left: auto; color: var(--z-accent); font-weight: 700; text-decoration: none;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--z-line);
}
body.students-page .student-color-mine:hover { border-color: var(--z-accent); }
body.students-page .student-color-bar { display: flex; flex-wrap: wrap; gap: 6px; }
body.students-page .student-color-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--z-line); background: var(--z-card-2);
  color: var(--z-ink); font-size: 0.78rem; font-weight: 700;
  transition: border-color 150ms ease, transform 180ms cubic-bezier(0.16,1,0.3,1);
}
body.students-page .student-color-chip:hover { transform: translateY(-1px); }
body.students-page .student-color-chip.active { border-color: var(--z-accent); box-shadow: 0 0 0 2px color-mix(in srgb,var(--z-accent) 30%,transparent); }
body.students-page .student-color-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
body.students-page .student-color-dot.all { background: conic-gradient(from 0deg, #18b7d9, #d7b65f, #c86b82, #6f8a53, #18b7d9); }
body.students-page .student-color-count { opacity: 0.6; font-size: 0.72rem; }

/* Student cards grid */
body.students-page .students-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
body.students-page .students-grid--mini { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
body.students-page .student-card {
  border: 1px solid var(--z-line); border-radius: var(--z-radius);
  background: var(--z-card); box-shadow: var(--z-shadow); overflow: hidden;
  cursor: pointer; text-align: center;
  transition: transform 220ms cubic-bezier(0.16,1,0.3,1), box-shadow 220ms ease;
}
body.students-page .student-card:hover { transform: translateY(-3px); box-shadow: var(--z-shadow-lg); }
body.students-page .student-card:focus-visible { outline: 2px solid var(--z-accent); outline-offset: 2px; }
body.students-page .student-card-banner {
  height: 52px; position: relative;
  background: var(--card-gradient, linear-gradient(135deg, var(--z-accent), var(--z-accent-2)));
}
body.students-page .student-card-body { padding: 0 12px 16px; margin-top: -28px; display: grid; justify-items: center; gap: 4px; }
body.students-page .student-card .student-avatar { border-color: var(--z-card); }
body.students-page .student-name { font-size: 0.92rem; font-weight: 800; }
body.students-page .student-headline { margin: 0; font-size: 0.78rem; color: var(--z-muted); line-height: 1.35; }
body.students-page .student-headline.muted { opacity: 0.7; }
body.students-page .student-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 0.72rem; color: var(--z-muted); margin-top: 4px; }
body.students-page .student-meta i { opacity: 0.7; margin-right: 3px; }
body.students-page .student-chip {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.66rem; font-weight: 800;
  background: rgba(8,14,24,0.55); color: #fff; backdrop-filter: blur(6px);
}
body.students-page .student-chip--me { right: auto; left: 8px; background: rgba(255,255,255,0.85); color: #1f2933; }

/* Profile drawer */
body.students-page .student-drawer-scrim {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(4,8,16,0.6); backdrop-filter: blur(4px);
}
body.students-page .student-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10060;
  width: min(440px, 100vw); overflow-y: auto;
  background: var(--z-card); border-left: 1px solid var(--z-line);
  box-shadow: var(--z-shadow-lg);
  animation: studentDrawerIn 260ms cubic-bezier(0.16,1,0.3,1);
}
@keyframes studentDrawerIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
body.students-page .student-drawer-banner { height: 120px; }
body.students-page .student-drawer-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(8,14,24,0.5); color: #fff; backdrop-filter: blur(8px);
}
body.students-page .student-drawer-body { padding: 0 var(--z-pad) var(--z-pad); margin-top: -44px; display: grid; gap: 10px; }
body.students-page .student-drawer-body h2 { margin: 6px 0 0; font-size: 1.4rem; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.students-page .student-drawer-body .student-chip { position: static; }
body.students-page .student-drawer-headline { margin: 0; color: var(--z-muted); font-size: 0.95rem; }
body.students-page .student-drawer-about { margin: 6px 0 0; line-height: 1.55; }
body.students-page .student-drawer-looking { padding: 12px 14px; border-radius: var(--z-radius-sm); background: var(--z-card-2); border: 1px solid var(--z-line); }
body.students-page .student-drawer-looking strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z-muted); }
body.students-page .student-drawer-looking p { margin: 4px 0 0; }
body.students-page .student-drawer-chavrusas { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--z-line); }
body.students-page .student-drawer-chavrusas h3 { margin: 0 0 10px; font-size: 1rem; font-weight: 800; }
body.students-page .student-drawer-loading { padding: 40px; text-align: center; color: var(--z-muted); }

/* Blur lock screen (no declared gender) */
body.students-page .students-locked-wrap { position: relative; min-height: 62vh; }
body.students-page .students-locked-blur { filter: blur(16px) saturate(0.7); opacity: 0.5; pointer-events: none; user-select: none; }
body.students-page .student-card--ghost { cursor: default; }
body.students-page .student-card--ghost .student-card-banner { background: linear-gradient(135deg, #2a3550, #44507a, #52608a); }
body.students-page .student-card--ghost .student-avatar { background: #44507a; }
body.students-page .student-ghost-line { height: 10px; border-radius: 6px; background: var(--z-line); width: 70%; margin: 6px auto 0; }
body.students-page .student-ghost-line.short { width: 45%; }
body.students-page .students-lock-card {
  position: absolute; inset: 0; margin: auto; height: max-content; max-width: 440px;
  display: grid; justify-items: center; text-align: center; gap: 12px;
  padding: clamp(26px, 4vw, 44px); border-radius: var(--z-radius-lg);
  background: var(--z-card); border: 1px solid var(--z-line); box-shadow: var(--z-shadow-lg);
}
body.students-page .students-lock-icon {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--z-accent), var(--z-accent-2)); color: #fff; font-size: 1.5rem;
}
body.students-page .students-lock-card h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; margin: 0; }
body.students-page .students-lock-card p { color: var(--z-muted); line-height: 1.6; margin: 0; }
body.students-page .students-lock-card small { color: var(--z-muted); opacity: 0.8; }

/* ── Community: images, comments, mentions, suspend lock (added) ─────────── */
body.students-page .student-avatar.tiny { width: 30px; height: 30px; font-size: 0.72rem; border-width: 2px; }

/* Post image */
body.students-page .wall-post-image { margin: 0 0 12px; border-radius: var(--z-radius-sm); overflow: hidden; border: 1px solid var(--z-line); }
body.students-page .wall-post-image img { display: block; width: 100%; max-height: 520px; object-fit: cover; }

/* @mention highlight */
body.students-page .wall-mention { color: var(--z-accent); font-weight: 700; }

/* Composer image controls */
body.students-page .wall-composer-image { position: relative; display: inline-block; max-width: 220px; border-radius: var(--z-radius-sm); overflow: hidden; border: 1px solid var(--z-line); }
body.students-page .wall-composer-image img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
body.students-page .wall-composer-image-remove {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center;
}
body.students-page .wall-composer-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.students-page .wall-composer-imgbtn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--z-line);
  background: var(--z-card-2); color: var(--z-ink); font-size: 0.82rem; font-weight: 700;
}
body.students-page .wall-composer-imgbtn:hover { border-color: var(--z-accent); }

/* Comment toggle in the post footer */
body.students-page .wall-comment-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--z-line);
  background: var(--z-card-2); color: var(--z-ink); font-weight: 700; font-size: 0.85rem;
  transition: transform 180ms cubic-bezier(0.16,1,0.3,1);
}
body.students-page .wall-comment-toggle:hover { transform: translateY(-1px); }

/* Comments area */
body.students-page .wall-comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--z-line); display: flex; flex-direction: column; gap: 10px; }
body.students-page .wall-comments-more { align-self: flex-start; background: none; border: none; color: var(--z-accent); font-weight: 700; cursor: pointer; font-size: 0.82rem; padding: 0; }
body.students-page .wall-comments-list { display: flex; flex-direction: column; gap: 10px; }
body.students-page .wall-comment { display: flex; gap: 9px; align-items: flex-start; }
body.students-page .wall-comment-bubble {
  background: var(--z-card-2); border: 1px solid var(--z-line); border-radius: 14px;
  padding: 8px 12px; font-size: 0.9rem; line-height: 1.45; min-width: 0; flex: 1;
}
body.students-page .wall-comment-bubble strong { display: inline; margin-right: 6px; font-size: 0.86rem; }
body.students-page .wall-comment-body { color: var(--z-ink); white-space: pre-wrap; word-break: break-word; }
body.students-page .wall-comment-bubble small { display: block; margin-top: 3px; color: var(--z-muted); font-size: 0.72rem; }

/* Comment composer */
body.students-page .wall-comment-form { display: flex; gap: 9px; align-items: flex-start; }
body.students-page .wall-comment-input-wrap { position: relative; flex: 1; display: flex; }
body.students-page .wall-comment-input-wrap textarea {
  flex: 1; resize: none; min-height: 40px; padding: 10px 42px 10px 13px; border-radius: 14px;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink); font-family: inherit; font-size: 0.9rem;
}
body.students-page .wall-comment-send {
  position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer; background: var(--z-accent); color: #06121f; display: grid; place-items: center;
}

/* @-mention popup (portaled to body) */
.mention-popup {
  position: absolute; z-index: 6000; max-height: 260px; overflow-y: auto;
  background: #0c1626; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5); padding: 5px;
}
.mention-option {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  padding: 7px 9px; border: none; background: none; color: #e9eef6; border-radius: 9px; font-size: 0.88rem;
}
.mention-option:hover { background: rgba(255,255,255,0.08); }
.mention-option .student-avatar { border: none; }
:root[data-theme="light"] .mention-popup { background: #fff; border-color: rgba(20,35,55,0.12); }
:root[data-theme="light"] .mention-option { color: #1f2933; }
:root[data-theme="light"] .mention-option:hover { background: #f1f5f9; }

/* Suspended-on-the-spot lock card */
body.students-page .students-suspended-card { text-align: center; }
body.students-page .students-lock-icon--danger {
  background: linear-gradient(135deg, #ff6b6b, #ff9a3d) !important; color: #2a0a0a !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   2026 redesign — theme-weighted cards, compact dropdowns, centered modals, DM
   ════════════════════════════════════════════════════════════════════════════ */

/* Rail head + "Mine" link */
body.students-page .students-rail-count { font-size: 0.8rem; opacity: 0.55; font-weight: 800; }
body.students-page .students-rail-mine { font-size: 0.78rem; color: var(--z-accent); text-decoration: none; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
body.students-page .students-rail-mine:hover { opacity: 0.85; }

/* Compact dropdown controls (sort + colour) */
body.students-page .people-controls { display: flex; gap: 8px; margin-bottom: 14px; }
body.students-page .people-dd { position: relative; flex: 1; min-width: 0; }
body.students-page .people-dd-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink);
  font-size: 0.82rem; font-weight: 700;
  transition: border-color 150ms ease;
}
body.students-page .people-dd-btn:hover { border-color: color-mix(in srgb, var(--z-accent) 50%, var(--z-line)); }
body.students-page .people-dd-btn span:not(.people-dd-swatch) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.students-page .people-dd-caret { margin-left: auto; font-size: 0.68rem; opacity: 0.55; }
body.students-page .people-dd-panel {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--z-card); border: 1px solid var(--z-line); border-radius: 12px;
  box-shadow: var(--z-shadow-lg); padding: 5px; display: flex; flex-direction: column; gap: 2px;
}
body.students-page .people-dd-panel--scroll { max-height: 320px; overflow-y: auto; }
body.students-page .people-dd-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border: none; background: none; color: var(--z-ink); border-radius: 9px; font-size: 0.82rem; font-weight: 600;
}
body.students-page .people-dd-opt:hover { background: var(--z-card-2); }
body.students-page .people-dd-opt.is-active { background: color-mix(in srgb, var(--z-accent) 18%, transparent); }
body.students-page .people-dd-opt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.students-page .people-dd-opt-count { opacity: 0.5; font-size: 0.74rem; }
body.students-page .people-dd-swatch { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
body.students-page .people-dd-swatch--all { background: conic-gradient(from 0deg, #18b7d9, #d7b65f, #c86b82, #6f8a53, #18b7d9); }

/* ════════════════════════════════════════════════════════════════════════════
   2026 PREMIUM COMMUNITY CARD — the member's colour SCHEME is the hero, wrapped
   in a luxe gold-gradient frame. The full card carries the scheme gradient with a
   legibility scrim that deepens toward the text; the avatar floats on a glowing
   accent halo; actions are frosted-glass pills. No flat banner seam, no dark wedge.
   ════════════════════════════════════════════════════════════════════════════ */
body.students-page .students-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 16px; }
body.students-page .student-card {
  position: relative; isolation: isolate; border-radius: 20px; overflow: hidden;
  cursor: pointer; text-align: center;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--z-accent)) 28%, rgba(255,255,255,0.10));
  background:
    linear-gradient(180deg, rgba(6,10,18,0) 0%, rgba(6,10,18,0.26) 40%, rgba(6,10,18,0.74) 70%, rgba(4,7,13,0.94) 100%),
    var(--card-gradient, linear-gradient(135deg, var(--z-accent), var(--z-accent-2)));
  box-shadow: 0 10px 28px rgba(4,8,16,0.46), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 260ms cubic-bezier(0.16,1,0.3,1), box-shadow 260ms ease, border-color 220ms ease;
}
/* Luxe gold-gradient hairline frame, drawn as a masked ring on ::before. */
body.students-page .student-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(150deg, rgba(255,231,160,0.78), rgba(244,207,107,0.18) 28%, transparent 52%, rgba(244,207,107,0.32) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
body.students-page .student-card > * { position: relative; z-index: 2; }
body.students-page .student-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--card-accent, var(--z-accent)) 60%, transparent);
  box-shadow:
    0 22px 48px color-mix(in srgb, var(--card-accent, #000) 36%, rgba(4,8,16,0.5)),
    0 0 26px color-mix(in srgb, var(--card-accent, var(--z-accent)) 26%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.16);
}
body.students-page .student-card:focus-visible { outline: 2px solid #f4cf6b; outline-offset: 3px; }
/* Top zone: a soft scheme-accent halo glows up behind the avatar; holds ribbon/chips. */
body.students-page .student-card-banner { height: 64px; position: relative; background: none; }
body.students-page .student-card-banner::before {
  content: ""; position: absolute; inset: -10% 0 -64%; pointer-events: none;
  background: radial-gradient(58% 120% at 50% 118%, color-mix(in srgb, var(--card-accent, var(--z-accent)) 60%, transparent), transparent 70%);
}
body.students-page .student-card-body { padding: 0 14px 16px; margin-top: -26px; display: grid; justify-items: center; gap: 3px; }
/* Avatar floats on a glowing accent ring — no flat dark seam. */
body.students-page .student-card .student-avatar {
  width: 72px; height: 72px; font-size: 1.3rem; color: #fff;
  position: relative; z-index: 2; margin-bottom: 7px;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--card-accent, var(--z-accent)) 52%, transparent),
    0 10px 24px rgba(0,0,0,0.46);
}
body.students-page .student-name { margin-top: 4px; color: #fff; font-size: 1rem; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,0.55); }
body.students-page .student-headline { line-height: 1.35; color: rgba(255,255,255,0.84); }
body.students-page .student-headline.muted { color: rgba(255,255,255,0.66); opacity: 1; }
body.students-page .student-meta { color: rgba(255,255,255,0.74); }
body.students-page .student-meta i { opacity: 0.85; }

/* Frosted-glass action buttons — gold on hover. */
body.students-page .student-card-actions { display: flex; gap: 9px; justify-content: center; margin-top: 11px; }
body.students-page .student-iconbtn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.13); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; cursor: pointer; text-decoration: none; font-size: 0.86rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}
body.students-page .student-iconbtn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ffe49a, #f4cf6b 58%, #c9962f);
  border-color: rgba(255,255,255,0.55); color: #2a1c05;
}

/* Center-center profile modal */
body.students-page .student-modal-scrim { position: fixed; inset: 0; z-index: 10050; background: rgba(4,8,16,0.62); backdrop-filter: blur(5px); }
body.students-page .student-modal {
  position: fixed; z-index: 10060; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(460px, calc(100vw - 32px)); max-height: 88vh; overflow-y: auto;
  background: var(--z-card); border: 1px solid color-mix(in srgb, var(--card-accent, var(--z-accent)) 30%, var(--z-line));
  border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  animation: studentModalIn 200ms cubic-bezier(0.16,1,0.3,1);
}
@keyframes studentModalIn { from { opacity: 0; transform: translate(-50%,-46%) scale(0.97); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
body.students-page .student-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(0,0,0,0.4); color: #fff; display: grid; place-items: center;
}
body.students-page .student-modal-banner { height: 112px; background: var(--card-gradient, linear-gradient(135deg, var(--z-accent), var(--z-accent-2))); }
body.students-page .student-modal-body { padding: 0 22px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; }
body.students-page .student-avatar.xl { width: 104px; height: 104px; font-size: 2rem; margin-top: -52px; border: 4px solid var(--z-card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--card-accent, var(--z-accent)) 50%, transparent); }
body.students-page .student-modal-name { margin: 12px 0 2px; font-size: 1.4rem; font-weight: 800; }
body.students-page .student-modal-headline { margin: 2px 0; color: var(--z-muted); }
body.students-page .student-modal-headline.muted { opacity: 0.7; }
body.students-page .student-modal-chip { margin: 6px 0; }
body.students-page .student-modal-meta { justify-content: center; margin: 8px 0; }
body.students-page .student-modal-about { margin: 10px 0; line-height: 1.55; }
body.students-page .student-modal-looking { width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--z-card-2); border: 1px solid var(--z-line); margin: 8px 0; }
body.students-page .student-modal-looking strong { font-size: 0.82rem; }
body.students-page .student-modal-actions { display: flex; gap: 10px; width: 100%; margin: 14px 0 4px; }
body.students-page .student-modal-actions .primary-button, body.students-page .student-modal-actions .ghost-button { flex: 1; justify-content: center; }
body.students-page .student-modal-editmine { margin-top: 12px; }
body.students-page .student-modal-chavrusas { width: 100%; text-align: left; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--z-line); }
body.students-page .student-modal-chavrusas h3 { font-size: 0.95rem; margin: 0 0 10px; }

/* DM chat modal */
body.students-page .dm-modal {
  position: fixed; z-index: 10060; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(440px, calc(100vw - 32px)); height: min(560px, 86vh); display: flex; flex-direction: column;
  background: var(--z-card); border: 1px solid var(--z-line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55); overflow: hidden; animation: studentModalIn 200ms cubic-bezier(0.16,1,0.3,1);
}
body.students-page .dm-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--z-line); }
body.students-page .dm-modal-head strong { flex: 1; font-size: 1rem; }
body.students-page .dm-modal-head .student-modal-close { position: static; background: var(--z-card-2); color: var(--z-ink); }
body.students-page .dm-modal-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
body.students-page .dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
body.students-page .dm-msg--mine { align-self: flex-end; align-items: flex-end; }
body.students-page .dm-msg-bubble { padding: 9px 13px; border-radius: 16px; background: var(--z-card-2); border: 1px solid var(--z-line); font-size: 0.9rem; line-height: 1.45; word-break: break-word; }
body.students-page .dm-msg--mine .dm-msg-bubble { background: var(--z-accent); color: #06121f; border-color: transparent; }
body.students-page .dm-msg small { font-size: 0.68rem; color: var(--z-muted); margin-top: 3px; }
body.students-page .dm-modal-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--z-line); align-items: flex-end; }
body.students-page .dm-modal-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink); font-family: inherit; font-size: 0.9rem; }
body.students-page .dm-send { width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; background: var(--z-accent); color: #06121f; display: grid; place-items: center; flex-shrink: 0; }
body.students-page .dm-empty, body.students-page .dm-loading { margin: auto; text-align: center; color: var(--z-muted); font-size: 0.88rem; }

/* ── Facebook-style post management: ⋯ menu, edit, repost embed ──────────── */
body.students-page .post-menu-wrap { margin-left: auto; position: relative; }
body.students-page .comment-menu-wrap { margin-left: auto; }
body.students-page .post-menu-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--z-muted); display: grid; place-items: center; font-size: 0.95rem;
  transition: background 150ms ease, color 150ms ease;
}
body.students-page .post-menu-btn:hover { background: var(--z-card-2); color: var(--z-ink); }
body.students-page .post-menu {
  position: absolute; z-index: 40; top: calc(100% + 4px); right: 0; min-width: 168px;
  background: var(--z-card); border: 1px solid var(--z-line); border-radius: 12px;
  box-shadow: var(--z-shadow-lg); padding: 5px; display: flex; flex-direction: column; gap: 2px;
}
body.students-page .post-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 11px; border: none; background: none; color: var(--z-ink); border-radius: 9px; font-size: 0.85rem; font-weight: 600;
}
body.students-page .post-menu button:hover { background: var(--z-card-2); }
body.students-page .post-menu button i { width: 16px; text-align: center; opacity: 0.8; }
body.students-page .post-menu .post-menu-danger { color: #e0566f; }
body.students-page .post-menu .post-menu-danger:hover { background: color-mix(in srgb, #e0566f 12%, transparent); }

/* Inline edit forms */
body.students-page .wall-edit-form textarea,
body.students-page .wall-comment-edit textarea {
  width: 100%; resize: vertical; min-height: 60px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink); font-family: inherit; font-size: 0.92rem;
}
body.students-page .wall-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
body.students-page .wall-edit-actions .primary-button,
body.students-page .wall-edit-actions .ghost-button { min-height: 36px; padding: 0 16px; }

/* Reposted (shared) embed */
body.students-page .wall-shared {
  margin: 4px 0 12px; padding: 12px; border: 1px solid var(--z-line); border-radius: 14px;
  background: color-mix(in srgb, var(--z-card-2) 70%, transparent);
}
body.students-page .wall-shared-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
body.students-page .wall-shared-head strong { font-size: 0.86rem; }
body.students-page .wall-shared-head small { color: var(--z-muted); font-size: 0.74rem; }
body.students-page .wall-shared-body { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--z-ink); white-space: pre-wrap; word-break: break-word; }
body.students-page .wall-shared--gone { color: var(--z-muted); font-style: italic; font-size: 0.86rem; display: flex; align-items: center; gap: 8px; }

/* Repost modal */
body.students-page .repost-modal { height: auto; max-height: 86vh; }
body.students-page .repost-form { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
body.students-page .repost-form textarea {
  width: 100%; resize: vertical; min-height: 64px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink); font-family: inherit; font-size: 0.92rem;
}

/* ── People rail sections: Your chavrusas + Discover ────────────────────── */
body.students-page .rail-section { margin-bottom: 18px; }
body.students-page .rail-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
body.students-page .rail-section-head h3 {
  margin: 0; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: color-mix(in srgb, var(--z-ink) 62%, transparent); display: inline-flex; align-items: center; gap: 7px;
}
body.students-page .rail-section-head h3 i { color: var(--z-accent); opacity: 0.9; }
body.students-page .rail-viewall {
  background: none; border: none; cursor: pointer; color: var(--z-accent); font-weight: 700; font-size: 0.78rem; padding: 2px 4px;
}
body.students-page .rail-viewall:hover { text-decoration: underline; }
body.students-page .rail-chavrusas { padding-bottom: 16px; border-bottom: 1px solid var(--z-line); }

/* ── Long-name / email safety: truncate + keep centered ─────────────────── */
body.students-page .student-card-body { width: 100%; min-width: 0; }
body.students-page .student-name {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.students-page .student-modal-name {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.students-page .cc-preview-name {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Visible flag button in the post footer */
body.students-page .wall-flag {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-muted);
  transition: transform 180ms cubic-bezier(0.16,1,0.3,1), color 150ms ease, border-color 150ms ease, background 150ms ease;
}
body.students-page .wall-flag:hover {
  transform: translateY(-1px); color: #e6b450;
  border-color: color-mix(in srgb, #e6b450 50%, transparent);
  background: color-mix(in srgb, #e6b450 10%, transparent);
}

/* ════════════════════════════════════════════════════════════════════════════
   Reactions, level badges, clickable authors, 2026 thin frames, mobile lock
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Emoji reactions ───────────────────────────────────────────────────── */
body.students-page .reaction-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 2px; }
body.students-page .reaction-bar--compact { padding: 6px 0 0; gap: 4px; }
body.students-page .reaction-chip {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  min-height: 30px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--z-line); background: var(--z-card-2); color: var(--z-ink);
  font-size: 0.95rem; line-height: 1;
  transition: transform 150ms cubic-bezier(0.16,1,0.3,1), border-color 150ms ease, background 150ms ease, opacity 150ms ease;
}
body.students-page .reaction-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--z-accent) 45%, var(--z-line)); }
body.students-page .reaction-chip:not(.has-count) { opacity: 0.5; }
body.students-page .reaction-chip:not(.has-count):hover { opacity: 1; }
body.students-page .reaction-chip.is-mine { border-color: var(--z-accent); background: color-mix(in srgb, var(--z-accent) 16%, transparent); opacity: 1; }
body.students-page .reaction-chip .reaction-count { font-size: 0.76rem; font-weight: 800; color: var(--z-muted); }
body.students-page .reaction-chip.is-mine .reaction-count { color: var(--z-ink); }
body.students-page .reaction-bar--compact .reaction-chip { min-height: 26px; padding: 3px 7px; font-size: 0.85rem; }

/* ── Level badge — bottom-right corner of the profile image (like the nav) ─ */
body.students-page .student-avatar-wrap { position: relative; display: inline-flex; }
body.students-page .rank-badge {
  position: absolute; bottom: -2px; right: -3px; z-index: 3;
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; line-height: 1;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  font-size: 0.6rem; font-weight: 900; justify-content: center;
  background: var(--rank-color, #8aa0c0); color: #08131f;
  border: 2px solid var(--z-card); box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}
body.students-page .rank-badge i { font-size: 0.55rem; }
body.students-page .rank-badge-num { line-height: 1; }

/* ── Clickable author avatar/name (post + comment) ─────────────────────── */
body.students-page .wall-post-avatar,
body.students-page .wall-comment-avatar,
body.students-page .wall-post-meta strong[data-open-profile],
body.students-page .wall-comment-bubble strong[data-open-profile] { cursor: pointer; }
body.students-page .wall-post-meta strong[data-open-profile]:hover,
body.students-page .wall-comment-bubble strong[data-open-profile]:hover { text-decoration: underline; }
body.students-page [data-open-profile] .student-avatar { transition: transform 150ms ease; }
body.students-page [data-open-profile]:hover .student-avatar { transform: scale(1.04); }
body.students-page .wall-comment-main { flex: 1; min-width: 0; }

/* ── 2026 thin frames / minimal box ────────────────────────────────────── */
body.students-page .wall-composer,
body.students-page .wall-post {
  border: 1px solid color-mix(in srgb, var(--z-line) 72%, transparent);
}
body.students-page .wall-composer-imgbtn {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--z-line) 72%, transparent);
}
body.students-page .wall-composer-form textarea {
  border: 1px solid color-mix(in srgb, var(--z-line) 72%, transparent);
  border-radius: 14px;
}

/* ════════════════════════════════════════════════════════════════════════
   MOBILE / TABLET LOCK — content must never be hidden or clipped
   ════════════════════════════════════════════════════════════════════════ */
body.students-page { overflow-x: hidden; }
body.students-page .students-main,
body.students-page .wall-post,
body.students-page .wall-composer,
body.students-page .student-card { min-width: 0; }
body.students-page .wall-post-body,
body.students-page .wall-comment-body { overflow-wrap: anywhere; word-break: break-word; }

/* Modals always fit the viewport, scroll internally (dvh accounts for mobile chrome) */
body.students-page .student-modal { max-height: 88vh; max-height: 88dvh; }
body.students-page .dm-modal { height: min(560px, 86vh); height: min(560px, 86dvh); max-height: 86dvh; }
.mention-popup { max-width: calc(100vw - 16px); }

/* Tablet ≤900px: single column, un-stick the rail so it can't overlap */
@media (max-width: 900px) {
  body.students-page .students-layout { grid-template-columns: 1fr; }
  body.students-page .students-rail { position: static; }
}

/* Mobile ≤640px */
@media (max-width: 640px) {
  body.students-page .page-main { padding-left: 12px; padding-right: 12px; }
  body.students-page .students-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  body.students-page .people-controls { flex-wrap: wrap; }
  body.students-page .people-dd { flex: 1 1 100%; }
  body.students-page .wall-post-image img { max-height: 380px; }
  body.students-page .student-modal,
  body.students-page .dm-modal,
  body.students-page .repost-modal { width: calc(100vw - 18px); }
  body.students-page .student-modal-body { padding-left: 16px; padding-right: 16px; }
}

/* Very narrow ≤420px: keep menus & reaction chips on-screen */
@media (max-width: 420px) {
  body.students-page .post-menu { min-width: 150px; max-width: calc(100vw - 24px); }
  body.students-page .students-grid { grid-template-columns: 1fr 1fr; }
  body.students-page .reaction-chip { padding: 4px 7px; }
}

/* ── In-community chavrusa: request section + icon states ───────────────── */
body.students-page .student-iconbtn--done {
  cursor: default; color: #2a1c05;
  border-color: rgba(255,255,255,0.5);
  background: linear-gradient(135deg, #ffe49a, #f4cf6b 60%, #c9962f);
}
body.students-page .student-iconbtn--done:hover { transform: none; }
body.students-page .student-iconbtn--pending {
  cursor: default; color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}
body.students-page .student-iconbtn--pending:hover { transform: none; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
body.students-page .ghost-button.is-static { cursor: default; opacity: 0.85; }

body.students-page .rail-requests {
  padding: 12px; border-radius: var(--z-radius-sm); border: 1px solid color-mix(in srgb, var(--z-accent) 35%, var(--z-line));
  background: color-mix(in srgb, var(--z-accent) 7%, var(--z-card)); margin-bottom: 16px;
}
body.students-page .rail-req-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--z-accent); color: #06121f; font-size: 0.66rem; font-weight: 900;
}
body.students-page .chavrusa-req { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
body.students-page .chavrusa-req + .chavrusa-req { border-top: 1px solid var(--z-line); }
body.students-page .chavrusa-req-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
body.students-page .chavrusa-req-info strong { font-size: 0.9rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.students-page .chavrusa-req-info small { color: var(--z-muted); font-size: 0.74rem; }
body.students-page .chavrusa-req-actions { display: flex; gap: 6px; flex-shrink: 0; }
body.students-page .chavrusa-req-btn { min-height: 32px; padding: 0 12px; font-size: 0.8rem; }
@media (max-width: 420px) {
  body.students-page .chavrusa-req { flex-wrap: wrap; }
  body.students-page .chavrusa-req-actions { width: 100%; }
  body.students-page .chavrusa-req-btn { flex: 1; }
}

/* ════════════════════════════════════════════════════════════════════════
   2026 composer — seamless, airy, focus-glow (overrides earlier rules)
   ════════════════════════════════════════════════════════════════════════ */
body.students-page .wall-composer {
  gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: 20px; margin-bottom: var(--z-gap);
  border: 1px solid color-mix(in srgb, var(--z-line) 58%, transparent);
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--z-accent) 7%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--z-card-2) 55%, var(--z-card)), var(--z-card));
  box-shadow: var(--z-shadow);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
body.students-page .wall-composer:focus-within {
  border-color: color-mix(in srgb, var(--z-accent) 55%, var(--z-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--z-accent) 14%, transparent), 0 14px 34px rgba(0,0,0,0.28);
}
body.students-page .wall-composer > .student-avatar { margin-top: 3px; }
body.students-page .wall-composer-form { gap: 0; }

/* Seamless textarea — no inner box, clean sans-serif (kills the mono look) */
body.students-page .wall-composer-form textarea {
  border: none; background: transparent; box-shadow: none; outline: none;
  font-family: inherit; font-size: 1.02rem; line-height: 1.55; color: var(--z-ink);
  padding: 4px 2px; min-height: 60px; resize: none; width: 100%;
}
body.students-page .wall-composer-form textarea::placeholder {
  color: color-mix(in srgb, var(--z-ink) 42%, transparent); font-family: inherit;
}

/* Actions row sits under a hairline divider */
body.students-page .wall-composer-actions {
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--z-line) 55%, transparent);
}
body.students-page .wall-composer-left { gap: 12px; }
body.students-page .wall-composer-imgbtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.85rem;
  color: var(--z-ink); background: color-mix(in srgb, var(--z-accent) 9%, var(--z-card-2));
  border: 1px solid color-mix(in srgb, var(--z-line) 65%, transparent);
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease, color 150ms ease;
}
body.students-page .wall-composer-imgbtn:hover {
  transform: translateY(-1px); color: var(--z-accent);
  border-color: color-mix(in srgb, var(--z-accent) 55%, transparent);
  background: color-mix(in srgb, var(--z-accent) 16%, var(--z-card-2));
}
body.students-page .wall-composer-left .orthodox-note { font-size: 0.74rem; opacity: 0.75; }

/* Share — gradient accent pill */
body.students-page .wall-composer-actions .primary-button {
  min-height: 40px; padding: 0 26px; border-radius: 999px; font-weight: 800; border: none;
  background: linear-gradient(135deg, var(--z-accent), color-mix(in srgb, var(--z-accent) 60%, #7b61ff));
  color: #04121e; box-shadow: 0 6px 18px color-mix(in srgb, var(--z-accent) 30%, transparent);
  transition: transform 160ms cubic-bezier(0.16,1,0.3,1), box-shadow 160ms ease, filter 160ms ease;
}
body.students-page .wall-composer-actions .primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
body.students-page .wall-composer-actions .primary-button:active { transform: translateY(0); }

/* Selected-image preview rounded to match */
body.students-page .wall-composer-image { border-radius: 14px; margin-top: 12px; }

/* ── "Mine" button + un-chavrusa affordance ──────────────────────────── */
body.students-page button.students-rail-mine { background: none; border: none; cursor: pointer; }
body.students-page .chavrusa-remove-btn { color: var(--z-accent); border-color: color-mix(in srgb, var(--z-accent) 45%, var(--z-line)); transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }
body.students-page .chavrusa-remove-btn:hover { color: #e0566f; border-color: color-mix(in srgb, #e0566f 55%, transparent); background: color-mix(in srgb, #e0566f 12%, transparent); }
body.students-page .chavrusa-remove-btn:hover .cr-label { display: none; }
body.students-page .chavrusa-remove-btn:hover::after { content: "Remove chavrusa"; }

/* ════════════════════════════════════════════════════════════════════════
   Per-user scheme on their boxes — posts, composer, comments carry the
   author's chosen colour theme (vars set inline per element).
   ════════════════════════════════════════════════════════════════════════ */
body.students-page .wall-post,
body.students-page .wall-composer {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--z-line)) 32%, var(--z-line));
  /* The top accent line is a BACKGROUND LAYER (not a ::before). A background is
     clipped to the rounded border-box, so the line follows the box's curved
     corners exactly — no overhang past the left/right corners. */
  background:
    var(--card-gradient, var(--z-accent)) top center / 100% 3px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--card-accent, transparent) 8%, var(--z-card)), var(--z-card) 72%);
  background-origin: border-box;
  background-clip: border-box;
}
body.students-page .wall-composer {
  background:
    var(--card-gradient, var(--z-accent)) top center / 100% 3px no-repeat,
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--card-accent, transparent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--card-accent, transparent) 8%, var(--z-card)), var(--z-card));
  background-origin: border-box;
  background-clip: border-box;
}
body.students-page .wall-composer:focus-within {
  border-color: color-mix(in srgb, var(--card-accent, var(--z-accent)) 62%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-accent, var(--z-accent)) 16%, transparent), 0 14px 34px rgba(0,0,0,0.28);
}
/* Comments: a small coloured left edge = the commenter's scheme. */
body.students-page .wall-comment-bubble {
  border-color: color-mix(in srgb, var(--card-accent, var(--z-line)) 24%, var(--z-line));
  border-left: 3px solid color-mix(in srgb, var(--card-accent, var(--z-accent)) 60%, transparent);
}

/* ════════════════════════════════════════════════════════════════════════
   Tighten the empty space under posts (all layouts, fully responsive).
   .wall-comments is collapsed via the [hidden] attribute (JS sets box.hidden),
   but `.wall-comments { display:flex }` overrode it — author `display` always
   beats the UA `[hidden]{display:none}` rule — so every COLLAPSED post still
   rendered its comment form + top border + spacing, leaving a big empty gap.
   Restore the collapse, and trim the post's bottom padding so the action row
   sits close to the card edge.
   ════════════════════════════════════════════════════════════════════════ */
body.students-page .wall-comments[hidden] { display: none !important; }
body.students-page .wall-post-body { margin-bottom: 9px; }
body.students-page .wall-post { padding-bottom: clamp(10px, 1.2vw, 13px); }
body.students-page .wall-feed { gap: 11px; }

/* ── One action row: emoji reactions on the LEFT, comment + flag on the RIGHT ─
   (replaces the old stacked reaction-bar + footer rows). Fully responsive:
   the reactions wrap inside the left group; the comment/flag group stays right.*/
body.students-page .wall-post-actions {
  display: flex; align-items: center; gap: 12px;
  margin-top: 9px; flex-wrap: wrap;
}
body.students-page .wall-post-actions .reaction-bar {
  padding: 0; margin: 0; flex: 1 1 200px; min-width: 0;
}
body.students-page .wall-post-actions .wall-post-foot {
  margin: 0; flex: 0 0 auto; align-items: center;
}

/* ════════════════════════════════════════════════════════════════════════
   Composer — finished 2026 component. The fully-seamless textarea read as
   "incomplete"; the user's aesthetic is THIN FRAMES, so give the input a clean
   hairline field (clearly "type here", not an empty void), tighten the
   proportions, and drop the now-redundant divider above the actions row.
   ════════════════════════════════════════════════════════════════════════ */
body.students-page .wall-composer {
  gap: 12px; padding: 15px 16px 13px; border-radius: 18px;
}
body.students-page .wall-composer > .student-avatar { margin-top: 1px; }
body.students-page .wall-composer-form { gap: 0; }

/* Clean thin-framed input field — looks complete, matches the "thin frames" look */
body.students-page .wall-composer-form textarea {
  border: 1px solid color-mix(in srgb, var(--z-line) 60%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--z-card-2) 30%, transparent);
  padding: 11px 13px; min-height: 52px;
  font-family: inherit; font-size: 1rem; line-height: 1.5; color: var(--z-ink);
  transition: border-color 160ms ease, background 160ms ease;
}
body.students-page .wall-composer-form textarea:focus {
  border-color: color-mix(in srgb, var(--card-accent, var(--z-accent)) 55%, transparent);
  background: color-mix(in srgb, var(--z-card-2) 52%, transparent);
}

/* Actions row — no divider now; the framed field already separates input from controls */
body.students-page .wall-composer-actions {
  margin-top: 11px; padding-top: 0; border-top: none;
}
body.students-page .wall-composer-imgbtn { padding: 7px 13px; font-size: 0.82rem; }
body.students-page .wall-composer-left .orthodox-note { font-size: 0.72rem; opacity: 0.72; }
body.students-page .wall-composer-actions .primary-button { min-height: 38px; padding: 0 24px; font-size: 0.92rem; }

/* ════════════════════════════════════════════════════════════════════════
   Community LEADERS — a Keter Torah crown + a commanding gold treatment so
   approved leaders (educators) stand out unmistakably from regular members.
   ════════════════════════════════════════════════════════════════════════ */
/* Keter Torah inline SVG — inherits the gold of its wrapper via currentColor. */
body.students-page .torah-crown {
  width: 1em; height: 1em; flex: none; vertical-align: -0.16em;
  fill: currentColor;
}
body.students-page .torah-crown .torah-crown-band { fill: rgba(0,0,0,0.22); }

body.students-page .leader-crown {
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 6px; color: #f4cf6b; font-size: 1.05em;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
body.students-page .student-chip--leader {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #ffe49a, #f4cf6b 45%, #c9962f);
  color: #2a1c05; font-weight: 900; right: auto; left: 8px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 4px 12px rgba(201,150,47,0.45);
}

/* ════════════════════════════════════════════════════════════════════
   Leader people-card — a regal, unmistakable treatment that sets leaders
   far apart from learners: ornate breathing gold frame, a light sheen that
   sweeps across, a royal banner with a crown watermark, a crown perched on
   the avatar, gradient-gold name, and a "Leader" ribbon.
   ════════════════════════════════════════════════════════════════════ */
body.students-page .student-card--leader {
  position: relative;
  border: 1px solid color-mix(in srgb, #f4cf6b 70%, transparent);
  /* The leader's scheme gradient stays the hero — a royal gold wash sits over the
     top and a legibility scrim deepens toward the text. */
  background:
    linear-gradient(180deg, rgba(6,10,18,0) 0%, rgba(6,10,18,0.28) 42%, rgba(6,10,18,0.74) 72%, rgba(4,7,13,0.95) 100%),
    linear-gradient(180deg, color-mix(in srgb, #f4cf6b 32%, transparent), transparent 52%),
    var(--card-gradient, linear-gradient(135deg, var(--z-accent), var(--z-accent-2)));
  box-shadow:
    0 0 0 1px color-mix(in srgb, #f4cf6b 70%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #ffffff 14%, transparent),
    0 0 24px color-mix(in srgb, #f4cf6b 32%, transparent),
    0 18px 42px color-mix(in srgb, #f4cf6b 22%, transparent),
    var(--z-shadow-lg);
  animation: leaderGlow 3.8s ease-in-out infinite;
}
/* Bolder, full gold frame for leaders (reuses the masked ring from .student-card::before). */
body.students-page .student-card--leader::before {
  padding: 2px;
  background: linear-gradient(140deg, #fff2c8, #f4cf6b 38%, #c9962f 70%, #fff2c8);
}
@keyframes leaderGlow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb,#f4cf6b 70%,transparent), inset 0 0 0 1px color-mix(in srgb,#fff 14%,transparent), 0 0 22px color-mix(in srgb,#f4cf6b 26%,transparent), 0 18px 42px color-mix(in srgb,#f4cf6b 20%,transparent), var(--z-shadow-lg); }
  50%      { box-shadow: 0 0 0 1px color-mix(in srgb,#f4cf6b 88%,transparent), inset 0 0 0 1px color-mix(in srgb,#fff 20%,transparent), 0 0 36px color-mix(in srgb,#f4cf6b 48%,transparent), 0 20px 50px color-mix(in srgb,#f4cf6b 28%,transparent), var(--z-shadow-lg); }
}
/* Diagonal light sheen sweeping across the card */
body.students-page .student-card--leader::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, color-mix(in srgb,#fff 60%,transparent) 49%, transparent 58%);
  background-size: 250% 100%; background-position: 185% 0;
  mix-blend-mode: screen; opacity: 0.55;
  animation: leaderSheen 6s ease-in-out infinite;
}
@keyframes leaderSheen { 0%, 74% { background-position: 185% 0; } 100% { background-position: -65% 0; } }
body.students-page .student-card--leader:hover {
  transform: translateY(-6px) scale(1.02);
  animation-play-state: paused;
}
/* Top zone keeps the scheme halo behind the avatar + a gold crown halo above it. */
body.students-page .student-card--leader .student-card-banner { height: 70px; background: none; }
body.students-page .student-card--leader .student-card-banner::before {
  inset: -10% 0 -64%;
  background:
    radial-gradient(40% 80% at 50% 4%, color-mix(in srgb, #f4cf6b 52%, transparent), transparent 72%),
    radial-gradient(58% 120% at 50% 118%, color-mix(in srgb, var(--card-accent, var(--z-accent)) 58%, transparent), transparent 70%);
}
/* A crown perched on top of the avatar */
body.students-page .student-avatar-wrap--leader { position: relative; }
body.students-page .leader-avatar-crown {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  z-index: 4; color: #ffd95e; line-height: 0;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}
body.students-page .leader-avatar-crown .torah-crown { width: 30px; height: 30px; vertical-align: top; }
body.students-page .student-card--leader .student-avatar {
  border-color: #fff6dd;
  box-shadow:
    0 0 0 4px #f4cf6b,
    0 0 0 6px color-mix(in srgb, #ffffff 22%, transparent),
    0 0 18px color-mix(in srgb, #f4cf6b 60%, transparent),
    0 10px 24px rgba(0,0,0,0.46);
}
/* Gradient-gold name */
body.students-page .student-card--leader .student-name {
  font-size: 1.05rem; font-weight: 900;
  background: linear-gradient(100deg, #ffe49a, #f4cf6b 50%, #d8a93b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
body.students-page .student-card--leader .student-headline.muted {
  color: color-mix(in srgb, #f4cf6b 42%, var(--z-muted)); opacity: 0.95; font-weight: 600;
}
/* "Leader" ribbon (replaces the old generic chip on the card) */
body.students-page .leader-ribbon {
  position: absolute; top: 8px; left: 8px; z-index: 4;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
  color: #2a1c05; background: linear-gradient(135deg, #fff2c8, #f4cf6b 50%, #c9962f);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 3px 10px rgba(160,110,20,0.5);
}
body.students-page .leader-ribbon .torah-crown { width: 0.95em; height: 0.95em; }
@media (prefers-reduced-motion: reduce) {
  body.students-page .student-card--leader { animation: none; }
  body.students-page .student-card--leader::after { animation: none; opacity: 0; }
}
/* Leader feed post: bold gold frame + gold avatar ring (keeps their colour theme inside) */
body.students-page .wall-post--leader {
  border: 2px solid color-mix(in srgb, #f4cf6b 70%, var(--z-line));
  box-shadow:
    0 0 0 1px color-mix(in srgb, #f4cf6b 30%, transparent),
    0 10px 28px color-mix(in srgb, #f4cf6b 14%, transparent);
}
body.students-page .wall-post--leader .wall-post-avatar .student-avatar {
  box-shadow: 0 0 0 2.5px #f4cf6b;
}
/* Leader profile modal: bold gold ring + gold banner */
body.students-page .student-modal--leader {
  box-shadow:
    0 0 0 2px #f4cf6b,
    0 0 40px color-mix(in srgb, #f4cf6b 28%, transparent),
    0 30px 80px rgba(0,0,0,0.5);
}
body.students-page .student-modal--leader .student-modal-banner {
  background: linear-gradient(135deg, #ffe49a, #f4cf6b 45%, #c9962f);
}
body.students-page .student-modal--leader .student-avatar {
  box-shadow: 0 0 0 3px #f4cf6b, 0 0 18px color-mix(in srgb, #f4cf6b 50%, transparent);
}
/* Leader deep-link affordance on the avatar/name/chip */
body.students-page [data-leader-link] { cursor: pointer; }
body.students-page .student-name[data-leader-link]:hover,
body.students-page .student-modal-name[data-leader-link]:hover { text-decoration: underline; text-underline-offset: 3px; }
body.students-page a.student-modal-chip { text-decoration: none; }
body.students-page .student-modal-leaderlink { margin-top: 8px; display: inline-flex; align-items: center; gap: 7px; }
/* "Request sent · Cancel" pending-request button */
body.students-page .chavrusa-cancel-hint { opacity: 0.75; font-size: 0.85em; }
body.students-page .chavrusa-cancel-btn:hover { border-color: color-mix(in srgb, #e0566f 55%, var(--z-line)); color: #ffb3c0; }
