/* ===========================================================================
   MY PROFILE                                            artboards p1-p6
   ===========================================================================
   The reader's own dashboard: one hero band, one tab row, and a different
   body per tab.

   MEASURED on p1 at 1pt = 2.4px. The design's content band is 36.0-559.3pt
   = 523.3pt = 1255.9px, which is this site's existing 1256px container - so
   nothing here redefines the grid. Everything below is type, spacing and two
   small blocks.

   WHAT THIS FILE ADDS TO THE TYPE SCALE, and why it is only one thing:
   every size on p1 already had a token -

     meta line / links        6.0pt  -> --cn-text-label
     tab labels               7.2pt  -> --cn-text-meta   (see note at the tabs)
     kind label               6.9pt  -> --cn-text-meta
     item headline           14.5pt  -> --cn-text-h1
     "Continue Where..."     10.0pt  -> --cn-text-section

   - except the welcome headline, which measures 17.7pt. That is larger than
   --cn-text-h1 (14.5pt, the largest in the system), so it is defined here
   rather than added to tokens.css: one screen uses it, and a token is a
   promise that something is shared.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   THE HERO BAND
   Name on the left, Connect Plus mark on the right, a rule underneath.
   Identical on all six artboards, which is why it is not scoped to p1.
   --------------------------------------------------------------------------- */

.cn-profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--cn-space-8);
  padding-block: var(--cn-space-12) 30px;   /* badge bottom 200.4pt -> rule 212.9pt = 30px */
  border-bottom: 1px solid var(--cn-border);
}

.cn-profile-hero__who {
  /* Takes the slack so the Plus mark stays hard right at every width. */
  flex: 1 1 auto;
  min-width: 0;
}

/*
   17.7pt = 42.5px at the design width. The clamp follows the same 1024->1440
   ramp every other size token uses, so this headline shrinks in step with the
   page rather than stepping at a breakpoint on its own:
     at 1440 -> 14.81 + 1.9231 * 14.40 = 42.5px
     at 1024 -> 14.81 + 1.9231 * 10.24 = 34.5px
*/
.cn-profile-hero__title {
  margin: 0;
  color: var(--cn-navy);
  font-size: clamp(34.5px, calc(14.81px + 1.9231vw), 42.5px);
  /* SEMIBOLD, read off the artboard's own font: "Welcome Back" is set in
     Poppins-SemiBold at 17.7pt. This was --cn-fw-bold (700), which made the
     heading of all six tabs heavier than every other H1 on the site - the
     listing and issue-hero titles are 600 too. */
  font-weight: var(--cn-fw-semibold);
  line-height: var(--cn-lh-tight);
}

/*
   The three facts read as one line on the artboard with generous gaps, and
   wrap to two on a narrow screen rather than being truncated - they are short
   and each one is independently useful.
*/
.cn-profile-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-2) var(--cn-space-6);
  margin: var(--cn-space-3) 0 0;
  color: var(--cn-ink-body);
  font-size: var(--cn-text-label);
  line-height: var(--cn-lh-body);
}

.cn-profile-hero__fact {
  white-space: nowrap;
}

.cn-profile-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-2) var(--cn-space-6);
  margin: var(--cn-space-2) 0 0;
  font-size: var(--cn-text-label);
}

/* Navy and bold on p1; the cancel link beside it is cyan and regular. The
   weight difference is the whole hierarchy here - one is the thing you came
   for, the other is the thing you rarely want. */
.cn-profile-hero__manage {
  color: var(--cn-navy);
  font-weight: var(--cn-fw-bold);
}

.cn-profile-hero__cancel {
  color: var(--cn-cyan);
  font-weight: var(--cn-fw-regular);
}

/* Log out: a POST form (see profileHero.tag) dressed as the row's quietest
   link - muted and regular, so it never competes with Manage Membership. The
   form is inline so it sits in the flex row like the two links beside it. */
.cn-profile-hero__logout {
  display: inline;
  margin: 0;
}
.cn-profile-hero__logout-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cn-ink-muted);
  font: inherit;
  font-weight: var(--cn-fw-regular);
  cursor: pointer;
}
.cn-profile-hero__logout-btn:hover,
.cn-profile-hero__logout-btn:focus-visible {
  color: var(--cn-navy);
  text-decoration: underline;
}

/*
   THE LOCKUP IS 453px WIDE - the badge's width, not the mark's.
   Measured on p1: the gold bar runs x=370.7 to 559.3pt (188.6pt = 453px) and
   the mark above it x=448.4 to 559.3 (110.8pt = 266px). Both end on 559.3,
   which is the content band's right edge, so the two are RIGHT-aligned to
   each other and the bar is the wider of the two. Sizing the block to the
   mark (the first instinct) makes the bar too narrow by 187px.
*/
.cn-profile-hero__plus {
  flex: 0 0 auto;
  width: 453px;
  max-width: 40%;
}

/*
   266 x 56, RIGHT-ALIGNED INSIDE THE 453 BLOCK.

   THE CROP IS NOT A FUDGE - it is working around an asset that is the wrong
   shape. ConnectPlusLogo.png is 1280x720, a 16:9 frame with NO transparency:
   the logo itself occupies 1034x218 at (114,239), padded out with solid
   white. Left alone it draws 266x150 here and pushes the whole hero 94px
   taller than p1.

   The frame is white and so is the page, so it is invisible - it only steals
   height. object-fit:cover scales to the 266 width and takes the middle 56px
   of the 150, and the logo content sits at 33.2%-63.5% vertically (centre
   48.3%), so a centred crop contains all of it with room either side.

   THE REAL FIX IS A TRIMMED COLOUR ASSET. ConnectPlusLogoWhite.png is already
   1033x217 with proper alpha - the same logo, correctly cut - but it is the
   white version, for dark backgrounds. Ask for its colour twin and this rule
   becomes width/height:auto.
*/
.cn-profile-hero__plus-mark {
  display: block;
  width: 266px;
  height: 56px;
  margin-left: auto;
  position: relative;
  overflow: hidden;
}

/*
   THE PADDING CROPPED OFF EXACTLY, so the LOGO - not its white frame - is
   the 266 x 56 the board draws.

   object-fit:cover was sized to the FRAME, so the logo inside it drew only
   1034/1280 = 80.8% of that width and stopped ~27px short of the block's
   right edge. Against a gold bar that did run the full width, the pair read
   as a small mark floating over a slab rather than as one lockup.

   Scaled so the logo content itself measures 266 wide: 266/1034 = 0.2573,
   giving a 329.3 x 185.2 frame whose content is 266.0 x 56.1 - the board's
   266 x 56 to within a tenth of a pixel. The offsets are the padding at
   that scale (114 and 239 source px).

   STILL NOT THE REAL FIX. ConnectPlusLogoWhite.png is already trimmed
   properly (1033x217, real alpha) but is the white version; ask the designer
   for its colour twin and this whole block collapses to width:auto.
*/
.cn-profile-hero__plus-mark img {
  position: absolute;
  left: -29.3px;
  top: -61.5px;
  width: 329.3px;
  height: auto;
  /* The global img { max-width: 100% } clamps 329.3 back to the 266 wrapper,
     which silently undoes the whole crop - measured 266px wide with the
     offsets applied, so the logo sat scaled-down AND shifted. */
  max-width: none;
}

/*
   THE GOLD MEMBER BADGE. Full width of the mark above it, which is what
   makes the pair read as one lockup rather than as a logo with a label
   underneath. Letter-spaced because the artboard draws it that way and
   because a single short word in caps needs the air.
*/
.cn-profile-hero__badge {
  /* mark bottom 166.4pt -> bar top 180.3pt = 13.9pt = 33px */
  margin: 33px 0 0 auto;
  /* THE SAME WIDTH AS THE LOGO ABOVE IT. The bar ran the full 453 of the
     block while the logo drew 266, so it read as an oversized gold slab with
     a small mark above it. Matching the mark is what makes the two read as
     one lockup, which is the whole point of the pair. */
  width: 266px;
  min-height: 48px;          /* 20.1pt on p1 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cn-fam-gold);
  color: var(--cn-ink-invert);
  font-size: var(--cn-text-section);
  font-weight: var(--cn-fw-bold);
  letter-spacing: 0.18em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   THE TAB ROW
   Six routes, not six panels - see profileTabs.tag for why.
   --------------------------------------------------------------------------- */

.cn-profile-hero + .cn-section-title {
  margin-top: 18px;   /* rule 212.9pt -> heading 220.4pt = 7.5pt = 18px */
}

.cn-profile-tabs {
  margin-block: var(--cn-space-4) var(--cn-space-8);
}

/* 8.3pt between pill boxes on p1 (36.2+70.3 -> 114.8) = 20px. */
.cn-profile-tabs__list {
  flex-wrap: wrap;
  gap: var(--cn-space-2) 20px;
}

/*
   THESE ARE BIGGER THAN TOPIC CHIPS, and deliberately.
   p1 draws the tab labels at 7.2pt where a topic chip is 6.3pt
   (--cn-text-chip). They are navigation for the whole screen, not a filter
   inside one, so they carry the heavier --cn-text-meta. Worth confirming with
   the designer: it is the one place My Profile departs from the chip the rest
   of the site uses, and if it was not intended this line is the fix.
*/
/*
   33px tall and roomier than a topic chip: p1 draws the pills at 13.6pt
   (33px) with the first one 70.3pt (169px) across for a 59.7pt label, so
   about 14px of air each side where .cn-chip gives 10px.
*/
.cn-profile-tabs__tab {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  padding-inline: 14px;
  font-size: var(--cn-text-meta);
  text-decoration: none;
  /* Every option outlined, as p1/p2 draw them (round 3): the base chip's
     border is transparent, which left only the current tab visible as a
     pill. The same outline the post-event tabs use. */
  border: 1px solid var(--cn-cyan-alt);
}

/* .cn-chip already carries the pill shape, border and hover. The current tab
   takes the filled treatment the artboard shows - aria-current is the source
   of truth so the style can never drift from what a screen reader is told. */
.cn-profile-tabs__tab[aria-current="page"] {
  background: var(--cn-cyan);
  border-color: var(--cn-cyan);
  color: var(--cn-ink-invert);
}

/*
   A TAB WHOSE SCREEN IS NOT BUILT YET. Dimmed, not clickable, and not a
   link in the markup either. This disappears as the remaining five land;
   it exists so nobody testing p1 walks into a 404.
*/
.cn-profile-tabs__tab--todo {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   CONTINUE WHERE YOU LEFT OFF
   --------------------------------------------------------------------------- */

.cn-profile-body__main {
  min-width: 0;   /* long unbroken titles must not widen the grid column */
}

/*
   THE ROWS THEMSELVES ARE cn:headlineRow - the Content Library's own
   component - so none of their type, size, colour or rules are defined
   here. That is the point: an earlier pass restyled them by hand and they
   came out almost right, which is worse than plainly wrong because nobody
   notices until the two drift. This class only spaces the group.
*/
.cn-profile-recent {
  margin-top: var(--cn-space-4);
}

/* A new reader has read nothing. Not an error state - see the JSP. */
.cn-profile-empty {
  margin: 0;
  padding-block: var(--cn-space-8);
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-body);
  line-height: var(--cn-lh-body);
}

.cn-profile-empty a {
  color: var(--cn-cyan);
  font-weight: var(--cn-fw-medium);
}

/* ---------------------------------------------------------------------------
   YOUR SAVED CONTENT                                          artboard p2
   --------------------------------------------------------------------------- */

/*
   3-UP UNDER THE HERO CARD, which is what p2 draws. Same column width and
   gutter as every listing, so a saved card and a library card are the same
   object at the same size rather than two cards that nearly match.
*/
/* The type filter sits between the tab row and the cards on p2. */
.cn-profile-saved__filter {
  margin-bottom: var(--cn-space-8);
}

/*
   "Browse by type:" is 6.9pt on p2 = 17px, which is --cn-text-meta.
   .cn-chips__label is 14px (--cn-text-label), right where topicChips uses
   it on the listings and a little small here - this label sits under a
   24px section heading rather than beside a filter bar. Overridden on this
   filter only; the shared class is left alone.
*/
.cn-profile-saved__filter .cn-chips__label {
  margin: 0 0 var(--cn-space-3);
  font-size: var(--cn-text-meta);
}

.cn-profile-saved__filter .cn-chips__list {
  flex-wrap: wrap;
  gap: var(--cn-space-2) 20px;
}

.cn-profile-saved__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--cn-space-8) var(--cn-gap-media);
  margin-top: var(--cn-space-10);
}

@media (max-width: 1023px) {
  .cn-profile-saved__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .cn-profile-saved__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   RECOMMENDED FOR YOU                                     artboard p1, foot
   ---------------------------------------------------------------------------
   A FULL-BLEED BAND. p1 runs it edge to edge in the pale blue the Magazine
   featured block uses, so it sits OUTSIDE <main> and re-centres its own
   contents - a band cannot escape a padded, max-width container it is
   inside of. Home's "Latest Videos & Audio" is the same arrangement.
   --------------------------------------------------------------------------- */

/*
   .cn-band OWNS THE STRUCTURE - full bleed, and 80px of breathing room on
   its inner container (--cn-space-20), the same rhythm Home's grey "Latest
   Videos & Audio" band and the newsletter band use. This file adds the
   colour and nothing else.

   An earlier pass hand-rolled all of it here with its own padding, which is
   how this band ended up sitting on a different rhythm from every other
   band on the site.
*/
.cn-profile-rec {
  background: var(--cn-panel-blue);
  /* Last row of the strip above ends 23.1pt before the band begins. */
  margin-top: var(--cn-space-12);
}

/*
   TIGHTER THAN .cn-band's DEFAULT, measured off p1 at 1pt = 2.4px:

     band top    y=577.1      heading top  y=589.9   ->  31px
     last card line ends      band bottom  y=711.5   ->  ~51px
     whole band  134.4pt                             ->  323px tall

   .cn-band gives its container 80px top and bottom (--cn-space-20), which
   is right for Home's grey "Latest Videos & Audio" band - a full section
   with a heading, a tab strip and media cards. This band is one heading,
   one chip row and a single line of titles, and at 80px it read as a mostly
   empty blue box. The component still owns the full-bleed behaviour; only
   the rhythm is overridden, and only here.
*/
.cn-profile-rec > .cn-container {
  padding-block: var(--cn-space-8) var(--cn-space-12);
}

/*
   THE BAND MEETS THE FOOTER.

   .cn-footer carries margin-top: --cn-space-12, which is 48px and correct
   everywhere else on the site - every other page ends on a white <main>,
   so that gap reads as breathing room. This is the only page that ends on
   a full-bleed coloured band, and there those same 48px become a thin
   white sliver trapped between the blue band and the navy footer, which
   looks like a mistake rather than a margin.

   SCOPED TO THE PAGE, NOT TO A SIBLING. This was
   `.cn-profile-rec + .cn-footer` and it quietly stopped matching the moment
   the band moved into a fetched fragment: the band is now inside
   [data-rail-slot], so it is no longer the footer's sibling - the slot is.
   Keying on the page cannot break that way, and a rule that depends on two
   elements staying adjacent is a rule that breaks silently.

   The band's own 80px of bottom padding is the breathing room; the two
   full-width blocks then sit flush, which is what a reader expects of
   stacked bands.
*/
body[data-page="my-profile"] .cn-footer {
  margin-top: 0;
}

/* The band's own heading is the tab strip's label, so the strip needs no
   extra top margin here. */
.cn-profile-rec__cards {
  margin-top: var(--cn-space-6);
}

/* The rows under p2's rail advert - see fragments/saved-rail.jsp. */
.cn-profile-saved__rail-head {
  margin-top: var(--cn-space-10);
}

.cn-profile-saved__rail-list {
  margin-top: var(--cn-space-4);
}

/* ---------------------------------------------------------------------------
   SAVED EVENT PHOTOS                                          artboard p3
   --------------------------------------------------------------------------- */

/*
   A MOSAIC, NOT A GRID. p3 draws tiles of different heights in three
   columns - portrait shots tall, group shots wide - which is what event
   photography actually is. CSS columns give that without measuring any
   image, and keep the DOM order the reading order.
*/
.cn-profile-photos {
  /* FOUR, measured off artboard p3: tiles start at x=35.6 / 166.9 / 298.0 /
     431.0pt and the last ends at 560.4, which is the 36.0-559.3 content band.
     At 1256px that is a ~311px column, and the board's tile is 129.5pt x 2.4
     = 310.8px. This was 3, which drew ~415px tiles - noticeably larger than
     the design. */
  column-count: 4;
  /* --cn-space-3, NOT --cn-gap-media. That token is 30px and is the gutter
     for a 4-up row of media CARDS; a photo mosaic is not a card row. The
     post-event gallery this page is the saved view of is what to match -
     post_event.css .cn-post-event__gallery is columns:4 with a --cn-space-3
     gutter - and it is far closer to the board, which draws ~5px gutters
     between its 129.5pt tiles. Same photographs, same gallery, so the same
     spacing on either side of the save. */
  column-gap: var(--cn-space-3);
}

/* The reference gallery's own breakpoints, for the same reason. */
@media (max-width: 1024px) { .cn-profile-photos { column-count: 3; } }
@media (max-width: 767px)  { .cn-profile-photos { column-count: 2; } }
@media (max-width: 479px)  { .cn-profile-photos { column-count: 1; } }

/* break-inside stops a tile being split across two columns. */
.cn-profile-photos__tile {
  position: relative;
  break-inside: avoid;
  /* Matches the column gutter so the mosaic spaces equally both ways -
     the same pairing .cn-post-event-photo uses. */
  margin: 0 0 var(--cn-space-3);
}

.cn-profile-photos__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--cn-radius-sm);
}

/* The tile's picture is a button - reset it back to looking like an image. */
.cn-profile-photos__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/*
   DOWNLOAD AND REMOVE FAVOURITE, ALWAYS VISIBLE.
   An earlier pass had these as icons revealed on hover, which the artboard
   draws - but hover does not exist on a touch screen, so on a phone the
   two actions this page is for would simply not have been there.
*/
.cn-profile-photos__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-2);
  margin-top: var(--cn-space-3);
}

.cn-profile-photos__act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--cn-border-mid);
  border-radius: var(--cn-radius-pill);
  background: var(--cn-surface);
  color: var(--cn-navy);
  font: inherit;
  font-size: var(--cn-text-label);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.cn-profile-photos__act:hover {
  border-color: var(--cn-cyan);
  color: var(--cn-cyan);
}

.cn-profile-photos__act[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* ---------------------------------------------------------------------------
   THE LIGHTBOX
   <dialog> brings its own backdrop, Escape handling and focus trap.
   --------------------------------------------------------------------------- */

.cn-profile-lightbox {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: var(--cn-radius-md);
  background: var(--cn-surface);
  overflow: visible;
}

.cn-profile-lightbox::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.cn-profile-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--cn-radius-md);
}

.cn-profile-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cn-surface);
  color: var(--cn-navy);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--cn-shadow-raised);
}

.cn-profile-photos__event {
  margin: var(--cn-space-2) 0 0;
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-label);
}

/* p3 and p4 end on a full-width band, where p1/p2/p5 carry a rail. */
.cn-profile-photos__ad {
  margin-top: var(--cn-space-12);
}

/* ---------------------------------------------------------------------------
   UPCOMING EVENTS                                             artboard p4
   --------------------------------------------------------------------------- */

.cn-profile-events__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--cn-gap-media);
}

@media (max-width: 1023px) { .cn-profile-events__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  { .cn-profile-events__grid { grid-template-columns: 1fr; } }

.cn-profile-events__rule {
  margin-block: var(--cn-space-12);
  border: 0;
  border-top: 1px solid var(--cn-border);
}

/*
   p4 sets the caption beside the claimed events rather than above them -
   the copy explains the entitlement and the cards show what was spent.
*/
.cn-profile-events__claim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--cn-space-8);
  align-items: start;
}

@media (max-width: 767px) {
  .cn-profile-events__claim { grid-template-columns: 1fr; }
}

.cn-profile-events__claim-note {
  margin: var(--cn-space-3) 0 var(--cn-space-5);
  color: var(--cn-ink-body);
  font-size: var(--cn-text-body);
  line-height: var(--cn-lh-body);
}

.cn-profile-events__claim-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--cn-gap-media);
}

@media (max-width: 599px) {
  .cn-profile-events__claim-list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   CEFPRO SURVEYS                                              artboard p5
   --------------------------------------------------------------------------- */

/*
   p5 DRAWS WITH THE SITE'S OWN PIECES - cn-issue-hero--report for the orange
   block, cn:coverCard for the Report Library, cn:headlineRow for survey
   links - so they are styled where /research is (reader.css, shell.css) and
   not here. Four hand-rolled classes lived here before (__feature, __row,
   __title, __report*): titles at 29.4px weight 700 against the site's 24px
   weight 500 rows, which is exactly the inconsistency that was reported.
   Only the two page-specific touches remain.
*/

/* The "Chosen to match your topics" line - body copy, muted, as the
   listings' intros are. */
.cn-profile-survey__desc {
  margin: 0 0 var(--cn-space-6);
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-body);
  line-height: var(--cn-lh-body);
}

/*
   "Reports" and its "chosen for you" note on ONE line - the note right-
   aligned on the heading's baseline rather than stacked as another row.
   The heading keeps its own bottom margin, so the band still sits where it
   did under it; the note drops its block margin and wraps under the heading
   on a narrow screen rather than squeezing it.
*/
.cn-profile-rr__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: var(--cn-space-6);
}
.cn-profile-rr__head .cn-profile-survey__desc {
  margin: 0;
  font-size: var(--cn-text-meta);
}

/*
   THE TWO COLUMNS UNDER THE ORANGE BAND - p5's own shape.
   Measured: the Report Library starts at x=348.8pt, ~751px into the 1256
   content, so the split is ~700 / ~505: 700fr to 505fr with the gap taken
   from both. One column below 900px, where 505 can no longer hold two
   covers side by side.
*/
.cn-profile-rr {
  display: grid;
  grid-template-columns: minmax(0, 700fr) minmax(0, 505fr);
  gap: var(--cn-space-12);
  align-items: start;
}
@media (max-width: 899px) {
  .cn-profile-rr { grid-template-columns: 1fr; }
}

/* Two covers across, as p5 draws the library - ~230px each at desktop,
   /research's size for the same card. Beats the shell's cn-grid--covers
   step-downs on purpose: in a ~505 column, two is already the count. */
.cn-profile-rr__covers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* A survey, as p5 lists them: title, description, pill, a rule under.
   Title is Poppins SemiBold 10.2pt (24.5px) on the board; the text is
   navy Medium at body size, as drawn - not muted grey. */
.cn-profile-survey {
  padding-block: var(--cn-space-5);
  border-bottom: 1px solid var(--cn-ink);
}
.cn-profile-survey:first-of-type { padding-top: 0; }
.cn-profile-survey__title {
  margin: 0;
  color: var(--cn-ink);
  font-size: var(--cn-text-section);
  font-weight: var(--cn-fw-semibold);
  line-height: var(--cn-lh-tight);
}
.cn-profile-survey__text {
  margin: var(--cn-space-2) 0 var(--cn-space-3);
  color: var(--cn-ink);
  font-size: var(--cn-text-body);
  font-weight: var(--cn-fw-medium);
  line-height: var(--cn-lh-body);
}

/* The eyebrow on the orange band is white on /research too - set there by
   an inline style, so carried here for the same band. */
.cn-profile-body .cn-issue-hero--report .cn-issue-hero__eyebrow {
  color: var(--cn-ink-invert);
}

/* ---------------------------------------------------------------------------
   MY PREFERENCES                                              artboard p6
   --------------------------------------------------------------------------- */

/*
   FULL CONTENT WIDTH, LEFT-ALIGNED - not a 940px column centred in the page.

   The board's topic columns sit at x = 110 / 530 / 950 (site px) - a 420px
   pitch, which is exactly three columns across the 1256 container. Centred
   at 940 the form started 158px right of the "My Preferences" heading above
   it, so the two did not share an edge.
*/
.cn-profile-prefs {
  padding-block: var(--cn-space-8) var(--cn-space-12);
}

.cn-profile-prefs__label {
  margin: 0 0 var(--cn-space-3);
  text-align: center;
  color: var(--cn-ink-body);
  font-size: var(--cn-text-nav);   /* 16 - the form is one scale, see __check */
  font-weight: var(--cn-fw-medium);
}

.cn-profile-prefs__email {
  display: block;
  width: 100%;
  padding: var(--cn-space-3) var(--cn-space-4);
  border: 1px solid var(--cn-border-mid);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface);
  color: var(--cn-ink-body);
  font: inherit;
  font-size: var(--cn-text-nav);   /* 16, the old page's input */
}

.cn-profile-prefs__intro {
  margin: var(--cn-space-6) 0 var(--cn-space-6);
  color: var(--cn-ink-body);
  font-size: var(--cn-text-nav);   /* 16, the old page's intro */
}

/* 17 topics in three columns on p6. */
.cn-profile-prefs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Rows breathe the way the old page's did: it ran an 87px pitch with
     two-line labels; 40 of gap plus a 21-42px label lands 61-82. */
  gap: var(--cn-space-10) var(--cn-space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cn-profile-prefs__grid--two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 767px) {
  .cn-profile-prefs__grid,
  .cn-profile-prefs__grid--two { grid-template-columns: 1fr; }
}

/* Checkbox and label on one line, label wrapping under itself rather than
   under the box - which is why the box does not shrink. */
/*
   THE OLD PAGE'S FORM, MEASURED - which is what the board pastes in as an
   image and what was asked for in as many words ("old page was looking
   good"). From /user/myprofile, computed at 1440:
     label     16px Poppins weight 500, #212529, line 1.2
     box       16 x 16, 0.8px #007bff border, 4px radius, blue fill + white
               tick when checked, 8px left of the text
   Rebuilt on 2026 tokens: --cn-text-nav is 16px at desktop (the nearest
   step, used here for its value, not its name), --cn-ink-body is the 2026
   twin of #212529, and the checked fill is --cn-cyan - the same colour as
   the "Update preferences" pill the board draws under the form.

   This was --cn-text-body (18px) beside the browser's bare native box,
   which is what read as large and unfinished.
*/
.cn-profile-prefs__check {
  display: flex;
  gap: var(--cn-space-2);
  align-items: flex-start;
  color: var(--cn-ink-body);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-medium);
  line-height: 1.3;
  cursor: pointer;
}

/* EXACTLY TWO FLEX ITEMS: the box and this span. Text directly inside the
   label became one anonymous flex item per run, which is how the consent
   sentence split into three columns around its link. */
.cn-profile-prefs__text {
  min-width: 0;
}
.cn-profile-prefs__text a {
  color: var(--cn-cyan);
  text-decoration: underline;
}

.cn-profile-prefs__check input {
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  /* (20.8 line - 16 box) / 2: the box centres on the FIRST line, so a
     two-line label hangs from it rather than centring on both. */
  margin: 2px 0 0;
  border: 1px solid var(--cn-border-mid);
  border-radius: 4px;
  background: var(--cn-surface) center / 12px 12px no-repeat;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.cn-profile-prefs__check input:checked {
  border-color: var(--cn-cyan);
  background-color: var(--cn-cyan);
  /* White tick, inline so it needs no extra request or asset upload. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cn-profile-prefs__check input:focus-visible {
  outline: 2px solid var(--cn-cyan);
  outline-offset: 2px;
}

.cn-profile-prefs__rule {
  margin-block: var(--cn-space-8);
  border: 0;
  border-top: 1px solid var(--cn-border);
}

.cn-profile-prefs__consent {
  margin: var(--cn-space-5) 0 0;
}

.cn-profile-prefs__all {
  margin: var(--cn-space-6) 0 0;
}

/*
   The save result. Empty and invisible until there is something to say -
   an aria-live region that is never allowed to collapse would announce
   its own emptiness on every page load.
*/
.cn-profile-prefs__status {
  margin: var(--cn-space-6) 0 0;
  font-size: var(--cn-text-body);
}

.cn-profile-prefs__status:empty {
  display: none;
}

.cn-profile-prefs__status--ok    { color: var(--cn-fam-green); }
.cn-profile-prefs__status--error { color: var(--cn-fam-orange); }

.cn-profile-prefs .cn-btn {
  margin-top: var(--cn-space-8);
}

/* ---------------------------------------------------------------------------
   NARROW SCREENS
   No mobile artboard exists for My Profile - the same gap §4.7 records for
   the rest of the build. This is the T-40 spec applied, not a guess at a
   design: the hero stacks, and the Plus lockup goes full width rather than
   shrinking to a stamp beside a wrapped headline.
   --------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .cn-profile-hero {
    flex-direction: column;
    gap: var(--cn-space-6);
  }

  .cn-profile-hero__plus {
    width: 100%;
    max-width: 266px;
  }

  .cn-profile-recent__title {
    font-size: var(--cn-text-h2);
  }
}

/*
   TAP TARGETS ON A PHONE. .cn-profile-tabs__tab sets min-height: 33px for
   the desktop pill, and this file loads after chip.css - so it also beat
   chip.css's own mobile rule raising every chip to the 44px floor (T-40).
   The six My Profile tabs, the Saved filter and the author profile's filter
   all use this class, and all three were 33px tall at 375.
*/
@media (max-width: 767px) {
  .cn-profile-tabs__tab { min-height: 44px; }
}

/* ===========================================================================
   MY ACCOUNT, MY ORDERS, FEEDBACK - no artboard (17 Nov 2026)
   ---------------------------------------------------------------------------
   The old My Profile's account sections in the 2026 shell. Drawn at p6's
   form scale - 16px labels and inputs, the old page's - so the four form
   pages read as one family, and with nothing a token does not already give.
   =========================================================================== */

/* The three new links in the hero row: between Manage Membership's navy and
   Log out's grey - navy, regular weight. */
.cn-profile-hero__link {
  color: var(--cn-navy);
  font-weight: var(--cn-fw-regular);
}
.cn-profile-hero__link[aria-current="page"] {
  color: var(--cn-cyan);
  font-weight: var(--cn-fw-semibold);
}

.cn-account {
  padding-block: var(--cn-space-6) var(--cn-space-10);
  border-bottom: 1px solid var(--cn-border);
}
.cn-account:last-of-type { border-bottom: 0; }

.cn-account__head {
  margin: 0 0 var(--cn-space-5);
  color: var(--cn-navy);
  font-size: var(--cn-text-card);
  font-weight: var(--cn-fw-semibold);
}
.cn-account__subhead {
  margin: var(--cn-space-8) 0 var(--cn-space-1);
  color: var(--cn-navy);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-semibold);
}
.cn-account__intro {
  margin: 0 0 var(--cn-space-6);
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-nav);
}

.cn-account__form { max-width: 980px; }
.cn-account__form--narrow { max-width: 560px; }

.cn-account__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cn-space-5) var(--cn-space-8);
  margin-top: var(--cn-space-5);
}

.cn-account__field {
  display: flex;
  flex-direction: column;
  gap: var(--cn-space-2);
  margin-bottom: var(--cn-space-5);
}
.cn-account__grid .cn-account__field { margin-bottom: 0; }
.cn-account__field--wide { margin-top: var(--cn-space-6); }

.cn-account__label {
  color: var(--cn-ink-body);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-medium);
}

/* The same field p6 draws for its email. */
.cn-account__input {
  width: 100%;
  min-height: 44px;
  padding: var(--cn-space-2) var(--cn-space-4);
  border: 1px solid var(--cn-border-mid);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface);
  color: var(--cn-ink-body);
  font: inherit;
  font-size: var(--cn-text-nav);
}
.cn-account__input:focus-visible {
  outline: 2px solid var(--cn-cyan);
  outline-offset: 1px;
  border-color: var(--cn-cyan);
}
.cn-account__input:user-invalid { border-color: var(--cn-fam-orange); }
.cn-account__textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--cn-lh-body);
}

.cn-account__hint {
  margin: 0;
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-label);
}

.cn-account__rules {
  margin: 0;
  padding-left: var(--cn-space-5);
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-label);
}

/* Photo: the site's disc-with-initials, beside its file input. */
.cn-account__photo {
  display: flex;
  align-items: center;
  gap: var(--cn-space-6);
  margin-bottom: var(--cn-space-5);
}
.cn-account__photo .cn-account__field { margin-bottom: 0; }
.cn-account__avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 120px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--cn-radius-pill);
  background: var(--cn-navy);
}
.cn-account__initials {
  color: var(--cn-ink-invert);
  font-size: var(--cn-text-h2);
  font-weight: var(--cn-fw-semibold);
  line-height: 1;
  user-select: none;
}
.cn-account__avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.cn-account__file { font: inherit; font-size: var(--cn-text-label); }

/* The save result - p6's colours for the same two outcomes. */
.cn-account__status {
  margin: 0 0 var(--cn-space-5);
  padding: var(--cn-space-3) var(--cn-space-4);
  border-left: 4px solid currentColor;
  background: var(--cn-band-grey);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-medium);
}
.cn-account__status--ok    { color: var(--cn-fam-green); }
.cn-account__status--error { color: var(--cn-fam-orange); }

.cn-account .cn-btn { margin-top: var(--cn-space-6); }

/* ------------------------------------------------------------ orders --- */
.cn-orders {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--cn-text-nav);
  color: var(--cn-ink-body);
}
.cn-orders th {
  padding: var(--cn-space-3) var(--cn-space-3);
  border-bottom: 2px solid var(--cn-border-strong);
  color: var(--cn-navy);
  font-size: var(--cn-text-label);
  font-weight: var(--cn-fw-semibold);
  text-align: left;
}
.cn-orders td {
  padding: var(--cn-space-4) var(--cn-space-3);
  border-bottom: 1px solid var(--cn-border);
  vertical-align: top;
}
.cn-orders__num { text-align: right; white-space: nowrap; }
.cn-orders td.cn-orders__num { font-variant-numeric: tabular-nums; }

.cn-orders__status {
  display: inline-block;
  padding: 2px var(--cn-space-3);
  border-radius: var(--cn-radius-pill);
  background: var(--cn-band-grey);
  font-size: var(--cn-text-label);
  font-weight: var(--cn-fw-medium);
  white-space: nowrap;
}
.cn-orders__status--paid      { background: var(--cn-panel-blue); color: var(--cn-navy); }
.cn-orders__status--unpaid    { color: var(--cn-fam-orange); }
.cn-orders__status--cancelled { color: var(--cn-ink-muted); }

.cn-orders__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-2) var(--cn-space-4);
  justify-content: flex-end;
}
.cn-orders__link {
  color: var(--cn-cyan);
  font-weight: var(--cn-fw-medium);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .cn-account__grid { grid-template-columns: minmax(0, 1fr); }
  .cn-account__photo { flex-direction: column; align-items: flex-start; }

  /* Each order becomes a card with its own labels. */
  .cn-orders thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .cn-orders, .cn-orders tbody, .cn-orders tr, .cn-orders td { display: block; width: 100%; }
  .cn-orders tr {
    padding: var(--cn-space-3) 0;
    border-bottom: 1px solid var(--cn-border);
  }
  .cn-orders td {
    display: flex;
    justify-content: space-between;
    gap: var(--cn-space-4);
    padding: var(--cn-space-1) 0;
    border: 0;
    text-align: right;
  }
  .cn-orders td::before {
    content: attr(data-label);
    color: var(--cn-ink-muted);
    font-size: var(--cn-text-label);
    text-align: left;
  }
  .cn-orders td.cn-orders__actions { justify-content: flex-start; padding-top: var(--cn-space-2); }
  .cn-orders td.cn-orders__actions::before { content: none; }
  .cn-orders__link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Password rules: a tick appears as each is met (profile.js). */
.cn-account__rules { list-style: none; padding-left: 0; }
.cn-account__rules li::before { content: "\2022"; display: inline-block; width: 1.2em; }
.cn-account__rules li.is-met { color: var(--cn-fam-green); }
.cn-account__rules li.is-met::before { content: "\2713"; }

/* Contact Us - the old profile's right-hand box, as a closing panel. */
.cn-profile-help {
  margin: var(--cn-space-8) 0 var(--cn-space-12);
  padding: var(--cn-space-6);
  background: var(--cn-panel-blue);
}
.cn-profile-help__head {
  margin: 0 0 var(--cn-space-2);
  color: var(--cn-navy);
  font-size: var(--cn-text-card);
  font-weight: var(--cn-fw-semibold);
}
.cn-profile-help__text {
  margin: 0 0 var(--cn-space-4);
  color: var(--cn-ink-body);
  font-size: var(--cn-text-nav);
}

/* One invoice. */
.cn-invoice__back { margin: var(--cn-space-6) 0 0; font-size: var(--cn-text-label); }
.cn-invoice__back a { color: var(--cn-navy); }
.cn-invoice__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--cn-space-4);
  margin-top: var(--cn-space-4);
}
.cn-invoice__head .cn-section-title { margin-bottom: 0; }
.cn-invoice__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-4) var(--cn-space-10);
  margin: 0 0 var(--cn-space-6);
}
.cn-invoice__facts dt {
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-label);
}
.cn-invoice__facts dd {
  margin: 0;
  color: var(--cn-navy);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-medium);
}
.cn-invoice__lines { max-width: 760px; }
.cn-invoice__line--strong td {
  color: var(--cn-navy);
  font-weight: var(--cn-fw-semibold);
}
.cn-invoice__edit { margin-top: var(--cn-space-6); }
.cn-invoice__edit > summary { list-style: none; cursor: pointer; }
.cn-invoice__edit > summary::-webkit-details-marker { display: none; }
.cn-invoice__attendee {
  margin: var(--cn-space-6) 0 0;
  padding: var(--cn-space-4) var(--cn-space-5) var(--cn-space-5);
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
}
.cn-invoice__attendee legend {
  padding: 0 var(--cn-space-2);
  color: var(--cn-navy);
  font-size: var(--cn-text-nav);
  font-weight: var(--cn-fw-semibold);
}

/* Cancel membership: the confirm answer is the quieter of the two. */
.cn-cancel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cn-space-4);
  margin-top: var(--cn-space-6);
}
.cn-cancel__actions .cn-btn { margin-top: 0; }
.cn-cancel__no {
  border: 1px solid var(--cn-navy);
  background: var(--cn-surface);
  color: var(--cn-navy);
}

/* My Profile - Following (round 3). The expert card, with its two buttons
   centred under it as the card centres its own text. */
.cn-profile-following { row-gap: var(--cn-space-8); }
/* Cards in a row share one height (the grid stretches the item; the card
   takes the slack), so the buttons line up across the row however long
   a role or company runs. */
.cn-profile-following__item { display: flex; flex-direction: column; align-self: stretch; }
.cn-profile-following__item > .cn-person { flex: 1 1 auto; }
.cn-profile-following__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cn-space-3); margin-top: var(--cn-space-4); }

/* Recommended for you - the brief's "View More Recommendations" under each tab. */
.cn-profile-rec__more { margin-top: var(--cn-space-6); text-align: center; }

/* ===========================================================================
   MY PROFILE, CLIENT FEEDBACK (21 Nov 2026, Alana)

   - "Recommended for you" heading in CeFPro's dark blue #001c64.
   - "reduce ad banner size": the full-width Connect Plus band on Reports and
     Research / Events / Event Photos was the creative blown up to the
     column (1283x175 at 1470). Now as Home: never larger than the creative,
     at most 150px tall, centred.
   - Saved Content: "reduce feature image size to match other website
     pages" - the library's featured row (listing.css --wide): the image one
     card wide on the cards' grid and gap, the text beside it.
   (The half advert in the Overview / Saved rails is the JSPs +
   cn-reader--sky in reader.css.)
   =========================================================================== */
section.cn-profile-rec .cn-section-heading { color: var(--cn-navy); }

.cn-profile-photos__ad .cn-ad:not(.cn-ad--placeholder) { background: transparent; }
.cn-profile-photos__ad .cn-ad--horizontal:not(.cn-ad--placeholder) .cn-ad__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 150px;
  margin-inline: auto;
  object-fit: contain;
}

.cn-listing__hero.cn-profile-saved__hero {
  --cn-grid-gap: var(--cn-gap-media);
  margin-bottom: 0;
}
/* 768-1023 the saved cards are two across, so the featured row is too. */
@media (min-width: 768px) and (max-width: 1023px) {
  .cn-profile-saved__hero.cn-listing__hero--horizontal.cn-listing__hero--wide .cn-card--hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
