/* Constellations — portal style overrides
   Created 26 Sep 2026.

   Small, late-loading visual corrections. This file exists so a styling tweak
   does not require rewriting a 50KB component file. Rules here use !important
   because the component CSS is injected into <head> at runtime by home.js and
   northstar-home.js, and therefore lands after this stylesheet in the cascade.

   Keep this file small. When a rule here becomes permanent, fold it into the
   component that owns it and delete it from here. */

/* ---- North Star Home masthead (/c/northstar) ----
   Kate, 26 Sep: the header read as plain — it was navy and pale blue with no
   gold anywhere, while gold is already the action color further down the page.
   Two touches: a gold cap across the top of the navy masthead box, and the
   86x4 gold rule from the guide cards between the eyebrow and the welcome.
   The North Star glyph stays navy on purpose — the copy tells members to look
   for the BLUE North Star, so it must not change color. */

#cst-nshome .nsbox {
  border-top: 5px solid #7D6220 !important;
}

#cst-nshome .t1::before {
  content: "";
  display: block;
  width: 86px;
  height: 4px;
  background: #7D6220;
  margin: 0 0 22px;
}

@media (max-width: 767px) {
  #cst-nshome .nsbox {
    border-top-width: 4px !important;
  }
  #cst-nshome .t1::before {
    width: 64px;
    height: 3px;
    margin-bottom: 18px;
  }
}

/* ---- Gold on the other North Star pages (28 Sep 2026) ----
   Kate, 28 Sep: the rest of the North Star spaces looked plain next to North
   Star Home. space-notes.js 1.3.0 puts cst-ns-gold on Circle's space header
   for /c/nsarticles, /c/ns-community and /c/nsnova, which lands a gold rule
   at the top of the page content — the same gesture as the cap on the North
   Star Home masthead.

   /c/northstar and /c/nsgatherings are left out: both already carry a gold
   cap of their own. /c/nsdiscussions is a chat space with no header bar to
   rule. See the NORTH STAR GOLD block in space-notes.js. */

.cst-ns-gold {
  border-bottom: 3px solid #7D6220 !important;
}

/* ---- Field Notes door, hidden TEMPORARILY (26 Sep 2026) ----
   Kate asked for the Field Notes discussion to be hidden for everyone, for now.

   The space itself (2871939, /c/discussions-field-guide) was already out of the
   sidebar and has no posts in it. What was still visible was its door on the
   Discussions landing page, drawn by the space-header template that lives in
   Circle's JavaScript snippet — the field with no headroom left. Hiding the
   door here instead keeps that snippet untouched and makes this a one-block
   change to undo.

   This hides the door, not the space: /c/discussions-field-guide still opens
   for anyone who has the address. If it needs to be genuinely closed rather
   than out of sight, that is a member-access change in Circle.

   TO RESTORE: delete this block. */

a.nvx-door[href="/c/discussions-field-guide"] {
  display: none !important;
}

/* ---- Gatherings door, hidden per member (28 Sep 2026) ----
   Supersedes the 27 Sep block that hid Gatherings from everyone.

   Kate, 28 Sep: put the main Gatherings calendar back in the sidebar, but keep
   it away from the members who moved to North Star gatherings. That is now
   done natively: space 2860065 has hide_from_sidebar false and
   is_hidden_from_non_members true, so Circle shows it to the 38 members of the
   space and shows nothing at all to anyone else.

   Two things Circle does not gate:

   1. The Gatherings section on the main Home page (#cst-ev, drawn by home.js).
      No rule needed. fillGatherings asks space 2860065 for its posts and the
      call is wrapped in .catch(function () {}) — a member without access gets
      an error, nothing is appended, and the empty #cst-ev div leaves no
      orphaned heading. Verified against home.js at 10e10ff.

   2. The door to /c/events drawn by the space-header template in Circle's
      JavaScript snippet. That is static HTML and shows the same links to
      everyone, so a member without access would see a door that leads nowhere.
      space-notes.js 1.1.0 asks the space for one post and, when that fails,
      puts cst-no-gatherings on <html>. The rule below does the rest.

   The door is briefly visible to those members before the check returns. A
   door that goes away is a smaller fault than a door that goes nowhere, and
   hiding it from everyone to spare seven people a flicker is the worse trade.

   TO RESTORE for everyone: delete this block and set
   is_hidden_from_non_members back to false on space 2860065. */

html.cst-no-gatherings a.nvx-door[href="/c/events"] {
  display: none !important;
}

/* ---- The expired Acuity note under The next Gathering (28 Sep 2026) ----
   home.js carries CFG.gatheringNote, an "Important note" under the Gatherings
   section on Home telling members the calendar was moving out of Acuity and to
   check back by Sunday, 27 September. That date has passed and the calendar is
   in the Portal, so the note came back up stale when Gatherings was restored.

   Hidden here rather than in home.js so the change is one block, not an 85KB
   commit. THE PERMANENT FIX is gatheringNote: null in home.js — the field is
   built to be switched off that way. Do that when home.js is next edited, and
   delete this block. */

#cst-ev .gnote {
  display: none !important;
}

/* ---- Community member cards: round photos crop from the top (28 Sep 2026) ----
   Kate, 28 Sep: Evan's photo was cut off on the Community page. His source
   photo is a tall portrait (1024x1536) with his head near the top edge, and
   the round 78px card photo was cropping from the center, which took off the
   top of his head. Anchoring the crop to the top of the photo keeps faces in
   frame. Square photos are unaffected. Covers Community and North Star
   Community (both drawn by home.js with .cst-cm). */

.cst-cm img.cm-ci {
  object-position: 50% 0% !important;
}

/* ---- Member Stories cards: photos crop from the top (28 Sep 2026) ----
   Kate, 28 Sep: Ralph & Sara's story photo showed their bodies with their
   heads cut off. The card image is landscape and their photo is a tall
   full-length portrait, so a center crop lands on their torsos. Anchoring to
   the top keeps faces in frame; landscape photos are unaffected. */

.cst-cm img.cm-simg {
  object-position: 50% 0% !important;
}

/* ---- Gatherings lists, Option A (28 Sep 2026) ----
   Kate approved Option A: both event lists restyled to match Articles.
   /c/events is space 2860065, /c/nsgatherings is 2867669.

   - The list runs the full width of the masthead in one white panel.
   - Circle's timeline dots are off.
   - Each date is one row: the date in Cormorant on the left, its gatherings
     on the right. A day with two gatherings stacks them with a hairline.
   - Each gathering reads title, then time in gold, then place. The
     "By Constellations" host line is hidden.
   - The RSVP / Going control sits on the right.
   - North Star uses the same design with larger type and a heavier gold
     rule. Type, not a marker, per the North Star rule.
   - Month headings ("October", "4 gatherings") come from data-cst-month
     and data-cst-count, which space-notes.js 1.4.0 sets on the first date
     of each month.
   - Phones stack everything: date line above, button below.

   Scoped to Circle's space body classes. If Circle changes its event markup,
   the selectors stop matching and the page falls back to Circle's stock look.

   TO RESTORE: delete this block. */

body:is(.view-space--2860065,.view-space--2867669) .max-w-3xl:has(.infinite-scroll-component),
body:is(.view-space--2860065,.view-space--2867669) .max-w-3xl:has(> .scrollbar-hide){max-width:1024px !important}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col{background:#fff !important;border:1px solid #E6E1D8 !important;border-radius:16px !important;padding:12px 28px 8px !important;gap:0 !important}
/* timeline off */
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > div:first-child{display:none !important}
/* one date = one row: date left, gatherings right */
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2{border-bottom:1px solid #E6E1D8}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2:last-child{border-bottom:0}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1{display:grid !important;grid-template-columns:150px 1fr;gap:0 20px !important;padding:22px 0 !important;align-items:start}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:first-child{grid-row:1 / span 20;display:flex !important;flex-direction:column !important;align-items:flex-start !important;gap:2px !important;position:static !important;background:transparent !important;padding:4px 0 0 !important;margin:0 !important}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:first-child > p:first-child{font-family:'Cormorant Garamond',Georgia,serif !important;font-weight:600 !important;font-size:26px !important;line-height:1.05 !important;color:#22231E !important}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:first-child > p:nth-child(2){font-family:Inter,system-ui,sans-serif !important;font-size:11px !important;font-weight:600 !important;letter-spacing:.14em !important;text-transform:uppercase !important;color:#6B6A63 !important}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:not(:first-child){grid-column:2;border:0 !important;padding:0 !important}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:not(:first-child) + div:not(:first-child){border-top:1px solid #EFEBE4 !important;padding-top:14px !important;margin-top:14px}
/* the card becomes a row */
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"]{display:flex !important;align-items:center;gap:20px;background:transparent !important;border:0 !important;box-shadow:none !important;border-radius:0 !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a{flex:1 1 auto;min-width:0;background:transparent !important;box-shadow:none !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .md\:px-4{padding:0 !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > div{flex:0 0 auto;background:transparent !important;border:0 !important;padding:0 !important;flex-direction:column-reverse !important;align-items:flex-end !important;gap:6px !important}
/* title first, then time, then place; host line off */
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col > div:first-child{flex-direction:column-reverse !important;gap:2px !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col > div:first-child p{font-family:'EB Garamond',Georgia,serif !important;font-weight:600 !important;font-size:22px !important;line-height:1.25 !important;color:#22231E !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col > div:first-child span{font-family:Inter,system-ui,sans-serif !important;font-size:14px !important;font-weight:500 !important;color:#7D6220 !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col{gap:4px !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col > div:nth-child(2) > div:nth-child(2){display:none !important}
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > a .flex-1.flex-col > div:nth-child(2) span{font-size:14px !important;color:#22231E !important}
/* RSVP button: rounded to match the portal buttons */
body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > div button{border-radius:8px !important}
/* North Star: larger type, heavier rule, no marker */
body.view-space--2867669 [data-testid="event-main-content"] > a .flex-1.flex-col > div:first-child p{font-size:25px !important}
body.view-space--2867669 [data-testid="event-main-content"] > a .flex-1.flex-col > div:first-child span,
body.view-space--2867669 [data-testid="event-main-content"] > a .flex-1.flex-col > div:nth-child(2) span{font-size:17px !important}
body.view-space--2867669 .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:first-child > p:first-child{font-size:29px !important}
/* phones: date above, stacked */
@media (max-width:767px){
 body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col{padding:4px 16px !important}
 body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1{grid-template-columns:1fr;padding:18px 0 !important}
 body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:first-child{grid-row:auto;flex-direction:row !important;align-items:baseline !important;gap:10px !important;padding:0 0 10px !important}
 body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2 > .flex-1 > div:not(:first-child){grid-column:1}
 body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"]{flex-direction:column;align-items:stretch;gap:10px}
 body:is(.view-space--2860065,.view-space--2867669) [data-testid="event-main-content"] > div{flex-direction:row !important;justify-content:space-between !important;align-items:center !important}
}

/* Month headings */
body:is(.view-space--2860065,.view-space--2867669) [data-cst-month]{flex-wrap:wrap;position:relative}
body:is(.view-space--2860065,.view-space--2867669) [data-cst-month]::before{content:attr(data-cst-month);flex:0 0 100%;display:block;font:600 32px/1.1 'Cormorant Garamond',Georgia,serif;color:#22231E;padding:26px 0 8px;border-bottom:2px solid #A8863A}
body:is(.view-space--2860065,.view-space--2867669) [data-cst-month]::after{content:attr(data-cst-count);position:absolute;right:0;top:44px;font:600 11px/1 Inter,system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#7D6220}
body:is(.view-space--2860065,.view-space--2867669) .infinite-scroll-component > .flex.flex-col > .flex.gap-2:has(+ [data-cst-month]){border-bottom:0 !important}
body.view-space--2867669 [data-cst-month]::before{border-bottom-width:3px}
@media (max-width:767px){
 body:is(.view-space--2860065,.view-space--2867669) [data-cst-month]::before{font-size:28px;padding-top:20px}
 body:is(.view-space--2860065,.view-space--2867669) [data-cst-month]::after{top:34px}
}

/* ---- Spotlight "Connect" row (7 Oct 2026) ----
   Kate, 7 Oct: members could not find a featured member's profile, so they
   never reached the Connect button. Every member feature now ends with a
   paragraph: "Want to connect? " plus a link to each person's profile
   (https://portal.joinconstellations.com/u/<id>). This sets that paragraph as
   a cream row and each link as a navy pill button. After a SAY HELLO IF… list
   it joins the bottom of that cream box.

   Matches only the LAST paragraph of a post body that holds a full portal
   profile link, so mentions, comments and ordinary links are untouched. The
   !important flags beat the format rules in features.css (Worth Sharing,
   A Few Minutes With, Quote).

   TO RESTORE: delete this block. The links still work as plain text. */

[data-circle="post-body"] .tiptap>p:last-child:has(a[href^="https://portal.joinconstellations.com/u/"]){display:block !important;width:auto !important;transform:none !important;margin:32px 0 0 !important;padding:18px 22px 20px !important;border:0 !important;border-radius:0 !important;background:#F5EDE1 !important;font-family:Inter,system-ui,sans-serif !important;font-size:15px !important;font-weight:400 !important;line-height:1.5 !important;letter-spacing:0 !important;text-transform:none !important;color:#5A5849 !important}
[data-circle="post-body"] .tiptap>ul+p:last-child:has(a[href^="https://portal.joinconstellations.com/u/"]){margin-top:0 !important;border-top:1px solid #E4D8C4 !important;padding-bottom:24px !important}
[data-circle="post-body"] .tiptap>p:last-child:has(a[href^="https://portal.joinconstellations.com/u/"]) strong{margin:0 !important;font:inherit !important;letter-spacing:inherit !important;text-transform:none !important;color:inherit !important}
[data-circle="post-body"] .tiptap>p:last-child a[href^="https://portal.joinconstellations.com/u/"][href*="/u/"]{display:inline-block !important;margin:6px 0 6px 10px !important;padding:10px 18px !important;border-radius:999px !important;background:#1A2238 !important;color:#FBF8F2 !important;font-family:Inter,system-ui,sans-serif !important;font-size:14px !important;font-weight:600 !important;line-height:1.3 !important;letter-spacing:.02em !important;text-transform:none !important;text-decoration:none !important}
[data-circle="post-body"] .tiptap>p:last-child a[href^="https://portal.joinconstellations.com/u/"][href*="/u/"]:hover{background:#7D6220 !important}
@media (max-width:767px){
 [data-circle="post-body"] .tiptap>p:last-child a[href^="https://portal.joinconstellations.com/u/"][href*="/u/"]{display:table !important;margin:10px 0 0 !important}
}

/* ---- Harrington Matchmaking features (7 Oct 2026) ----
   Posts tagged HARRINGTON MATCHMAKING feature someone who is not in the portal.
   portal.js marks them [data-nsm-hm] (post) and [data-nsm-hmtag] (chip);
   home.js marks Home cards .spot.hm and Community cards [data-hm].
   TO RESTORE: delete this block. */
[data-circle="post"][data-nsm-hm]{background:#EEF2F7 !important;box-shadow:0 0 0 24px #EEF2F7 !important}
[data-circle="post"][data-nsm-hm] [data-nsm="tag"]{background:#FFFFFF !important;border-color:#C9D3E1 !important}
[data-circle="post"][data-nsm-hm] [data-nsm="tag"][data-nsm-hmtag]{background:#1E2338 !important;border-color:#1E2338 !important;color:#EEF2F7 !important}
[data-circle="post"][data-nsm-hm][data-nsm-hm] .tiptap .node-image .overflow-hidden{box-shadow:10px 10px 0 #D6DFEA !important;border-color:#C9D3E1 !important}
#cst-home .spot.hm,#cst-nshome .spot.hm{background:#EEF2F7;padding:28px 30px}
#cst-home .spot.hm span[style*="--nb"],#cst-nshome .spot.hm span[style*="--nb"]{background:#FFFFFF !important}
.cm-gc[data-hm],.cm-hc[data-hm],.cm-big[data-hm]{background:#EEF2F7 !important}
.cm-big[data-hm]{padding:24px}
