/* =========================================================
   Family Portal — shared styles
   Used across every page under /family/. Imported AFTER
   ../styles.css so it can override the dark site shell.
   ========================================================= */

body.family-body { background: #f4f6fa; }

/* ---------- Header ---------- */
.portal-header {
  background: #fff;
  border-bottom: 1px solid #e3e7ee;
  position: sticky;
  top: 0;
  z-index: 50;
}
.portal-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.portal-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.portal-brand .logo .logo-text {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.portal-brand .logo img.logo-mark {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-sm, 6px);
}
.portal-brand .sub-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  border-left: 1px solid #d6dce5;
  padding-left: 0.75rem;
  margin-left: 0.3rem;
}
.portal-brand .sub-label .top {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}
.portal-brand .sub-label .bottom {
  font-size: 0.92rem;
  color: var(--navy);
  font-weight: 600;
  font-family: var(--font-heading);
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.portal-nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-weight: 500;
}
.portal-nav a:hover { color: var(--navy); background: #f4f6fa; }
.portal-nav a.active { color: var(--navy); font-weight: 600; }

/* ---------- Header right cluster (auth + icons) ---------- */
.portal-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.portal-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
}
.portal-icon-btn:hover { background: #eef2f7; }
.portal-icon-btn .badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--orange);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sign-in-btn {
  background: var(--navy);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.sign-in-btn:hover { background: #001643; }

.user-menu {
  position: relative;
}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #eef2f7;
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  border: none;
}
.user-menu-trigger .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef5e37, #ffb342);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
}
.user-menu-trigger .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  min-width: 240px;
  box-shadow: 0 8px 28px rgba(0,32,92,0.12);
  padding: 0.5rem;
  display: none;
  z-index: 80;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown .um-head {
  padding: 0.6rem 0.75rem 0.7rem;
  border-bottom: 1px solid #f0f2f6;
  margin-bottom: 0.3rem;
}
.user-menu-dropdown .um-head .name { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.user-menu-dropdown .um-head .email { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.user-menu-dropdown a, .user-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  border: 0; background: transparent;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: #f4f6fa; color: var(--navy); }
.user-menu-dropdown i { width: 16px; color: var(--text-light); }
.user-menu-dropdown .um-sep { height: 1px; background: #f0f2f6; margin: 0.3rem 0; }

/* ---------- Sign-in banner (signed-out users) ---------- */
.signin-banner {
  background: linear-gradient(90deg, #00205C 0%, #1a3a82 100%);
  color: #fff;
  padding: 0.65rem 0;
  border-bottom: 2px solid var(--skai-blue, #85DADE);
}
.signin-banner-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
}
.signin-banner-left { display: flex; align-items: center; gap: 0.6rem; flex: 1; }
.signin-banner-left i { color: var(--skai-blue, #85DADE); }
.signin-banner a.cta {
  background: var(--skai-blue, #85DADE);
  color: var(--navy);
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
}
.signin-banner a.cta:hover { background: #fff; }
.signin-banner .dismiss {
  background: transparent; border: 0; color: rgba(255,255,255,0.7);
  cursor: pointer; padding: 0.3rem 0.5rem;
}
.signin-banner .dismiss:hover { color: #fff; }

/* ---------- Debug-mode toggle (footer dot + banner) ---------- */
.debug-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d6dce5;
  cursor: pointer;
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: background 0.2s;
}
.debug-dot:hover { background: #9aa3b5; }
body.debug-on .debug-dot { background: var(--orange, #EF5E37); box-shadow: 0 0 8px var(--orange, #EF5E37); }

.debug-banner {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--navy, #00205C), #1a3a82);
  color: #fff;
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 9998;
  box-shadow: 0 6px 18px rgba(0,32,92,0.25);
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(133, 218, 222, 0.45);
}
body.debug-on .debug-banner { display: inline-flex; }
.debug-banner i { color: var(--skai-blue, #85DADE); }
.debug-banner .x-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.8rem;
  margin-left: 0.3rem;
}
.debug-banner .x-close:hover { color: #fff; }

/* Anything tagged .staff-only is hidden until debug mode is on */
.staff-only { display: none !important; }
body.debug-on .staff-only { display: revert !important; }
body.debug-on .staff-only.lift-pill { display: inline-flex !important; }

/* ---------- Footer ---------- */
.portal-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--text-light);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #e6eaf1;
  align-items: center;
}
.portal-footer a { color: var(--text-secondary); margin: 0 0.5rem; text-decoration: none; }
.portal-footer a:hover { color: var(--navy); }

/* ---------- Toast (lightweight) ---------- */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy, #00205C);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,32,92,0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.success { background: #4a6b00; }
.toast.error { background: #b54300; }

/* ---------- Contribute tile-grid ---------- */
.contribute-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}
.contribute-tile {
  background: #fff;
  border: 1px solid #e6eaf1;
  border-radius: 10px;
  padding: 0.75rem 0.65rem;
  text-decoration: none;
  text-align: center;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.contribute-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange, #EF5E37);
  box-shadow: 0 4px 12px rgba(0,32,92,0.08);
}
.contribute-tile i {
  font-size: 1.2rem;
  color: var(--orange, #EF5E37);
}

/* ---------- Reusable card patterns (used by new pages) ---------- */
.simple-shell {
  max-width: 820px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}
.simple-shell h1 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}
.simple-shell .lead {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}
.form-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e6eaf1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.form-row .hint {
  font-size: 0.78rem;
  color: var(--text-light);
}
.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="email"],
.form-row textarea,
.form-row select {
  padding: 0.65rem 0.8rem;
  border: 1px solid #d6dce5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text-primary);
}
.form-row textarea {
  min-height: 140px;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none; border-color: var(--navy);
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: #001643; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid #d6dce5;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn-secondary:hover { background: #f4f6fa; }
.signed-in-required {
  background: rgba(255, 179, 66, 0.12);
  border-left: 4px solid var(--gold, #FFB342);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  color: var(--navy);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.signed-in-required a { color: var(--navy); font-weight: 700; text-decoration: underline; }

/* ---------- Loading skeleton ---------- */
.skeleton-post {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e6eaf1;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.skeleton-post .sk-img {
  height: 240px;
  background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: skshimmer 1.4s infinite;
}
.skeleton-post .sk-body { padding: 1.2rem 1.4rem 1.4rem; }
.skeleton-post .sk-line {
  height: 14px;
  background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: skshimmer 1.4s infinite;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.skeleton-post .sk-line.short { width: 40%; }
.skeleton-post .sk-line.med { width: 75%; }
@keyframes skshimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* =========================================================
   v2 PARITY EXTENSIONS  (notifications, tour, share modal,
   account hub, language toggle, mobile hamburger)
   ========================================================= */

/* ---------- Language toggle (EN | ES) pill ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2f7;
  padding: 3px;
  margin-right: 0.25rem;
  height: 32px;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.lang-toggle button.active {
  background: var(--navy);
  color: #fff;
}

/* ---------- Notifications dropdown ---------- */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 12px 32px rgba(0,32,92,0.15);
  display: none;
  z-index: 80;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f2f6;
}
.notif-head .title {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.notif-head .mark-all {
  background: 0; border: 0;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
.notif-head .mark-all:hover { color: var(--orange); }
.notif-list {
  max-height: 440px;
  overflow-y: auto;
}
.notif-row {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f2f6;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.12s;
}
.notif-row:hover { background: #f7f9fc; }
.notif-row.unread { background: rgba(133, 218, 222, 0.07); }
.notif-row.unread::before {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  background: var(--orange);
  border-radius: 50%;
}
.notif-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef2f7;
  color: var(--navy);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.notif-icon.warning { background: rgba(239, 94, 55, 0.12); color: var(--orange); }
.notif-icon.financial_aid { background: rgba(255, 179, 66, 0.18); color: #b88200; }
.notif-icon.student_data { background: rgba(133, 218, 222, 0.18); color: #006b75; }
.notif-icon.community { background: rgba(129, 188, 1, 0.18); color: #4a6b00; }
.notif-icon.message { background: rgba(0, 32, 92, 0.08); color: var(--navy); }
.notif-icon.counseling { background: rgba(176, 124, 217, 0.18); color: #6a3aa5; }
.notif-icon.post_reply { background: rgba(0, 32, 92, 0.06); color: var(--navy); }

.notif-body { flex: 1; min-width: 0; }
.notif-body .nb-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.88rem;
  line-height: 1.3;
  margin: 0 0 2px;
}
.notif-body .nb-text {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-body .nb-meta {
  font-size: 0.72rem;
  color: var(--text-light);
}
.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.notif-actions button {
  background: transparent;
  border: 0;
  color: var(--text-light);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  white-space: nowrap;
}
.notif-actions button:hover { background: #eef2f7; color: var(--navy); }
.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.88rem;
}
.notif-empty i {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}
.notif-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid #f0f2f6;
  text-align: center;
  background: #fafbfc;
}
.notif-footer a {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.notif-footer a:hover { color: var(--orange); }

/* ---------- Tour modal ---------- */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.tour-overlay.open { display: flex; }
.tour-card {
  background: #fff;
  border-radius: 18px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tour-hero {
  height: 180px;
  background:
    linear-gradient(180deg, rgba(0,32,92,0.2), rgba(0,32,92,0.85)),
    url('https://images.unsplash.com/photo-1562774053-701939374585?w=900&h=400&fit=crop&q=80') center/cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.5rem;
}
.tour-hero .step-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--skai-blue, #85DADE);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.tour-hero h2 {
  font-family: var(--font-heading, Georgia);
  color: #fff;
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.2;
}
.tour-body {
  padding: 1.5rem 1.75rem 0.5rem;
}
.tour-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
}
.tour-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem 0 0.5rem;
}
.tour-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d6dce5;
  transition: background 0.18s, transform 0.18s;
}
.tour-dots span.active {
  background: var(--orange, #EF5E37);
  transform: scale(1.3);
}
.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1rem 1.5rem 1.5rem;
}
.tour-foot .left { display: flex; gap: 0.5rem; align-items: center; }
.tour-btn {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}
.tour-btn:hover { background: #001643; }
.tour-btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid #d6dce5;
}
.tour-btn.secondary:hover { background: #f4f6fa; }
.tour-btn.link {
  background: transparent;
  color: var(--text-light);
  padding: 0.4rem 0.6rem;
  font-weight: 500;
  text-decoration: underline;
}
.tour-btn.link:hover { color: var(--navy); background: transparent; }

/* ---------- Share-with-student modal ---------- */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9995;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.share-overlay.open { display: flex; }
.share-card {
  background: #fff;
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.share-card h3 {
  font-family: var(--font-heading, Georgia);
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.share-card .lead {
  color: var(--text-secondary);
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
  line-height: 1.5;
}
.share-card .field-group { margin-bottom: 0.95rem; }
.share-card label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.share-card input[type="text"],
.share-card input[type="email"],
.share-card input[type="tel"],
.share-card textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d6dce5;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-primary);
}
.share-card input:focus, .share-card textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.share-card textarea { min-height: 90px; resize: vertical; }
.share-radio-row {
  display: flex;
  gap: 0.5rem;
}
.share-radio-row label {
  flex: 1;
  text-align: center;
  border: 1.5px solid #d6dce5;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.84rem;
  margin: 0;
}
.share-radio-row input { display: none; }
.share-radio-row label.checked {
  border-color: var(--navy);
  background: rgba(0,32,92,0.06);
  color: var(--navy);
}
.share-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.share-foot button {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}
.share-foot button.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid #d6dce5;
}
.share-foot button:hover { background: #001643; }
.share-foot button.secondary:hover { background: #f4f6fa; }
.share-card .alert {
  background: rgba(255, 179, 66, 0.12);
  border-left: 3px solid var(--gold, #FFB342);
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

/* ---------- "Sent to your student" badge on post ---------- */
.sent-to-student-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(129, 188, 1, 0.16);
  color: #2c5e00;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.4rem;
}
.sent-to-student-pill i { font-size: 0.65rem; }

/* Add a "share with student" button on the post-share strip */
.post-share .ws {
  background: linear-gradient(135deg, var(--navy, #00205C), #1a3a82);
}
.post-share .ws i { color: var(--skai-blue, #85DADE); }

/* ---------- Account hub ---------- */
.account-hero {
  background: linear-gradient(135deg, var(--navy, #00205C), #1a3a82);
  color: #fff;
  padding: 2.25rem 0 5rem;
}
.account-hero-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.account-hero h1 {
  font-family: var(--font-heading, Georgia);
  color: #fff;
  font-size: 2rem;
  margin: 0 0 0.4rem;
}
.account-hero p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 0.95rem;
}
.account-shell {
  max-width: 980px;
  margin: -3.5rem auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.account-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,32,92,0.08);
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid #e6eaf1;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.account-card .avatar-lg {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange, #EF5E37), var(--gold, #FFB342));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
}
.account-card .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.account-card .who { flex: 1; min-width: 0; }
.account-card .who .nm {
  font-family: var(--font-heading, Georgia);
  font-size: 1.3rem;
  color: var(--navy, #00205C);
  margin: 0 0 0.25rem;
}
.account-card .who .em { color: var(--text-secondary); font-size: 0.88rem; }
.account-card .who .badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,32,92,0.06);
  color: var(--navy);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-top: 0.4rem;
}
.account-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.95rem;
}
.account-tile {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6eaf1;
  padding: 1.15rem 1.2rem 1.1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.account-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange, #EF5E37);
  box-shadow: 0 6px 16px rgba(0,32,92,0.07);
}
.account-tile-ic {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(133, 218, 222, 0.18);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.account-tile-body h3 {
  font-family: var(--font-body);
  color: var(--navy);
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
  font-weight: 700;
}
.account-tile-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* ---------- Account sub-page shell ---------- */
.account-sub-shell {
  max-width: 760px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
}
.account-sub-shell .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}
.account-sub-shell .breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.account-sub-shell .breadcrumb a:hover { color: var(--navy); }
.account-sub-shell h1 {
  font-family: var(--font-heading, Georgia);
  color: var(--navy);
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
}
.account-sub-shell .lead {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Notification-prefs grid */
.notif-prefs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e6eaf1;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.88rem;
}
.notif-prefs-table th,
.notif-prefs-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #f0f2f6;
  text-align: center;
}
.notif-prefs-table th {
  background: #f4f6fa;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.notif-prefs-table td:first-child,
.notif-prefs-table th:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--navy);
}
.notif-prefs-table tr:last-child td { border-bottom: 0; }
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
}
.toggle-switch input { display: none; }
.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: #d6dce5;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s;
}
.toggle-switch .slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
}
.toggle-switch input:checked + .slider { background: var(--navy); }
.toggle-switch input:checked + .slider::before { transform: translateX(16px); }

/* Order / event rows */
.order-row, .event-row {
  background: #fff;
  border: 1px solid #e6eaf1;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.order-row .ic, .event-row .ic {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(133,218,222,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.order-row .body, .event-row .body { flex: 1; min-width: 0; }
.order-row .body h4, .event-row .body h4 {
  font-family: var(--font-body);
  color: var(--navy);
  margin: 0 0 0.18rem;
  font-size: 0.96rem;
}
.order-row .body .meta, .event-row .body .meta {
  font-size: 0.78rem;
  color: var(--text-light);
}
.order-row .right, .event-row .right {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.event-row .right .pill,
.order-row .right .pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(129, 188, 1, 0.18);
  color: #4a6b00;
}
.order-row .right .pill.refunded { background: rgba(239,94,55,0.15); color: #b54300; }
.order-row .right .pill.upcoming, .event-row .right .pill.upcoming {
  background: rgba(255,179,66,0.18); color: #8a5500;
}

/* FERPA-connections rows */
.ferpa-row {
  background: #fff;
  border: 1px solid #e6eaf1;
  border-radius: 12px;
  padding: 1.05rem 1.2rem;
  margin-bottom: 0.85rem;
}
.ferpa-row .top {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 0.65rem;
}
.ferpa-row .top .av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a82, #00205C);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
}
.ferpa-row .top .who { flex: 1; min-width: 0; }
.ferpa-row .top .who .nm { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.ferpa-row .top .who .meta { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.ferpa-row .scopes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.65rem; }
.ferpa-row .scopes .scope {
  background: rgba(133, 218, 222, 0.18);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}
.ferpa-row .scopes .scope.denied {
  background: rgba(239, 94, 55, 0.12);
  color: #b54300;
}
.ferpa-row .row-actions { display: flex; gap: 0.5rem; }
.ferpa-row .row-actions button {
  background: #fff;
  border: 1px solid #d6dce5;
  border-radius: 6px;
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  font-weight: 600;
}
.ferpa-row .row-actions button:hover { background: #f4f6fa; }
.ferpa-row .row-actions button.danger { color: #b54300; }
.ferpa-row .row-actions button.danger:hover { background: rgba(239,94,55,0.08); border-color: #ef5e37; }

/* Discover Campuses tiles */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.05rem;
  margin-top: 1.5rem;
}
.discover-tile {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e6eaf1;
  padding: 1.5rem 1.25rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
}
.discover-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,32,92,0.1);
}
.discover-tile .logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy, #00205C), #1a3a82);
  color: #fff;
  font-family: var(--font-heading, Georgia);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.discover-tile h3 {
  font-family: var(--font-body);
  color: var(--navy);
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.discover-tile .city {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.95rem;
}
.discover-tile .summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.discover-tile .open-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
}
.discover-tile .open-btn:hover { background: #001643; }
.discover-tile.add-tile {
  border: 2px dashed #cbd2dc;
  background: #fafbfc;
  color: var(--text-light);
}
.discover-tile.add-tile:hover { border-color: var(--orange); }
.discover-tile.add-tile .logo {
  background: transparent;
  color: var(--text-light);
  border: 2px dashed #cbd2dc;
}

/* InfoPane (used on Discover Campuses, FERPA pages, etc.) */
.info-pane {
  background: rgba(133, 218, 222, 0.15);
  border-left: 4px solid var(--skai-blue, #85DADE);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.55;
}
.info-pane strong { color: var(--navy); }
.info-pane .title { display: block; color: var(--navy); font-weight: 700; margin-bottom: 0.3rem; font-size: 0.96rem; }

/* =========================================================
   MOBILE-RESPONSIVE — hamburger nav + stacking
   ========================================================= */

/* Hamburger checkbox pattern — purely CSS */
.portal-hamburger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--navy);
  font-size: 1.05rem;
}
.portal-hamburger:hover { background: #eef2f7; border-radius: 8px; }
#portal-nav-toggle { display: none; }

/* Replace the old @media (max-width: 720px) with a more
   complete responsive system. */
@media (max-width: 980px) {
  .portal-header-inner { padding: 0 1rem; }
  .portal-brand .sub-label { display: none; }
  .portal-hamburger { display: inline-flex; }
  .portal-nav {
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid #e6eaf1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem;
    box-shadow: 0 8px 20px rgba(0,32,92,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease-in-out;
  }
  #portal-nav-toggle:checked ~ .portal-header .portal-nav,
  body.portal-nav-open .portal-nav { max-height: 70vh; overflow-y: auto; }
  .portal-nav a {
    padding: 0.8rem 0.9rem;
    border-radius: 0;
    border-bottom: 1px solid #f0f2f6;
  }
  .portal-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .portal-header-inner { height: 60px; }
  .portal-actions .lang-toggle { display: none; }
  .portal-actions .user-menu-trigger span:not(.avatar) { display: none; }
  .portal-actions .user-menu-trigger { padding: 4px 4px 4px 4px; }
  .portal-actions .user-menu-trigger .fa-chevron-down { display: none; }
  .portal-shell { padding: 1rem; }
  .portal-aside-left,
  .portal-aside-right { grid-column: 1 / -1; position: static !important; }
  .portal-aside-left .aside-card,
  .portal-aside-right .aside-card { margin-bottom: 0.8rem; }
  .post-image { height: 200px; }
  .post-body { padding: 1rem 1.1rem 1.1rem; }
  .post-body h3 { font-size: 1.15rem; }
  .post-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .post-share a { font-size: 0.85rem; }
  .signin-banner-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .signin-banner-left { font-size: 0.82rem; }
  .feed-meta { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .form-card { padding: 1.4rem 1.1rem; }
  .account-card { flex-direction: column; text-align: center; }
  .account-tiles { grid-template-columns: 1fr; }
  .calendar-item .info a { font-size: 0.86rem; }
  .notif-dropdown { width: calc(100vw - 32px); right: 16px; }
  .tour-card { max-width: 100%; }
  .tour-hero { height: 140px; padding: 1rem 1.2rem; }
  .tour-hero h2 { font-size: 1.2rem; }
  .share-card { padding: 1.25rem; }
  .share-radio-row { flex-direction: column; }
  .share-radio-row label { text-align: left; }
  .discover-grid { grid-template-columns: 1fr; }
  .notif-prefs-table {
    font-size: 0.78rem;
  }
  .notif-prefs-table th,
  .notif-prefs-table td { padding: 0.5rem 0.4rem; }
}

@media (max-width: 480px) {
  .portal-brand .logo .logo-text { font-size: 1.2rem; }
  .portal-brand .logo img.logo-mark { height: 30px; }
  .portal-actions .portal-icon-btn { width: 36px; height: 36px; }
  .portal-actions .user-menu-trigger .avatar { width: 28px; height: 28px; }
  .post-share a { padding: 0.55rem 0; }
  .order-row, .event-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .order-row .right, .event-row .right { text-align: left; }
  .tour-foot { flex-wrap: wrap; }
  .tour-foot .left { order: 2; width: 100%; justify-content: space-between; }
}

/* =========================================================
   A11y — Skip-to-main-content link (WCAG 2.1 AA §2.4.1)
   Injected by family-portal.js enhanceA11y() as the first
   focusable element on every family-portal page. Visually
   hidden until focused, then becomes a navy pill at top-left.
   ========================================================= */
.family-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--navy, #00205C);
  color: #fff;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.family-skip-link:focus {
  left: 0;
  outline: 3px solid var(--skai, #85DADE);
  outline-offset: 2px;
}

/* Consistent keyboard-focus ring on every interactive element.
   :focus-visible only matches keyboard focus (not mouse-click
   focus), so sighted mouse users keep the existing styled active
   states while keyboard / screen-reader users get a clear
   visible-focus indicator (WCAG 2.1 AA §2.4.7). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--skai, #85DADE);
  outline-offset: 2px;
}

/* =========================================================
   Language picker — 9-language dropdown that replaces the
   old EN/ES pill toggle. Trigger is a small globe button in
   the header; click opens a panel of language rows showing
   native + English label + checkmark on the active one.
   ========================================================= */
.lang-toggle { position: relative; display: inline-flex; align-items: center; }
.lang-picker-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.6);
  border: 1px solid #e6eaf1;
  border-radius: 18px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy, #00205C);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lang-picker-trigger:hover { background: #fff; border-color: var(--skai, #85DADE); }
.lang-picker-trigger .lang-picker-chevron { font-size: 9px; opacity: 0.7; transition: transform 0.15s ease; }
.lang-picker-trigger[aria-expanded="true"] .lang-picker-chevron { transform: rotate(180deg); }
.lang-picker-trigger .lang-picker-label { max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-picker-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  z-index: 600;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e6eaf1;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,32,92,0.12);
  list-style: none; margin: 0; padding: 6px;
  max-height: 70vh; overflow-y: auto;
}
.lang-picker-menu.open { display: block; }
.lang-picker-menu li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--navy, #00205C);
}
.lang-picker-menu li:hover { background: rgba(133,218,222,0.12); }
.lang-picker-menu li.active { background: rgba(0,32,92,0.06); font-weight: 600; }
.lang-picker-menu .lang-picker-native { flex: 1; }
.lang-picker-menu .lang-picker-en {
  font-size: 11px; color: var(--text-light, #6b7280); font-weight: 400;
}
.lang-picker-menu .fa-check { color: var(--orange, #EF5E37); font-size: 12px; }

/* RTL support: when documentElement.dir === "rtl" (Arabic), flip horizontal
   layout for the language picker and the rest of the portal. */
html[dir="rtl"] .lang-picker-menu { right: auto; left: 0; }
html[dir="rtl"] .portal-aside-left { order: 2; }
html[dir="rtl"] .portal-aside-right { order: 0; }
html[dir="rtl"] .post-share { flex-direction: row-reverse; }
html[dir="rtl"] .calendar-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .feed-meta { flex-direction: row-reverse; }
html[dir="rtl"] .feed-filter { flex-direction: row-reverse; }
html[dir="rtl"] .lang-picker-trigger .lang-picker-chevron { /* keep — chevron is bi-directional */ }

/* =========================================================
   UGC translation badge — shown beneath user-generated post
   titles / bodies after i18n.js translates them. Reveals the
   source language and a "See original ↔ See translation"
   toggle. Designed to feel like a system annotation, not
   part of the post itself.
   ========================================================= */
.ugc-translate-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 10px;
  padding: 4px 10px;
  background: rgba(133,218,222,0.14);
  border: 1px solid rgba(133,218,222,0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--navy, #00205C);
  line-height: 1.4;
}
.ugc-translate-badge .fa-language { color: var(--skai, #85DADE); font-size: 11px; }
.ugc-translate-badge .ugc-see-original {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--orange, #EF5E37);
  cursor: pointer; text-decoration: underline;
}
.ugc-translate-badge .ugc-see-original:hover { color: var(--navy, #00205C); }
