/* ================= DESIGN TOKENS ================= */
:root {
  --bg: #f3efe9;
  --bg-2: #e9e2d7;
  --surface: #ffffff;
  --border: #e2dacb;
  --ink: #1b1410;
  --ink-2: #4b3e36;
  --muted: #7c6f63;
  --brand: #b42318;
  --brand-dark: #8a1a12;
  --brand-soft: #fde4de;
  --accent: #e87722;
  --ok: #2f7a3d;
  --warn: #c87a00;
  --bad: #b42318;
  --shadow: 0 1px 2px rgba(30,20,10,.06), 0 8px 24px rgba(30,20,10,.06);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ================= TOP NAV ================= */
.topnav {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 40;
  height: 56px;
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}
.brand-logo { width: 34px; height: 34px; display: block; object-fit: contain; }
.brand-accent { color: var(--brand); }
.search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border-radius: 6px;
  padding: 6px 10px;
  width: 300px;
  gap: 6px;
}
.search-ic { width: 16px; height: 16px; color: var(--muted); }
.search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  position: relative;
  transition: color .15s, background .15s;
}
.nav-link svg { width: 22px; height: 22px; margin-bottom: 2px; }
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--brand); }
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.nav-link.me { flex-direction: row; gap: 6px; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.badge {
  position: absolute;
  top: 2px; right: 8px;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}

/* ================= TOUR CARD ================= */
.tour-card {
  background: linear-gradient(160deg, #fff8f0 0%, #ffe8d8 100%);
}
.tour-card h4 { color: var(--brand); text-transform: none; font-size: 15px; margin: 0 0 4px; }
.tour-blurb {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.35;
}
.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: transform .1s, background .15s;
}
.demo-btn:hover { background: var(--bg-2); }
.demo-btn:active { transform: scale(0.97); }
.demo-btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(180,35,24,0.3);
}
.demo-btn.primary:hover { background: var(--brand-dark); }
.demo-btn svg { width: 14px; height: 14px; }
.demo-progress {
  display: none;
  height: 4px;
  margin-top: 10px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.tour-card[data-running="true"] .demo-progress { display: block; }
.demo-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .5s ease;
}
.demo-step {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}
.tour-card[data-running="true"] .demo-step { display: block; }

/* ================= LAYOUT ================= */
.layout {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 20px;
  align-items: start;
}
.col-left, .col-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }
.col-center { display: flex; flex-direction: column; gap: 16px; }
.route { display: flex; flex-direction: column; gap: 16px; }
.route[hidden] { display: none; }

/* ================= CARD ================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.card h3, .card h4 { margin: 0 0 10px; }
.card h4 { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.muted { color: var(--muted); }
.muted-link { color: var(--muted); font-size: 12px; font-weight: 500; }

/* ================= LEFT PROFILE CARD ================= */
.profile-card { padding: 0; text-align: center; }
.cover {
  height: 56px;
  background: linear-gradient(180deg, rgba(180,35,24,0.35), rgba(26,14,8,0.45)), url("cover.jpg") center/cover no-repeat;
  position: relative;
}
.cover::after {
  content: "✂";
  position: absolute;
  bottom: -10px;
  left: 12px;
  background: #fff;
  color: var(--brand);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  border: 1px solid var(--border);
}
.cover.tall { height: 140px; }
.profile-card .avatar-lg {
  width: 72px; height: 72px;
  margin-top: -54px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  position: relative;
  z-index: 1;
}
.avatar-lg { object-fit: cover; }
.p-name { margin: 8px 0 2px; font-size: 16px; }
.p-tag { margin: 0 12px 6px; font-size: 12px; color: var(--ink-2); }
.p-loc { margin: 0 12px 14px; font-size: 11px; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin: 0 3px; }
.p-stats {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 10px 0;
}
.p-stats > div {
  flex: 1;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.p-stats > div + div { border-left: 1px solid var(--border); }
.p-stats strong { display: block; color: var(--ink); font-size: 12px; margin-top: 2px; }

/* ================= SMALL LIST CARDS ================= */
.small-card ul { list-style: none; padding: 0; margin: 0; }
.broken-list li {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.broken-list li:last-child { border-bottom: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: var(--brand); }
.dot.amber { background: var(--accent); }
.dot.gray { background: var(--muted); }
.tags li {
  padding: 6px 0;
  font-size: 12px;
  color: var(--ink-2);
}

/* ================= COMPOSER ================= */
.composer-top {
  display: flex;
  gap: 10px;
  align-items: center;
}
.composer-trigger {
  flex: 1;
  text-align: left;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
.composer-trigger:hover { background: var(--bg-2); }
.composer-actions {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.composer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}
.composer-actions button:hover { background: var(--bg-2); }
.composer-actions span { font-size: 16px; }

/* ================= FEED POSTS ================= */
.feed { display: flex; flex-direction: column; gap: 16px; }
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: postIn .4s ease both;
}
@keyframes postIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.post-head {
  display: flex;
  gap: 10px;
  padding: 14px 16px 0;
  align-items: center;
}
.post-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.post-head-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.post-head-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.post-body {
  padding: 10px 16px 4px;
  font-size: 14px;
  color: var(--ink);
  white-space: pre-wrap;
}
.post-tag-row {
  padding: 0 16px 12px;
}
.post-tag {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 4px;
  font-weight: 600;
}
.post-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-2);
}
.post-meta {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.reactions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.reactions .emo {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px;
  background: var(--bg-2);
  border: 1.5px solid #fff;
  margin-left: -4px;
}
.reactions .emo:first-child { margin-left: 0; }
.post-actions {
  display: flex;
  justify-content: space-around;
  padding: 4px 8px 8px;
}
.post-actions button {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .12s;
}
.post-actions button:hover { background: var(--bg-2); }
.post-actions .icon {
  width: 18px; height: 18px; fill: currentColor;
}
.post-actions .liked { color: var(--brand); }
.post-actions .liked svg { fill: var(--brand); }

/* ================= RIGHT COLUMN ================= */
.news-list, .events-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.news-list li:last-child { border-bottom: none; }
.news-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.news-list small { color: var(--muted); font-size: 11px; }
.events-list li { padding: 6px 0; font-size: 13px; color: var(--ink-2); }
.promo { background: linear-gradient(160deg, #fff 0%, #fff5ec 100%); }
.promo h4 { color: var(--brand); text-transform: none; font-size: 15px; }
.promo p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.promo small { display: block; margin-top: 8px; font-size: 11px; }

.btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--ink-2);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: background .15s;
}
.btn:hover { background: var(--bg-2); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border-color: var(--border); color: var(--ink-2); }
.btn.full { width: 100%; }

/* ================= ROUTE-SPECIFIC ================= */
.route-title { margin: 0 0 6px; font-size: 22px; color: var(--ink); }

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  padding: 0 0 12px;
  box-shadow: var(--shadow);
  animation: postIn .3s ease both;
}
.person-card .pcover {
  height: 50px;
  background:
    linear-gradient(120deg, #fde4de, #fff5ec);
}
.person-card img {
  width: 70px; height: 70px; border-radius: 50%;
  border: 3px solid #fff; margin-top: -35px; object-fit: cover;
}
.person-card strong { display: block; margin-top: 6px; }
.person-card small { color: var(--muted); display: block; margin: 0 10px 10px; font-size: 12px; }
.person-card .btn { font-size: 12px; padding: 6px 14px; }

.jobs-list { display: flex; flex-direction: column; gap: 10px; }
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow);
  animation: postIn .3s ease both;
}
.job-logo {
  width: 48px; height: 48px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg-2); color: var(--ink); font-weight: 700;
  flex-shrink: 0;
}
.job-card h4 { margin: 0 0 2px; text-transform: none; font-size: 14px; color: var(--ink); }
.job-card small { color: var(--muted); font-size: 12px; }
.job-card .tag {
  display: inline-block; margin-top: 6px; padding: 1px 8px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 11px; border-radius: 999px; font-weight: 600;
}
.job-card .apply { margin-left: auto; }

/* ================= MESSAGES ================= */
.messages-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 480px;
  margin-top: 10px;
}
.msg-list { list-style: none; padding: 0; margin: 0; border-right: 1px solid var(--border); overflow-y: auto; }
.msg-list li {
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.msg-list li.active { background: var(--brand-soft); }
.msg-list li:hover { background: var(--bg-2); }
.msg-list img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.msg-list strong { display: block; font-size: 13px; }
.msg-list small { color: var(--muted); font-size: 11px; display: block; margin-top: 1px; }

.msg-view { display: flex; flex-direction: column; }
.msg-head {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.msg-head small { display: block; color: var(--muted); font-size: 11px; }
.msg-bubbles {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg);
}
.bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px;
  animation: postIn .2s ease both;
}
.bubble.them {
  background: var(--surface);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble.me {
  background: var(--brand);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-compose {
  display: flex; gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.msg-compose input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.msg-compose input:focus { border-color: var(--brand); }
.msg-compose button {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* ================= PROFILE PAGE ================= */
.profile-full { padding: 0 0 16px; }
.profile-full .avatar-xl {
  width: 120px; height: 120px; border-radius: 50%;
  border: 4px solid #fff;
  margin: -90px 0 0 24px;
  position: relative;
  z-index: 1;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.pf-body { padding: 10px 24px 0; }
.pf-body h1 { margin: 4px 0 0; font-size: 24px; }
.pf-body .p-tag { margin: 4px 0; font-size: 14px; }
.pf-body .p-loc { margin: 0 0 12px; font-size: 12px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.story-body { font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.exp-list { list-style: none; padding: 0; margin: 0; }
.exp-list li {
  display: flex; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.exp-list li:last-child { border-bottom: none; }
.exp-logo {
  width: 48px; height: 48px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.exp-logo.alt { background: var(--accent); }
.exp-list small { color: var(--muted); display: block; margin: 2px 0 6px; }
.exp-list p { margin: 0; color: var(--ink-2); font-size: 13px; }

.skills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.skills span {
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
}

/* ================= NOTIFICATIONS ================= */
.notif-list { list-style: none; padding: 0; margin: 10px 0 0; }
.notif-list li {
  display: flex; gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.notif-list li:hover { background: var(--bg-2); }
.notif-list .nico {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft);
  flex-shrink: 0; font-size: 18px;
}
.notif-list small { display: block; color: var(--muted); font-size: 11px; }

/* ================= FOOTER ================= */
.foot {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 12px;
}
.foot a { margin: 0 8px; }

/* ================= TOAST ================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: all .25s ease;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================= SPOTLIGHT OVERLAY ================= */
.spotlight-layer {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
.spotlight-hole {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 0 0 99999px rgba(10, 5, 0, 0.55);
  border: 2px solid rgba(255,255,255,0.8);
  transition: all .55s cubic-bezier(.3,.8,.3,1);
  pointer-events: none;
  left: 0; top: 0; width: 0; height: 0;
}
.spotlight-caption {
  position: absolute;
  max-width: 320px;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-size: 13px;
  transition: all .55s cubic-bezier(.3,.8,.3,1);
  pointer-events: auto;
  animation: fadeInCap .4s ease both;
}
@keyframes fadeInCap {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.spotlight-caption strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--brand);
}
.spotlight-caption p { margin: 0; color: var(--ink-2); }
.spotlight-caption::before {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border: 8px solid transparent;
}
.spotlight-caption[data-pos="right"]::before {
  left: -16px; top: 16px;
  border-right-color: #fff;
}
.spotlight-caption[data-pos="left"]::before {
  right: -16px; top: 16px;
  border-left-color: #fff;
}
.spotlight-caption[data-pos="bottom"]::before {
  top: -16px; left: 20px;
  border-bottom-color: #fff;
}
.spotlight-caption[data-pos="top"]::before {
  bottom: -16px; left: 20px;
  border-top-color: #fff;
}

.cursor {
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
  transition: all .55s cubic-bezier(.3,.8,.3,1);
  z-index: 1000;
  opacity: 0;
}
.cursor::before {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 2 L3 20 L8 16 L11 22 L14 21 L11 15 L18 14 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/></svg>") no-repeat center/contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.cursor.click::after {
  content: "";
  position: absolute;
  left: 4px; top: 4px;
  width: 24px; height: 24px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  animation: clickRing .5s ease;
}
@keyframes clickRing {
  from { transform: scale(0); opacity: 1; }
  to { transform: scale(2); opacity: 0; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .col-right { display: none; }
  .layout { grid-template-columns: 240px 1fr; }
}
@media (max-width: 820px) {
  /* Un-hide sidebars but strip them down to the two key CTAs */
  .col-left, .col-right {
    display: flex;
    position: static;
    top: auto;
  }
  .col-left > *:not(.tour-card) { display: none; }
  .col-right > *:not(.promo) { display: none; }
  .layout {
    grid-template-columns: 1fr;
    padding: 0 10px;
    margin-top: 10px;
  }
  .nav-link { padding: 6px 8px; }
  .nav-link span:not(.badge) { display: none; }
  .nav-link.me span { display: inline; }
  .search { display: none; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .pf-body h1 { font-size: 20px; }
  .profile-full .avatar-xl { width: 96px; height: 96px; margin: -72px 0 0 16px; }
  .pf-body { padding: 8px 16px 0; }
  .cover.tall { height: 100px; }
  .messages-wrap { grid-template-columns: 1fr; height: auto; }
  .msg-list { max-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
  .msg-bubbles { min-height: 240px; }

  /* Tour caption must never clip offscreen on narrow devices */
  .spotlight-caption {
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: 12px !important;
  }
}
@media (max-width: 520px) {
  .brand-name { font-size: 16px; }
  .brand-logo { width: 28px; height: 28px; }
  .topnav-inner { gap: 6px; padding: 0 10px; }
  .nav-link { padding: 6px 6px; }
  .nav-link svg { width: 20px; height: 20px; }
  .badge { right: 2px; }
  .nav-link.me span { display: none; }
  .avatar-sm { width: 24px; height: 24px; }
  .people-grid { grid-template-columns: 1fr; }
  .post-body, .post-head, .post-tag-row, .post-meta { padding-left: 12px; padding-right: 12px; }
  .composer-actions button { padding: 6px; font-size: 11px; }
  .composer-actions span { font-size: 14px; }
  .pf-actions .btn { font-size: 12px; padding: 6px 10px; }
}

/* ============ WAITLIST FORM ============ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 6px;
}
.waitlist-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--brand-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.waitlist-input::placeholder { color: var(--muted); }
.waitlist-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15);
}
.card.promo .formkit-submit {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}
.formkit-alert {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.formkit-alert-error { background: #fde4de; color: var(--brand-dark); }
.formkit-alert-success { background: #e6f7ec; color: #0c6a2e; }

/* ============ END-OF-TOUR SIGNUP MODAL ============ */
.signup-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.signup-modal[hidden] { display: none; }
.signup-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 12, 0.55);
  backdrop-filter: blur(4px);
  animation: signup-fade 180ms ease-out;
}
.signup-modal-card {
  position: relative;
  background: linear-gradient(160deg, #fff 0%, #fff5ec 100%);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(20, 14, 12, 0.35), 0 2px 8px rgba(20, 14, 12, 0.15);
  animation: signup-pop 220ms cubic-bezier(.2,.9,.3,1.2);
}
.signup-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
}
.signup-modal-close:hover { background: rgba(0,0,0,0.06); color: var(--ink); }
.signup-modal-logo { display: block; margin: 0 auto 10px; }
.signup-modal-card h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 20px;
}
.signup-modal-card p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
}
.signup-modal-card .waitlist-form { margin: 0; }
.signup-modal-card small { display: block; margin-top: 10px; font-size: 11px; }

@keyframes signup-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes signup-pop {
  from { transform: translateY(12px) scale(.96); opacity: 0 }
  to   { transform: translateY(0) scale(1); opacity: 1 }
}
@media (prefers-reduced-motion: reduce) {
  .signup-modal-backdrop, .signup-modal-card { animation: none; }
}
