/* Carib Alumni Network - professional design system
   Deep navy + warm gold + clean whites. LinkedIn/Airbnb-grade polish. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');
:root {
  --navy: #0b1f3a;
  --navy-deep: #071426;
  --navy-soft: #14304f;
  --gold: #c9a227;
  --gold-light: #e3b94e;
  --gold-pale: #faf3df;
  --white: #ffffff;
  --paper: #f7f9fc;
  --ink: #1a2332;
  --muted: #5b6b7f;
  --line: #e2e8f0;
  --green: #1e7e46;
  --green-bg: #e6f4ea;
  --red: #c0392b;
  --red-bg: #fdecea;
  --amber-bg: #fdf3e0;
  --amber-tx: #8a5a00;
  --blue-bg: #e8f0fe;
  --blue-tx: #1a56db;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow: 0 2px 10px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 8px 28px rgba(11, 31, 58, 0.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}
a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; letter-spacing: -0.01em; line-height: 1.25; font-weight: 600; }
.brand { font-family: "Fraunces", Georgia, serif; }

/* Header */
header.topbar {
  background: var(--navy);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 14px rgba(7,20,38,.25);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; max-width: 1020px; margin: 0 auto; padding: 12px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; color: var(--navy-deep);
}
.brand small { display: block; font-weight: 400; font-size: .68rem; color: rgba(255,255,255,.6); letter-spacing: .08em; text-transform: uppercase; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.85); border-radius: 6px; padding: 5px 9px;
  font-size: .75rem; font-weight: 600; cursor: pointer;
}
.lang-switch button.active { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }

/* Nav */
nav.mainnav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 58px; z-index: 200; }
/* Paul, 2026-10-19: the desktop bar hid every item past Jobs (Games,
   Dating, Gifts, Store) off-screen in a 1020px strip with no visible
   scrollbar, while the phone menu listed everything. The bar now wraps
   to two rows and widens, so desktop shows the SAME menu as the phone. */
.nav-scroll { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 6px 12px; max-width: 1240px; margin: 0 auto; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a {
  white-space: nowrap; padding: 9px 13px; border-radius: 8px; font-size: .86rem;
  color: var(--muted); font-weight: 600;
}
.nav-scroll a.active { background: var(--navy); color: #fff; }
.nav-scroll a:hover:not(.active) { background: var(--paper); color: var(--navy); }

/* Nav dropdown groups (Marketplace, Resources) */
.nav-group { position: relative; flex-shrink: 0; display: inline-flex; }
.nav-drop-btn {
  white-space: nowrap; padding: 9px 13px; border-radius: 8px; font-size: .86rem;
  color: var(--muted); font-weight: 600; background: none; border: none;
  cursor: pointer; font-family: inherit; line-height: 1.35;
}
.nav-drop-btn.active { background: var(--navy); color: #fff; }
.nav-drop-btn:hover:not(.active) { background: var(--paper); color: var(--navy); }
.nav-drop-btn .chev { font-size: .68rem; margin-left: 2px; }
.nav-drop {
  display: none; position: fixed; z-index: 500; min-width: 218px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px;
}
.nav-drop.open { display: block; }
.nav-scroll .nav-drop a {
  display: block; padding: 9px 12px; border-radius: 8px; font-size: .88rem;
  color: var(--ink); font-weight: 500; white-space: nowrap;
}
.nav-scroll .nav-drop a:hover { background: var(--paper); color: var(--navy); }
.nav-scroll .nav-drop a.active { background: var(--gold-pale); color: var(--navy); font-weight: 700; }

/* Admin sidebar layout (Paul, 2026-10-14): menu left, section right */
.admin-layout { display: flex; gap: 20px; align-items: flex-start; }
.admin-side {
  width: 208px; flex-shrink: 0; position: sticky; top: 158px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px;
}
.admin-side button {
  text-align: left; padding: 10px 12px; border: none; background: none; border-radius: 9px;
  font-family: Inter, sans-serif; font-size: .92rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.admin-side button:hover { background: var(--paper); }
.admin-side button.active { background: var(--navy); color: #fff; }
.admin-main { flex: 1; min-width: 0; }
.admin-section { display: none; }
.admin-section.active { display: block; }
@media (max-width: 880px) {
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; position: static; flex-direction: row; overflow-x: auto; }
  .admin-side button { white-space: nowrap; }
}

/* Hamburger panel on smaller screens - no hidden sliding menu (Paul, 2026-10-13) */
.nav-toggle { display: none; }
.temp-pw-banner {
  background: var(--gold); color: var(--navy-deep); text-align: center;
  padding: 9px 14px; font-size: .9rem; font-weight: 600;
}
.temp-pw-banner a { color: var(--navy-deep); text-decoration: underline; font-weight: 800; }
@media (max-width: 1080px) {
  .nav-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 11px 16px; background: var(--white); border: none; cursor: pointer;
    font-family: Inter, sans-serif; font-size: .95rem; font-weight: 700; color: var(--navy);
  }
  .nav-toggle-ico { font-size: 1.05rem; line-height: 1; }
  nav.mainnav .nav-scroll { display: none; }
  nav.mainnav.open .nav-scroll {
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    overflow-y: auto; max-height: calc(100vh - 128px); gap: 0; padding: 4px 10px 12px;
  }
  nav.mainnav.open .nav-group-account { order: -1; }
  nav.mainnav.open .nav-scroll a, nav.mainnav.open .nav-drop-btn {
    text-align: left; padding: 11px 12px; font-size: .95rem; display: block; width: 100%;
  }
  nav.mainnav.open .nav-group { display: block; }
  /* Groups stay CLOSED in the panel until tapped (accordion) - the drop's
     own .open class controls visibility, as on desktop. */
  nav.mainnav.open .nav-drop {
    position: static; box-shadow: none; border: none;
    min-width: 0; padding: 0 0 6px 16px;
  }
  nav.mainnav.open .nav-drop a { padding: 9px 12px; }
}
main { flex: 1; max-width: 1020px; width: 100%; margin: 0 auto; padding: 20px 16px; }
/* Rich site footer (Paul's reference design, 2026-10-13) */
.site-footer {
  background: var(--navy-deep); color: #aebdd1;
  margin-top: 48px; border-top: 3px solid var(--gold);
  text-align: left; font-size: .92rem;
}
.foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 44px 20px 30px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px;
}
.foot-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot-name { font-family: Fraunces, Georgia, serif; font-weight: 700; color: #fff; font-size: 1.14rem; line-height: 1.16; }
.foot-brand p { font-size: .9rem; line-height: 1.55; max-width: 310px; margin: 0; }
.foot-contact { margin-top: 18px; display: grid; gap: 9px; font-size: .9rem; }
.foot-contact div { display: flex; align-items: center; gap: 9px; }
.foot-contact svg { width: 16px; height: 16px; fill: var(--gold); flex-shrink: 0; }
.foot-contact a { color: #aebdd1; }
.foot-contact a:hover { color: var(--gold); }
.foot-col h4 {
  color: #fff; font-family: Inter, sans-serif; font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin: 4px 0 13px;
}
.foot-col a { display: block; color: #aebdd1; padding: 5px 0; font-size: .92rem; }
.foot-col a:hover { color: var(--gold); }
.foot-bar {
  border-top: 1px solid rgba(255,255,255,.12);
  max-width: 1200px; margin: 0 auto; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: .8rem; color: #8496b0;
}
.foot-admin { color: #8496b0; }
.foot-admin:hover { color: var(--gold); }
@media (max-width: 860px) { .foot-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-inner { grid-template-columns: 1fr; } }

/* Hero - photographic feel via layered gradients */
.hero {
  border-radius: 16px; padding: 56px 28px; text-align: center; margin-bottom: 24px;
  color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(201,162,39,.28), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(20,80,120,.55), transparent 55%),
    linear-gradient(150deg, #0b1f3a 0%, #0e2a4e 55%, #123a63 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .10;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero > * { position: relative; }
.hero .kicker {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-light); margin-bottom: 12px;
  border: 1px solid rgba(227,185,78,.4); padding: 6px 14px; border-radius: 20px;
}
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero p { opacity: .88; margin-bottom: 24px; font-size: 1rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .hero { padding: 40px 18px; } .hero h1 { font-size: 1.55rem; } }

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; font-weight: 700; font-size: .95rem;
  padding: 13px 24px; border-radius: 8px; text-align: center; transition: filter .12s, transform .06s;
  letter-spacing: .01em;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--navy-deep); box-shadow: 0 4px 14px rgba(201,162,39,.35); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.65); }
.btn-outline:hover { border-color: #fff; }
.btn-ghost { background: var(--paper); color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 9px 15px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Cards */
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px; margin-bottom: 16px; border: 1px solid var(--line);
}
.card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Stats */
.stats { display: flex; gap: 12px; margin: 20px 0; }
.stat {
  flex: 1; background: var(--white); border-radius: var(--radius); padding: 18px 8px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
}
a.stat { text-decoration: none; color: inherit; transition: box-shadow .15s; }
a.stat:hover { box-shadow: 0 4px 16px rgba(11,31,58,.12); }
a.stat:hover .num { color: var(--gold); }
.stat .num { font-size: 1.7rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.stat .label { font-size: .74rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 1rem; background: var(--white); color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,31,58,.10);
}
.form-group textarea { min-height: 96px; resize: vertical; }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.form-card { max-width: 480px; margin: 28px auto; }
.form-card h2 { text-align: center; margin-bottom: 20px; font-size: 1.5rem; }

/* Member cards */
.member-card { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.15rem;
  flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-info { flex: 1; min-width: 0; }
.member-info .name { font-weight: 700; }
.member-info .meta { font-size: .82rem; color: var(--muted); }

/* Listing cards */
.listing-card { padding: 0; overflow: hidden; }
.listing-img { width: 100%; height: 180px; object-fit: cover; background: var(--paper); }
.listing-body { padding: 14px 16px 16px; }
.listing-price { font-weight: 800; color: var(--navy); font-size: 1.15rem; }
.listing-meta { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin: 2px 4px 2px 0; letter-spacing: .02em; }
.badge-navy { background: var(--navy); color: #fff; }
.badge-gold { background: var(--gold-pale); color: #7a5c00; border: 1px solid #e8d48a; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber-tx); }
.badge-blue { background: var(--blue-bg); color: var(--blue-tx); }
.badge-muted { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: .92rem; background: #fff; flex: 1; min-width: 130px; color: var(--ink);
}
.search-row { display: flex; gap: 8px; margin-bottom: 14px; }
.search-row input { flex: 1; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 1rem; }

/* States */
.loading { text-align: center; padding: 44px 16px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .big { font-size: 2.2rem; margin-bottom: 10px; color: var(--line); }
.error-box { background: var(--red-bg); border: 1px solid #f2c4bd; color: var(--red); padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; }
.success-box { background: var(--green-bg); border: 1px solid #bfe3c9; color: var(--green); padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; }
.info-box { background: var(--blue-bg); border: 1px solid #c3d6f5; color: var(--blue-tx); padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; }
.notice-gold { background: var(--gold-pale); border: 1px solid #e8d48a; color: #6b5200; padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; }

/* Chat */
.chat-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; background: #ece9e1; border-radius: 14px; }
.msg { max-width: 80%; padding: 10px 13px 8px; border-radius: 14px; font-size: 1.02rem; line-height: 1.45; box-shadow: 0 1px 2px rgba(11,42,74,.16); overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; }
.msg .time { float: right; font-size: .68rem; opacity: .65; margin: 10px 0 0 12px; }
.msg img.msg-photo { display: block; max-width: min(240px, 100%); height: auto; border-radius: 10px; }
.msg.has-photo { width: min(260px, 100%); padding: 6px; }
.msg.has-photo img.msg-photo { width: 100%; max-width: 100%; margin-bottom: 4px; }
.msg.has-photo .msg-text { padding: 2px 6px 0; }
.chat-input { display: flex; align-items: center; gap: 8px; margin-top: 12px; position: sticky; bottom: 0; background: var(--paper); padding: 10px 0; }
.chat-input input { flex: 1; min-width: 0; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 24px; font-size: 1rem; }
.chat-icon-btn { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.chat-icon-btn:active { background: var(--gold-pale); }
.chat-icon-btn:disabled { opacity: .5; cursor: default; }
.emoji-panel { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.emoji-panel button { font-size: 1.35rem; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 8px; line-height: 1; }
.emoji-panel button:active { background: #eef1f5; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; background: #eef1f5; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: .85rem; color: var(--ink); }
.attach-chip img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.attach-chip button { background: none; border: none; font-size: 1.15rem; cursor: pointer; line-height: 1; padding: 2px 4px; color: var(--ink); }

/* Messages page fit (Paul, 2026-10-16): the composer row's intrinsic
   min-content (3 icon buttons + Send + the text input's default width)
   is ~485px. As a CSS-grid child, the chat card could not shrink below
   that, so opening a conversation stretched the whole page to ~543px on
   a 412px phone and he had to pinch to fit. Grid/flex children must be
   allowed to shrink below their min-content. */
#layout > .card { min-width: 0; }
.chat-input { min-width: 0; }
.chat-box { max-width: 100%; }

/* Chat panel header: back button (phones) + conversation name */
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chat-head h3 { margin: 0; min-width: 0; }
.chat-back {
  display: none; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--navy);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.chat-back:active { background: var(--gold-pale); }

/* Phones: conversation list and open chat are each full-width, one at a
   time - opening a chat hides the list, Back returns to it. */
@media (max-width: 700px) {
  #layout.chat-open #convoList { display: none; }
  .chat-back { display: inline-flex; }
  .chat-input .btn { padding: 12px 15px; }
}

/* Payment */
.pay-method { border: 1.5px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.pay-method.selected { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,31,58,.10); }
.pay-method .pm-name { font-weight: 700; }
.pay-method .pm-handle { font-size: .85rem; color: var(--navy); font-family: ui-monospace, monospace; background: var(--gold-pale); border: 1px solid #e8d48a; padding: 3px 10px; border-radius: 6px; display: inline-block; margin: 6px 0; }
.pay-method .pm-inst { font-size: .82rem; color: var(--muted); }

/* Tiers */
.tier-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 24px 20px; text-align: center; background: #fff; box-shadow: var(--shadow-sm); }
.tier-card.featured { border-color: var(--gold); box-shadow: var(--shadow-lg); position: relative; }
.tier-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy-deep); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 14px; border-radius: 12px; }
.tier-price { font-size: 2.1rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.tier-price small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.tier-features { text-align: left; margin: 16px 0; font-size: .9rem; }
.tier-features li { margin-bottom: 8px; list-style: none; padding-left: 26px; position: relative; }
.tier-features li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* Detail page */
.detail-img { width: 100%; max-height: 340px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; background: var(--paper); border: 1px solid var(--line); }
.spec-table { width: 100%; font-size: .92rem; border-collapse: collapse; margin: 12px 0; }
.spec-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 42%; }

/* Section titles */
.section-title { font-size: 1.3rem; margin: 6px 0 16px; font-weight: 800; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.page-head h2 { font-size: 1.35rem; font-weight: 800; }

/* Feature list on landing */
.features { display: grid; gap: 14px; margin: 22px 0; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  display: flex; align-items: center; justify-content: center; color: var(--gold-light);
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: .87rem; color: var(--muted); }
a.feature { text-decoration: none; color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease; }
a.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Verification code */
.code-input { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.code-input input {
  width: 48px; height: 58px; text-align: center; font-size: 1.5rem; font-weight: 800;
  border: 2px solid var(--line); border-radius: 8px; color: var(--navy);
}
.code-input input:focus { border-color: var(--navy); outline: none; }

/* Admin */
.admin-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: none; }
.admin-row .grow { flex: 1; min-width: 0; }
.admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--line); }
.tabs button {
  background: none; border: none; padding: 10px 14px; font-size: .9rem; font-weight: 700;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); }

/* Site header with login/signup */
.site-header {
  background: var(--navy);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-brand {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}
.header-brand .green { color: var(--gold-light); }
.header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}
.header-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}
.header-nav a:hover { color: var(--gold-light); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* Share buttons - prominent, mobile-friendly */
.share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}
.share-btn {
  flex: 1 1 auto;
  min-height: 44px;
  font-size: .92rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.share-wa {
  background: #25d366;
  color: #fff;
  border: none;
}
.share-wa:hover { background: #1fb857; }
.share-sms {
  background: #0b7aff;
  color: #fff;
  border: none;
}
.share-sms:hover { background: #0668d8; }
.share-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}

.form-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Two-column layout with right sidebar for ads */
.content-with-sidebar {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.main-content {
  flex: 1;
  min-width: 0;
}
.sidebar {
  width: 300px;
  flex-shrink: 0;
}
.ad-sidebar {
  position: sticky;
  top: 80px;
}
@media (max-width: 768px) {
  .content-with-sidebar {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .ad-sidebar {
    position: static;
  }
}

/* School links nested inside clickable member cards */
.school-link {
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
}
.school-link:hover { color: var(--gold, #c9a227); }

/* Modal / popup */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 640px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: modalIn .22s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(16px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-close {
  position: sticky; top: 0; float: right;
  width: 40px; height: 40px; margin: 8px 8px 0 0;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.06); color: #333;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  z-index: 2;
}
.modal-close:hover { background: rgba(0,0,0,.12); }
.modal-content { padding: 8px 22px 22px; }
@media (max-width: 600px) {
  .modal-overlay { padding: 0; }
  .modal-box { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}

/* --- Ad rotation carousel (vertical slide) --- */
.ad-carousel .ad-track {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* --- Sidebar ad stack: 3 ads fully visible, rotating upward every 7s --- */
.ad-stack { display: flex; flex-direction: column; gap: 14px; }
.ad-stack-item a { display: block; }
.ad-stack-item img {
  width: 100%; height: auto; display: block;
  border-radius: 12px; box-shadow: var(--shadow-sm);
}
.ad-stack-shift .ad-stack-item { animation: adStackUp .45s ease; }
@keyframes adStackUp {
  from { transform: translateY(16px); opacity: .3; }
  to { transform: none; opacity: 1; }
}
.ad-carousel .ad-slide a { display: block; }
.ad-carousel .ad-slide img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* --- IAB standard ad sizes: constrain creatives to their slot dimensions --- */
.ad-size-leaderboard img      { width: 100%; max-width: 728px; aspect-ratio: 728 / 90;  object-fit: cover; }
.ad-size-medium_rectangle img { width: 100%; max-width: 300px; aspect-ratio: 300 / 250; object-fit: cover; }
.ad-size-half_page img         { width: 100%; max-width: 300px; aspect-ratio: 300 / 600; object-fit: cover; }
.ad-size-mobile_banner img     { width: 100%; max-width: 320px; aspect-ratio: 320 / 50;  object-fit: cover; }
.ad-size-leaderboard, .ad-size-medium_rectangle,
.ad-size-half_page, .ad-size-mobile_banner { margin: 0 auto; }
.ad-size-medium_rectangle, .ad-size-half_page { max-width: 300px; }

/* Vehicle gallery */
.veh-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.veh-gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; }
.veh-gallery img:first-child { grid-column: 1 / -1; height: 260px; }
.veh-gallery img.zoomed { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1100; background: rgba(0,0,0,.9); border-radius: 0; cursor: zoom-out; }
@media (max-width: 480px) {
  .veh-gallery img { height: 140px; }
  .veh-gallery img:first-child { height: 200px; }
}

/* Property photo carousel (detail popup) */
.prop-carousel { position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: var(--navy-deep); }
.prop-carousel img { width: 100%; height: 320px; object-fit: cover; display: block; cursor: pointer; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.94); color: var(--navy);
  font-size: 1.35rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.car-btn:hover { background: #fff; }
.car-prev { left: 10px; }
.car-next { right: 10px; }
.car-count {
  position: absolute; right: 12px; bottom: 10px;
  background: rgba(7,20,38,.72); color: #fff;
  font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--gold-pale); border: 1px solid #e8d48a; color: var(--amber-tx);
  font-size: .8rem; font-weight: 600; padding: 3px 11px; border-radius: 999px;
}

/* Back / Home bar (injected on every inner page) */
.page-tools { display: flex; gap: 8px; margin-bottom: 14px; }

/* Floating back-to-top button (injected by Layout.init on every page) */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: var(--gold-light);
  font-size: 1.3rem; line-height: 1; font-family: inherit;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:active { background: var(--navy-soft); }

/* Notable Alumni: composed two-per-row desktop grid (Paul, 2026-10-14) */
.notable-grid { display: grid; gap: 18px; grid-template-columns: 1fr; max-width: 1020px; margin: 0 auto; }
@media (min-width: 860px) { .notable-grid { grid-template-columns: 1fr 1fr; } }
.notable-grid .card { padding: 28px 24px; }

/* Notable Alumni: school attribution line (label + distinct school link) */
.notable-school { font-size: .88rem; color: var(--muted); margin: 2px 0 8px; }
.notable-school a { color: #8a6d14; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Profile 2.0: cover banner + photo gallery */
.profile-head { padding: 0; overflow: hidden; }
.profile-cover {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-bottom: 3px solid var(--gold);
  color: #fff; text-align: center; padding: 26px 16px 60px;
}
.profile-cover-school { font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.profile-cover-meta { color: var(--gold-light); font-size: .92rem; margin-top: 5px; }
.profile-head-body { text-align: center; padding: 0 20px 28px; }
.profile-avatar-wrap { margin-top: -48px; display: flex; justify-content: center; }
.profile-avatar-wrap .avatar { border: 3px solid var(--gold); background: var(--navy); box-shadow: 0 2px 10px rgba(11, 31, 58, .25); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery-grid img { width: 100%; height: 112px; object-fit: cover; border-radius: 10px; display: block; background: var(--paper); }
.gallery-thumb { cursor: pointer; }
.gallery-item { min-width: 0; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(7, 20, 38, .93);
  display: flex; align-items: center; justify-content: center; padding: 16px; cursor: pointer;
}
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 10px; right: 16px; background: none; border: none;
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; padding: 6px;
}

/* ============================================================
   Social posts: profile wall, home feed, school class memories
   ============================================================ */
.post-card { margin-bottom: 0; }
.posts-items .post-card + .post-card { margin-top: 14px; }
.posts-more-wrap { text-align: center; margin-top: 14px; }
.posts-more-wrap:empty { display: none; }

.post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.post-head .avatar { flex-shrink: 0; }
.post-head-main { flex: 1; min-width: 0; }
.post-author { font-weight: 700; color: var(--navy); font-size: .98rem; }
.post-author:hover { text-decoration: underline; }
.post-sub { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.post-class-tag {
  display: inline-block; background: var(--gold-pale); border: 1px solid #e8d48a;
  color: var(--amber-tx); font-size: .72rem; font-weight: 700;
  padding: 1px 8px; border-radius: 999px; vertical-align: middle;
}
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .96rem; }

.post-photos { display: grid; gap: 6px; margin-top: 12px; }
.post-photos img {
  width: 100%; height: 100%; object-fit: cover; cursor: pointer;
  display: block; background: var(--paper); border-radius: 8px;
}
.post-photos.n-1 { grid-template-columns: 1fr; }
.post-photos.n-1 img { height: auto; max-height: 420px; }
.post-photos.n-2 { grid-template-columns: 1fr 1fr; }
.post-photos.n-2 img { aspect-ratio: 4 / 3; }
.post-photos.n-3, .post-photos.n-4, .post-photos.n-5, .post-photos.n-6,
.post-photos.n-7, .post-photos.n-8, .post-photos.n-9, .post-photos.n-10 {
  grid-template-columns: repeat(3, 1fr);
}
.post-photos.n-3 img, .post-photos.n-4 img, .post-photos.n-5 img, .post-photos.n-6 img,
.post-photos.n-7 img, .post-photos.n-8 img, .post-photos.n-9 img, .post-photos.n-10 img {
  aspect-ratio: 1 / 1;
}

.post-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
}
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.like-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.like-btn:active { background: var(--gold-pale); }
.like-btn.liked { background: var(--gold-pale); border-color: var(--gold); color: var(--navy); }
.like-btn.liked svg { fill: var(--gold); stroke: var(--gold); }
.like-btn:disabled { opacity: .55; cursor: default; }
.post-comment-count {
  background: none; border: none; font-family: inherit; padding: 6px 2px;
  font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.post-delete {
  margin-left: auto; background: none; border: none; font-family: inherit;
  color: var(--red); font-size: .85rem; font-weight: 600; cursor: pointer; padding: 6px 4px;
}
.post-delete:disabled { opacity: .55; cursor: default; }

.post-comments { margin-top: 4px; }
.post-comments .comments-list:empty + .comment-form { margin-top: 4px; }
.post-comment { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; }
.post-comment .avatar { flex-shrink: 0; }
.comment-main {
  flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 10px; font-size: .9rem;
}
.comment-author { font-weight: 700; color: var(--navy); font-size: .86rem; margin-right: 6px; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-delete {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 5px 4px; flex-shrink: 0;
}
.comment-delete:hover { color: var(--red); }
.comment-delete:disabled { opacity: .55; cursor: default; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input {
  flex: 1; min-width: 0; padding: 9px 14px; border: 1.5px solid var(--line);
  border-radius: 999px; font-size: .92rem; font-family: inherit; background: #fff; color: var(--ink);
}
.comment-form input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,31,58,.10); }
.comment-form .btn { flex-shrink: 0; }

/* Composer */
.post-composer { margin: 12px 0 4px; }
.composer-text {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; resize: vertical; min-height: 76px;
  background: #fff; color: var(--ink);
}
.composer-text:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,31,58,.10); }
.composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.composer-note { font-size: .8rem; color: var(--muted); }
.composer-publish { margin-left: auto; }
.composer-add.disabled { opacity: .5; pointer-events: none; }
.composer-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.composer-photos:not(:empty) { margin-top: 10px; }
.composer-thumb { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.composer-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; background: var(--paper); }
.composer-thumb .composer-remove {
  position: absolute; top: -7px; right: -7px; width: 21px; height: 21px;
  border-radius: 50%; border: none; background: var(--navy); color: #fff;
  font-size: .9rem; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.composer-msg { margin-top: 10px; }
.composer-msg:empty { display: none; }
.composer-msg .error-box, .composer-msg .success-box { margin-bottom: 0; }

/* Post + feed ad videos */
.post-video { margin-top: 12px; }
.post-video video { width: 100%; border-radius: 10px; display: block; background: #000; }
.composer-add-video.disabled { opacity: .5; pointer-events: none; }
.composer-video:not(:empty) { margin-top: 10px; }
.composer-video-preview {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px;
}
.composer-video-preview video { width: 120px; max-height: 80px; border-radius: 8px; display: block; background: #000; flex-shrink: 0; }
.composer-video-name { flex: 1; min-width: 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.composer-remove-video {
  width: 24px; height: 24px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--navy); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Feed ads interleaved in the home feed */
.feed-ad-sponsored {
  font-size: .68rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 8px;
}
.feed-ad-link { display: block; color: inherit; text-decoration: none; }
.feed-ad-media img { width: 100%; height: auto; display: block; border-radius: 10px; }
.feed-ad-title { font-weight: 700; color: var(--navy); margin-top: 10px; }

/* School class-year picker */
.year-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.year-chips:empty { display: none; }
.year-chip {
  background: #fff; border: 1.5px solid var(--line); color: var(--navy);
  font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
}
.year-chip:hover { border-color: var(--gold); }
.year-chip.active { background: var(--gold-pale); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.year-picker-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.year-picker-row label { font-size: .88rem; color: var(--muted); }
.year-input {
  width: 110px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink);
}
.year-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,31,58,.10); }
#yearComposer:empty, #yearWall:empty, #wallComposer:empty, #feedComposer:empty { display: none; }
#yearWall, #wallList, #feedList { margin-top: 14px; }

/* Phones (412px and down): photo grids collapse to 2 columns */
@media (max-width: 480px) {
  .post-card { padding: 16px; }
  .post-photos.n-3, .post-photos.n-4, .post-photos.n-5, .post-photos.n-6,
  .post-photos.n-7, .post-photos.n-8, .post-photos.n-9, .post-photos.n-10 {
    grid-template-columns: repeat(2, 1fr);
  }
  .composer-publish { margin-left: 0; }
  .comment-form .btn { padding: 9px 13px; }
}
