:root {
  /* Brand: warm black and brushed gold from the Cornerstone Networks CN logo.
     The site uses one dark theme everywhere, like the logo. */
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #111110;
  --surface-2: #171614;
  --text: #f0efeb;
  --muted: #9d9c9a;
  --border: #2b2a26;
  --brand: #dbb066;
  --brand-strong: #e6c07c;
  --brand-soft: #1d1912;
  --on-brand: #1a0f00;
  --gold: #dbb066;
  --gold-strong: #e6c07c;
  --gold-soft: #1d1912;
  --bronze: #a8743f;
  --gold-gradient: #dbb066; /* flat gold, as on the main site */
  --line: #353430;
  --gold-text: #d2b078;
  --silver: #b3aa9c;
  --success: #6fcf97;
  --danger: #f08a7e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --display: "Cinzel", "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 0.5rem; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 16px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 8px; }
.logo { display: block; border-radius: 6px; }
.soon {
  display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: 0.68rem; font-weight: 600; line-height: 16px; vertical-align: middle; text-transform: uppercase;
}
.search { flex: 1; max-width: 320px; }
.search input { width: 100%; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a, .nav .link {
  padding: 6px 10px; border-radius: 6px; color: var(--muted); font-weight: 500;
}
.nav a:hover, .nav .link:hover { background: var(--brand-soft); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 0.72rem; line-height: 18px; text-align: center;
}

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr 280px; gap: 16px; align-items: start; }
.layout.two { grid-template-columns: 1fr 300px; }
.stack > * + * { margin-top: 12px; }

@media (max-width: 900px) {
  .layout, .layout.two { grid-template-columns: 1fr; }
  .search { display: none; }
}
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 4px 16px; }
  .nav { width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav .link { flex: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.pre { white-space: pre-wrap; word-wrap: break-word; }

/* ---------- Forms ---------- */
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; width: 100%;
}
input[type="checkbox"] { width: auto; }
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; font-weight: 500; margin-bottom: 10px; }
label > input, label > textarea, label > select { margin-top: 4px; font-weight: 400; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand);
  border-radius: 999px; padding: 6px 16px; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-strong); text-decoration: none; }
button:disabled { opacity: 0.6; cursor: default; }
button.secondary, .btn.secondary { background: transparent; color: var(--brand); }
button.secondary:hover, .btn.secondary:hover { background: var(--brand-soft); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 4px 10px; }
button.ghost:hover { background: var(--brand-soft); color: var(--text); }
button.ghost.on { color: var(--brand); }
button.danger { border-color: var(--danger); background: transparent; color: var(--danger); }
button.link { background: none; border: none; font-weight: 500; padding: 6px 10px; cursor: pointer; color: var(--brand); }
button.link:hover { background: var(--brand-soft); }
.error { color: var(--danger); margin: 0 0 10px; }

/* ---------- Avatars & people ---------- */
.avatar {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 0.95rem; user-select: none;
  object-fit: cover; background: #3a3127;
}
.avatar.lg { width: 96px; height: 96px; font-size: 2rem; border: 4px solid var(--surface); }
.avatar.sm { width: 32px; height: 32px; font-size: 0.75rem; }
.person { display: flex; gap: 10px; align-items: flex-start; }
.person .name { font-weight: 600; color: var(--text); }
.person .headline { color: var(--muted); font-size: 0.87rem; }
.people-list > * + * { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.tag {
  display: inline-block; padding: 2px 10px; margin: 0 6px 6px 0;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 0.82rem;
}
.tag.success { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }

/* ---------- Profile ---------- */
.cover { height: 110px; background: #0b0a09 url("/img/cover-placeholder.svg") center / cover no-repeat; }
.coming-soon { max-width: 640px; margin: 24px auto; text-align: center; padding: 32px 24px; }
.coming-soon .icon { font-size: 2.5rem; margin-bottom: 8px; }
.coming-soon ul { text-align: left; display: inline-block; margin: 8px 0 16px; color: var(--muted); }
.profile-head { padding: 0 16px 16px; margin-top: -48px; }

/* ---------- Feed ---------- */
.post-actions { display: flex; gap: 4px; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 6px; }
.comments { margin-top: 10px; }
.comment { background: var(--bg); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }

/* ---------- Messages ---------- */
.messenger { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; }
.threads { border-right: 1px solid var(--border); overflow-y: auto; max-height: 70vh; }
.thread-item { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.thread-item:hover { background: var(--brand-soft); text-decoration: none; }
.thread-item.active { background: var(--brand-soft); }
.thread-item .preview { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation { display: flex; flex-direction: column; }
.conversation-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bubbles { flex: 1; padding: 16px; overflow-y: auto; max-height: 60vh; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 70%; padding: 8px 12px; border-radius: 14px; background: var(--bg); align-self: flex-start; }
.bubble.mine { background: var(--brand); color: var(--on-brand); align-self: flex-end; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
@media (max-width: 700px) {
  .messenger { grid-template-columns: 1fr; }
  .threads { border-right: none; border-bottom: 1px solid var(--border); max-height: 240px; }
}

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; min-height: 80vh; }
.auth h1 { font-size: 2.2rem; color: var(--brand); }
.auth .pitch p { font-size: 1.1rem; color: var(--muted); }
.auth ul { padding-left: 1.2rem; color: var(--muted); }
@media (max-width: 800px) { .auth { grid-template-columns: 1fr; gap: 16px; min-height: 0; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 8px 12px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface);
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ======================================================================
   Referral network additions
   ====================================================================== */
:root { --warn: #f0b75a; --info-soft: #221c14; }

hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.btn { display: inline-block; }
.btn.lg, button.lg { padding: 10px 24px; font-size: 1rem; }
button.block, .btn.block { width: 100%; text-align: center; padding: 10px 16px; }
.success { color: var(--success); }
.mono, .ticket-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.narrow { max-width: 560px; margin: 0 auto; }
.narrow.wide { max-width: 820px; }
.lead { font-size: 1.1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sticky { position: sticky; top: 76px; }

/* Chips */
.chip {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border); white-space: nowrap;
}
.chip.success, .chip.status-active, .chip.status-comp, .chip.status-published { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); }
.chip.info, .chip.status-trialing { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.chip.warn, .chip.status-past_due, .chip.status-draft { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.chip.danger, .chip.status-cancelled, .chip.status-canceled { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.chip.type-attorney { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.chip.fmt-virtual, .chip.fmt-hybrid, .chip.fmt-in_person { color: var(--text); }

/* Topbar & install */
#public-bar .nav a.btn { color: var(--on-brand); padding: 6px 16px; }
#public-bar .nav a.btn:hover { background: var(--brand-strong); }
.install-btn {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.modal { max-width: 640px; width: calc(100% - 32px); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--border); color: var(--text); }
.modal::backdrop { background: rgba(0, 0, 0, 0.4); }
.notice { background: var(--brand-soft); border-radius: 8px; padding: 10px 12px; color: var(--text); }
.test-banner { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-weight: 600; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; text-align: center; }
.success-card { text-align: center; }

/* Landing */
.landing section { margin: 40px 0; }
.hero { text-align: center; max-width: 760px; margin: 24px auto 0 !important; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0; }
.hero .lead { color: var(--muted); margin-bottom: 20px; }
.section-title { font-size: 1.35rem; margin-bottom: 14px; }
.who-grid, .package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.who-icon { font-size: 1.8rem; margin-bottom: 6px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li strong::before { content: counter(step) ". "; color: var(--brand); }
.cta { text-align: center; padding: 32px 16px; }
.footer { text-align: center; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 40px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-size: 2rem; font-weight: 700; margin: 6px 0 10px; }
.plan .price span { font-size: 1rem; font-weight: 400; }
.plan button { margin-top: auto; }
.plan-flag { position: absolute; top: -11px; right: 16px; background: var(--brand); color: var(--on-brand); font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { padding-left: 1.5em; position: relative; margin-bottom: 4px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.event-card { display: flex; gap: 14px; color: var(--text); align-items: flex-start; }
.event-card:hover { text-decoration: none; border-color: var(--brand); }
.date-block { flex: none; width: 56px; text-align: center; border-radius: 10px; background: var(--brand-soft); padding: 6px 0; }
.date-block span { display: block; font-size: 0.72rem; font-weight: 700; color: var(--brand-strong); }
.date-block strong { display: block; font-size: 1.4rem; line-height: 1.1; }
.event-hero { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.video { position: relative; padding-top: 56.25%; margin-bottom: 12px; border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ticket-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.ticket { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; text-align: center; background: #fff; color: #111; }
.ticket img { display: block; margin: 0 auto 6px; }
.ticket-code { font-weight: 700; }

/* Sponsors */
.sponsor { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 10px; color: var(--text); background: var(--bg); }
.sponsor:hover { text-decoration: none; border-color: var(--brand); }
.sponsor.tier-platinum { border-left: 4px solid var(--brand); }
.sponsor-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.sponsor-img { display: block; max-width: 100%; max-height: 80px; margin: 4px 0; border-radius: 4px; }
.sponsor-slot h3 { margin: 0; }
.sponsor-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sponsor-strip .sponsor { margin: 0; background: var(--surface); }

/* Referrals & profiles */
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 12px 16px; border-top: 1px solid var(--border); }
.stat-row.card { border-top: 1px solid var(--border); }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { font-size: 1.25rem; }
.stat-row span { font-size: 0.8rem; color: var(--muted); }
.referral .note { background: var(--bg); border-radius: 6px; padding: 6px 10px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.pick { display: flex; align-items: center; gap: 8px; text-align: left; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-weight: 400; padding: 6px 10px; white-space: normal; }
.pick:hover { background: var(--brand-soft); }
.person.picked { background: var(--bg); border-radius: 8px; padding: 8px; font-weight: 400; }
.quick-links { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.quick-links a { padding: 6px 8px; border-radius: 6px; color: var(--text); }
.quick-links a:hover { background: var(--brand-soft); text-decoration: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters .grow { min-width: 200px; }
.filter-type { width: 220px; }
.actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .filter-type { width: 100%; } .person .actions { flex-direction: column; align-items: stretch; } }

/* Admin */
.tabs.scroll { overflow-x: auto; flex-wrap: nowrap; margin: 0; }
.tabs.scroll button { flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile-label { font-size: 0.82rem; color: var(--muted); }
.tile-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 0.8rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.78rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); padding: 8px; white-space: nowrap; }
td { border-bottom: 1px solid var(--border); padding: 8px; vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.muted td { color: var(--muted); }
.checkin { text-align: center; padding: 24px; }
.checkin .big { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.checkin.ok { border: 2px solid var(--success); }
.checkin.ok .big { color: var(--success); }
.checkin.bad { border: 2px solid var(--danger); }
.checkin.bad .big { color: var(--danger); }
.scanner { width: 100%; border-radius: 8px; background: #000; margin: 8px 0; }

/* Phones: leave room for the notch and home indicator when installed */
@media (display-mode: standalone) {
  .topbar { padding-top: max(8px, env(safe-area-inset-top)); }
  .container { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Let grid columns shrink below their content's intrinsic width on phones. */
.layout > * { min-width: 0; }

/* Narrow side columns: put the action button under the person's details. */
.side .person { flex-wrap: wrap; }
.side .person > .grow { flex-basis: calc(100% - 56px); }
.side .person > :last-child:not(.grow) { margin-left: 54px; }


/* ======================================================================
   Cornerstone Networks brand & membership tiers
   ====================================================================== */
h1, .section-title, .plan h3, .coming-soon h1 { font-family: var(--serif); letter-spacing: 0.01em; }
.brand { gap: 10px; }
.brand .logo { width: auto; height: 34px; border-radius: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand-strong); line-height: 1; }
.brand-name span { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 0.62em; letter-spacing: 0.32em; color: var(--muted); margin-left: 4px; }
@media (max-width: 420px) { .brand-name span { display: none; } }
.center { text-align: center; }
.narrow.xwide { max-width: 1040px; }

/* The full logo has navy lettering, so it sits on a white plate in dark mode. */
.logo-plate { display: inline-block; border-radius: 16px; }
.logo-plate.inline { margin-bottom: 12px; }

.hero-logo { width: min(360px, 80vw); height: auto; display: block; }
.auth-logo { width: 220px; height: auto; display: block; }
.hero h1 { color: var(--brand-strong); }
.auth h1 { color: var(--brand-strong); font-family: var(--serif); }

/* Gold accents */
button.gold, .btn.gold { background: var(--gold-gradient); border-color: var(--gold); color: var(--on-brand); }
button.gold:hover, .btn.gold:hover { background: var(--gold-strong); }

.founding-banner {
  text-align: center; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; color: var(--text);
}
.founding-banner strong { color: var(--gold-strong); }
.founding-offer { border-top: 1px dashed color-mix(in srgb, var(--gold) 60%, transparent); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.founding-offer strong { color: var(--gold-strong); }

/* Tier chips */
.chip.tier-chip.tier-professional { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.chip.tier-chip.tier-executive { color: var(--brand-strong); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.chip.tier-chip.tier-premier { color: var(--gold-strong); background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.chip.founding-chip { color: var(--gold-strong); background: transparent; border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.chip.status-firm { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }

/* Segmented control (monthly / annual, members / firms) */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface); }
.segmented button { background: transparent; border: none; color: var(--muted); padding: 6px 16px; }
.segmented button:hover { background: var(--brand-soft); color: var(--text); }
.segmented button.on { background: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { .segmented button.on { background: var(--brand); color: var(--on-brand); } }

/* Pricing */
.pricing .plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan.founding-plan { border: 2px solid var(--gold); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface) 45%); }
.plan.founding-plan .plan-flag { background: var(--gold-gradient); }
.plan.tier-premier { border-top: 4px solid var(--gold); }
.plan.tier-executive.featured { border: 2px solid var(--brand); }
.plan .plan-who { min-height: 3em; }
.plan-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.plan-actions > button { width: 100%; }

/* Enhanced (Executive+) and Premier profile touches */
.person.enhanced .name { color: var(--brand-strong); }
.ideal { margin-top: 4px; color: var(--text); }
.ideal-card { border-left: 4px solid var(--brand); }
.premier-card { border-left: 4px solid var(--gold); }
.spotlight { border-top: 3px solid var(--gold); }
fieldset.enhanced-fields { border: 1px dashed var(--border); border-radius: var(--radius); padding: 8px 12px 0; margin: 4px 0 10px; }
fieldset.enhanced-fields legend { font-weight: 600; padding: 0 6px; }
.price-table { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.firm-row { color: var(--text); padding: 4px 0; }
.firm-row:hover { text-decoration: none; }
.firm-row:hover strong { color: var(--brand); }

.demo-banner {
  background: var(--gold-soft); color: var(--text); text-align: center; font-size: 0.85rem; font-weight: 600;
  padding: 6px 12px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}

/* ---------- Spaces ---------- */
.space-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.space-card { border-top: 4px solid var(--space, var(--brand)); display: flex; flex-direction: column; }
.space-card-link { display: flex; gap: 12px; align-items: center; color: var(--text); }
.space-card-link:hover { text-decoration: none; }
.space-card-link:hover h3 { color: var(--brand); }
.space-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem;
  background: color-mix(in srgb, var(--space, var(--brand)) 16%, var(--surface));
}
.space-icon.lg { width: 64px; height: 64px; font-size: 2rem; border: 3px solid var(--surface); }
.space-banner {
  height: 84px; display: flex; align-items: flex-end; padding: 0 16px; margin-bottom: -32px;
  background: linear-gradient(120deg, var(--space, var(--brand)), color-mix(in srgb, var(--space, var(--brand)) 45%, #0b0a09));
}
.space-header .tabs { border-top: 1px solid var(--border); }
.space-chat .bubbles { min-height: 320px; max-height: 60vh; }
.chat-row { display: flex; flex-direction: column; align-items: flex-start; }
.chat-row.mine { align-items: flex-end; }
.chat-row .bubble { max-width: 100%; }
.chat-row .ghost.small { padding: 0 6px; font-size: 0.75rem; }
input[type="radio"] { width: auto; margin-top: 3px; }
input[type="color"] { height: 38px; padding: 2px 4px; cursor: pointer; }
.space-banner { position: relative; margin-bottom: 0; }
.space-banner .space-icon.lg { position: absolute; left: 16px; bottom: -30px; }
.space-header > div:nth-child(2) { padding-top: 40px !important; }

/* ---------- Composer, photos, polls, notifications ---------- */
.composer-card textarea { width: 100%; }
.composer-card button.ghost.on { background: var(--brand-soft); color: var(--brand-strong); }
.image-preview { margin-top: 8px; }
.image-preview img, .post-image { display: block; max-width: 100%; max-height: 480px; border-radius: 10px; margin-top: 8px; object-fit: cover; }
.poll-editor { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.poll-question { font-weight: 600; }
.poll { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.poll-option-btn {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; font-weight: 500; white-space: normal;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
}
.poll-option-btn:hover { background: var(--brand-soft); }
.poll-option-btn.mine { border-color: var(--brand); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--brand-soft); z-index: 0; }
.poll-label, .poll-pct { position: relative; z-index: 1; }
.poll-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.notification { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.notification:hover { background: var(--brand-soft); text-decoration: none; }
.notification.unread { background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.notification.unread strong::before { content: '● '; color: var(--brand); }
.notification-icon { font-size: 1.2rem; }

/* ---------- Courses, leaderboard, applications ---------- */
.course-card { color: var(--text); display: flex; flex-direction: column; }
.course-card:hover { text-decoration: none; border-color: var(--brand); }
.course-image { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; display: block; }
.course-image.placeholder { display: grid; place-items: center; font-size: 2.5rem; background: linear-gradient(120deg, var(--brand-soft), var(--gold-soft)); }
.progress { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--brand); }
.course-layout { grid-template-columns: 300px 1fr !important; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr !important; } }
.lesson-list { display: flex; flex-direction: column; gap: 2px; }
.lesson-link { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--text); }
.lesson-link:hover { background: var(--brand-soft); text-decoration: none; }
.lesson-link.active { background: var(--brand-soft); font-weight: 600; }
.lesson-check { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; border: 1px solid var(--border); background: var(--surface); }
.lesson-link .lesson-check[aria-label="Completed"] { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-body { line-height: 1.7; }
.leaders { list-style: none; padding: 0; margin: 0; }
.leaders li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.leaders li.me { background: var(--brand-soft); border-radius: 8px; }
.leaders .rank { width: 28px; text-align: center; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--text); font-size: 0.85rem; font-weight: 600; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.application { border-top: 1px solid var(--border); padding: 12px 0; }
.answers { margin: 8px 0 0; }
.answers dt { font-weight: 600; font-size: 0.85rem; margin-top: 6px; }
.answers dd { margin: 2px 0 0; color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.3rem; }
.legal hr { border: none; border-top: 1px solid var(--border); margin: 24px 0 12px; }
.legal-links a { color: inherit; text-decoration: underline; }

/* ---------- Black & gold brand ---------- */
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, .section-title, .plan h3, .coming-soon h1 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; }
.topbar { background: rgba(11, 10, 9, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, transparent); }
.brand .logo { height: 36px; }
.brand-name { font-family: var(--display); font-weight: 600; letter-spacing: 0.14em; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-name span { font-family: var(--display); letter-spacing: 0.38em; color: var(--gold); -webkit-text-fill-color: var(--gold); opacity: 0.8; }
.nav a.active, .nav a[aria-current] { color: var(--gold-strong); background: var(--brand-soft); }
button, .btn { background: var(--gold-gradient); border-color: var(--gold); color: var(--on-brand); letter-spacing: 0.02em; }
button:hover, .btn:hover { background: var(--gold-strong); border-color: var(--gold-strong); }
button.secondary, .btn.secondary { background: transparent; color: var(--gold); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
button.ghost, button.link { background: transparent; }
button.danger { background: transparent; }
.card { background: var(--surface); border-color: var(--border); }
input, select, textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 0; border-color: var(--gold); }
.logo-plate { background: transparent; padding: 0; }
.auth-logo { width: 260px; border-radius: 12px; }
.auth h1, .hero h1 { color: var(--text); }
.section-title { color: var(--gold-strong); }

/* Landing hero: the logo on its wall, full width, with the tagline. */
.brand-hero {
  position: relative; margin: -16px -16px 8px; min-height: clamp(240px, 46vw, 460px);
  background: #0b0a09 url("/img/brand-hero.jpg") center / cover no-repeat;
  display: flex; align-items: flex-end; justify-content: center;
}
.brand-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 12%; background: linear-gradient(to bottom, transparent, var(--bg)); }
.brand-hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tagline { font-family: var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); font-size: 0.8rem; text-align: center; margin: 0 0 8px; }
.hero .lead { font-size: 1.05rem; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.gold-rule { width: 120px; height: 1px; margin: 14px auto; background: var(--gold-gradient); border: 0; }
.package-price { color: var(--gold-strong); font-weight: 700; margin: 2px 0 8px; }
.pricing-terms { text-align: center; max-width: 760px; margin: 14px auto 0; }
.terms-list { padding-left: 1.2rem; margin: 0 0 12px; }
.terms-list li { margin-bottom: 6px; }

/* ---------- Match the main site (cornerstonenetworksllc.com) ---------- */
h1, h2, .section-title, .plan h3, .coming-soon h1 { font-weight: 500; letter-spacing: 0; }
h1 { font-size: 2.1rem; color: var(--text); }
.topbar { background: var(--bg); backdrop-filter: none; border-bottom: 1px solid var(--line); padding: 12px 24px; }
.brand { gap: 12px; }
.brand .logo { width: 44px; height: 44px; padding: 7px; border-radius: 50%; background: #141311; object-fit: contain; box-shadow: 0 0 0 1px #1f1d1a; }
.brand-name { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: 0.01em; text-transform: uppercase; line-height: 1; color: var(--gold-text); background: none; -webkit-text-fill-color: currentColor; }
.brand-name span { font-family: "DM Sans", "Inter", system-ui, sans-serif; font-weight: 500; font-size: 0.5em; letter-spacing: 0.08em; margin: 6px 0 0; color: var(--gold-text); -webkit-text-fill-color: currentColor; opacity: 1; }
.nav a, .nav .link { color: var(--text); font-weight: 500; border-radius: 4px; }
.nav a:hover, .nav .link:hover { background: transparent; color: var(--gold); }
.nav a.active, .nav a[aria-current] { color: var(--gold); background: transparent; }
.nav a.btn, .nav a.btn:hover { color: var(--on-brand); }
button, .btn { border-radius: 4px; font-weight: 600; letter-spacing: 0; padding: 8px 18px; }
.btn.lg, button.lg { padding: 13px 26px; }
button:hover, .btn:hover { background: var(--gold-strong); }
button.secondary, .btn.secondary { color: var(--text); border-color: var(--line); background: transparent; }
button.secondary:hover, .btn.secondary:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
button.ghost, button.link { border-radius: 4px; }
.btn.arrow::after, button.arrow::after { content: " ↗"; font-weight: 600; }
.card { border-radius: 6px; border-color: var(--border); }
input, select, textarea { border-radius: 4px; }
.chip { border-radius: 999px; }
.section-title { color: var(--gold-text); font-family: var(--serif); font-weight: 500; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 8px; }
.serif-sub { font-family: var(--serif); color: var(--gold-text); font-size: 1.6rem; margin: 0 0 10px; }
.tagline { font-family: "Inter", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.02em; font-size: 0.78rem; }
.hero { text-align: left; max-width: 1080px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 400; line-height: 1.1; margin: 4px 0 14px; }
.hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 900px; }
.hero .row { justify-content: flex-start !important; }
.gold-rule { display: none; }
.brand-hero { min-height: clamp(220px, 32vw, 420px); background-size: contain; background-color: var(--bg); margin-bottom: 24px; }
.brand-hero::after { display: none; }
.plan-flag { border-radius: 4px; }
.founding-banner { border-radius: 6px; }
@media (max-width: 640px) {
  .topbar { padding: 10px 14px; }
  .brand .logo { width: 38px; height: 38px; padding: 6px; }
  .brand-name { font-size: 1.1rem; }
}

/* Body text and pricing cards, as on the main site */
body { font-family: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.pricing { display: flex; flex-direction: column; gap: 20px; }
.pricing .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.plan { padding: 28px; display: flex; flex-direction: column; background: #121211; }
.plan h3, .plan-wide h3 { font-family: "DM Sans", system-ui, sans-serif; font-weight: 500; font-size: 1.6rem; color: var(--text); margin: 18px 0 14px; }
.plan-num { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.plan .price, .plan-wide .price { font-size: 3.1rem; font-weight: 500; color: var(--text); line-height: 1; letter-spacing: -0.01em; }
.plan .price .per { font-size: 1rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.plan-sub { color: var(--muted); margin: 12px 0 22px; }
.plan .eyebrow, .plan-wide .eyebrow { letter-spacing: 0.08em; font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 14px; color: var(--text); opacity: 0.88; }
.checks li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--gold); font-weight: 400; }
.plan .plan-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.plan .plan-actions .link { align-self: center; color: var(--muted); }
.arrow-btn { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; padding: 13px 22px; font-weight: 500; font-size: 1.02rem; }
.arrow-btn::after { content: "↗"; font-weight: 600; }
.plan-wide { padding: 30px 40px; background: #1c1a16; }
.plan-wide .wide-top { display: grid; grid-template-columns: minmax(0, 1fr) auto 280px; align-items: center; gap: 40px; }
.plan-wide h3 { margin: 6px 0 12px; }
.plan-wide .wide-price { border-left: 1px solid var(--line); padding-left: 48px; min-width: 200px; color: var(--text); }
.plan-wide .wide-price .price { font-size: 3rem; }
.plan.tier-premier, .plan.tier-executive.featured { border: 1px solid var(--border); }
.plan-wide .wide-cta button { width: 100%; }
.plan-wide hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0 24px; }
.checks.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 32px; }
.plan.founding-plan, .plan-wide.founding-plan { border: 1px solid var(--border); background: #1c1a16; }
.pricing-terms { text-align: left; max-width: 980px; margin: 4px 0 0; font-size: 0.95rem; line-height: 1.55; }
@media (max-width: 720px) {
  .plan-wide { padding: 24px; }
  .plan-wide .wide-top { grid-template-columns: 1fr; gap: 18px; }
  .plan-wide .wide-price { border-left: 0; padding-left: 0; }
}
