/* assets/community/profiles/profile.css — public creator profile (/u/), claim page (/u/claim.php) and the
   credited-author page panels. PROFILES stream. Dark only, like the site and the Workspace (see builder-r1.md §5).
   Every rule is scoped under .cp / .cp-* so the shared index1.css nav and footer are untouched.
   Integration r1: ONE design language. Every --cp-* colour token equals the Workspace token named beside it
   (profile-wk.css, the language SPEC section 5 says to extend); tests/integration/design.py fails if they drift.
   Contrast (WCAG 2.2 AA, computed by tests/integration/design.py) on --cp-bg #0D0C1D: text 17.64:1, text-2 #B6B9CC 9.93:1,
   text-3 #9296AE 6.62:1, accent #B7AAFF 9.39:1; on --cp-surface-2 #1B1A33: 15.44 / 8.69 / 5.79 / 8.22. Focus ring
   #A78BFA 6.21:1 at worst (needs 3:1). */

.cp, .cp-page .cp {
  --cp-bg: #0D0C1D;             /* = --wk-bg */
  --cp-surface: #141329;        /* = --wk-surface-1 */
  --cp-surface-2: #1B1A33;      /* = --wk-surface-2 */
  --cp-line: #2B2A4A;           /* = --wk-line */
  --cp-line-strong: #3A3960;    /* = --wk-line-strong */
  --cp-text: #F4F4FB;           /* = --wk-text */
  --cp-text-2: #B6B9CC;         /* = --wk-text-2 */
  --cp-text-3: #9296AE;         /* = --wk-text-3 */
  --cp-ring: #A78BFA;           /* = --wk-ring */
  --cp-on-accent: #0B0A18;
  --cp-accent: #B7AAFF;         /* = --wk-accent-text (a member's chosen accent overrides it) */
  --cp-accent-soft: rgba(196, 181, 253, 0.14);
  --cp-av-bg: #141230;
  --cp-r: 14px;
  --cp-ease: cubic-bezier(.2, 0, 0, 1);
  --cp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--cp-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
  line-height: 1.55;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .cp { --cp-accent-soft: color-mix(in srgb, var(--cp-accent) 16%, transparent); }
}
@media (min-width: 640px) { .cp { padding: 2rem 1.5rem 5rem; } }

.cp *, .cp *::before, .cp *::after { box-sizing: border-box; }
/* Links: only UNCLASSED links get a page-level colour (the accent, >= 4.5:1 on every surface here). Every classed link
   (.cp-btn, .cp-tab, .cp-card__link, …) sets its own colour. Critic r1 H1: a blanket `.cp a { color: inherit }` (0,1,1)
   out-ranked `.cp-btn--primary` (0,1,0) and painted light text on the light accent (1.4–1.7:1). Never reintroduce it. */
.cp a:not([class]) { color: var(--cp-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: from-font; }
.cp a:not([class]):hover { text-decoration-thickness: 2px; }
.cp :focus-visible { outline: 2px solid var(--cp-ring); outline-offset: 3px; border-radius: 8px; }
.cp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cp-i { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.16em; }

/* ---------------------------------------------------------------- avatar tiles: assets/community/profiles/avatar.css
   (integration r10, design panel r9 M1: ONE stylesheet for the ONE renderer, profiles_avatar_html(), linked by every page
   that calls it: /u/, settings, the credited-author page and the leaderboards) */

/* ---------------------------------------------------------------- owner bar */
.cp-ownerbar {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px;
  background: var(--cp-accent-soft); border: 1px solid var(--cp-line-strong); color: var(--cp-text);
  font-size: .9375rem;
}
.cp-ownerbar p { margin: 0; flex: 1 1 14rem; }
.cp-ownerbar > .cp-i { color: var(--cp-accent); }

/* ---------------------------------------------------------------- hero */
.cp-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 22px; border: 1px solid var(--cp-line);
  background: linear-gradient(160deg, #1A1838 0%, #121027 55%, #0F0E22 100%);
  padding: 1.5rem 1.1rem 1.4rem;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .cp-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--cp-accent) 20%, #121027) 0%, #121027 55%, #0F0E22 100%); }
}
@media (min-width: 640px) { .cp-hero { padding: 2.5rem 2.5rem 2.25rem; } }
.cp-hero__art { position: absolute; z-index: -1; right: -150px; top: -170px; opacity: .10; pointer-events: none; }
@media (max-width: 639px) { .cp-hero__art { right: -260px; top: -240px; opacity: .08; } }
.cp-hero__inner { display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start; }
@media (min-width: 768px) { .cp-hero__inner { flex-direction: row; gap: 2rem; align-items: center; } }
.cp-id { min-width: 0; max-width: 46rem; }
.cp-name {
  margin: 0; color: var(--cp-text);
  font-size: clamp(1.875rem, 1.25rem + 2.6vw, 3.1rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.cp-handle { margin: .45rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; color: var(--cp-text-2); font-size: .9375rem; }
.cp-handle__at { font-family: var(--cp-mono); color: var(--cp-accent); font-size: 1rem; }
.cp-since { display: inline-flex; align-items: center; gap: .4rem; color: var(--cp-text-2); }   /* on the accent-tinted hero: text-3 measured 4.03:1 (integration r1) */
.cp-bio { margin: 1rem 0 0; color: var(--cp-text); font-size: 1.0625rem; line-height: 1.6; max-width: 38rem; overflow-wrap: anywhere; }
.cp-weblink { margin: .6rem 0 0; }
.cp-weblink a { display: inline-flex; gap: .45rem; align-items: center; color: var(--cp-accent); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; min-height: 44px; }
.cp-weblink a:hover span:not(.cp-sr) { text-decoration: underline; text-underline-offset: 3px; }
.cp-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.cp-live { margin: .5rem 0 0; min-height: 1.4em; font-size: .875rem; color: var(--cp-text-2); }
.cp-live:empty { margin: 0; min-height: 0; }

/* ---------------------------------------------------------------- buttons */
.cp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1rem; border-radius: 11px;
  border: 1px solid var(--cp-line-strong); background: var(--cp-surface-2); color: var(--cp-text);
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 140ms var(--cp-ease), border-color 140ms var(--cp-ease);
}
.cp-btn:hover { background: #26244A; border-color: #5A5996; }
.cp .cp-btn--primary, .cp-btn--primary { background: var(--cp-accent); border-color: transparent; color: var(--cp-on-accent); }
.cp .cp-btn--primary:hover { background: var(--cp-accent); filter: brightness(1.08); border-color: transparent; color: var(--cp-on-accent); }
.cp .cp-btn--primary .cp-i { color: var(--cp-on-accent); }
.cp-btn--quiet { background: transparent; }
.cp-btn--small { min-height: 36px; padding: 0 .75rem; font-size: .875rem; }
.cp-btn[hidden] { display: none; }
.cp-js .cp-btn--noscript { display: none; }
.cp-btn .cp-i { width: 1.1em; height: 1.1em; }

/* ---------------------------------------------------------------- stats */
.cp-stats { margin-top: 1.25rem; }
.cp-statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
/* Phones (critic r3 L3): with an odd number of tiles the LEAD tile (the credited count) spans the row as the headline
   number, laid out across, so no tile is ever left alone at half width. */
@media (max-width: 767px) {
  .cp-statgrid > .cp-stat:first-child:nth-last-child(odd) { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; }
}
/* integration r8 (design panel r7 L2): the column count follows the NUMBER of tiles (--cp-n, set by the page), never the
   width alone, so no tile (the rank, the stat a member is proudest of) is ever stranded alone on a row: up to 5 tiles sit
   on one row at tablet width, 6 make 3 + 3, 7 make 4 + 3; from 1024 px up to 7 sit on one row. */
@media (min-width: 768px) { .cp-statgrid { grid-template-columns: repeat(var(--cp-cols-t, 4), minmax(0, 1fr)); gap: .8rem; } }
@media (min-width: 1024px) { .cp-statgrid { grid-template-columns: repeat(var(--cp-cols-w, 4), minmax(0, 1fr)); } }
.cp-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .2rem; padding: 1rem 1.1rem; border-radius: var(--cp-r); background: var(--cp-surface); border: 1px solid var(--cp-line); min-width: 0; }
.cp-stat dt { color: var(--cp-text-2); font-size: .8125rem; font-weight: 500; letter-spacing: .01em; }
.cp-stat dd { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 650; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--cp-text); }
.cp-stat--rank dd a { color: var(--cp-accent); text-decoration: none; }
.cp-stat--rank dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cp-statnote { margin: .6rem .25rem 0; font-size: .8125rem; color: var(--cp-text-3); }

/* ---------------------------------------------------------------- facts + chips */
.cp-facts { display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 768px) { .cp-facts { grid-template-columns: 1fr 1fr; } }
.cp-fact__h, .cp-h2 { margin: 0 0 .6rem; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cp-text-2); }
.cp-h2 { font-size: 1.25rem; letter-spacing: -0.01em; text-transform: none; color: var(--cp-text); margin-bottom: 0; }
.cp-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.cp-chip { display: inline-flex; align-items: center; min-height: 32px; padding: .2rem .75rem; border-radius: 999px; border: 1px solid var(--cp-line-strong); background: var(--cp-surface); color: var(--cp-text); font-size: .875rem; overflow-wrap: anywhere; }
.cp-chip--name { font-family: var(--cp-mono); font-size: .8125rem; border-color: var(--cp-accent); }

/* ---------------------------------------------------------------- badges */
.cp-badges { margin-top: 2rem; }
.cp-badges .cp-h2 { margin-bottom: .8rem; }
.cp-badgelist { display: grid; grid-template-columns: 1fr; gap: .6rem; margin: 0; padding: 0; list-style: none; }
/* integration r8 (design panel r7 L1): three cards a row at 1280 (a long name such as "Contributor of the Month" fits one
   line), the art pinned to the top of the card so a row of cards of different heights lines up, and the card reads as
   three distinct lines: the name, what it means, then the small dated meta. */
@media (min-width: 640px) { .cp-badgelist { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); } }
.cp-badge { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--cp-r); border: 1px solid var(--cp-line); background: linear-gradient(135deg, var(--cp-surface-2), var(--cp-surface)); }
.cp-badge__art { width: 44px; height: 44px; flex: none; border-radius: 12px; }
.cp-badge__art--emblem { display: grid; place-items: center; color: var(--cp-accent); background: var(--cp-accent-soft); border: 1px solid var(--cp-line-strong); }
.cp-badge__art--emblem .cp-i { width: 22px; height: 22px; }
.cp-badge__text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; padding-top: .1rem; }
.cp-badge__name { font-weight: 600; color: var(--cp-text); line-height: 1.3; }
.cp-badge__desc { font-size: .875rem; line-height: 1.45; color: var(--cp-text-2); }
.cp-badge__meta { margin-top: .25rem; font-size: .75rem; line-height: 1.4; letter-spacing: .01em; color: var(--cp-text-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- work */
.cp-work { margin-top: 2.25rem; scroll-margin-top: 5.5rem; }
.cp-work__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
/* Sort = a segmented row of links (critic r1 M4: a <select> that navigated on change broke WCAG 3.2.2). Choosing is
   activating a link: nothing ever navigates on focus or arrow keys. */
.cp-seg { display: inline-flex; align-items: center; gap: .2rem; padding: .25rem; border-radius: 12px; border: 1px solid var(--cp-line); background: var(--cp-surface); max-width: 100%; overflow-x: auto; }
.cp-seg__label { padding: 0 .5rem 0 .45rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cp-text-3); }
.cp-seg__opt { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .75rem; border-radius: 9px; color: var(--cp-text-2); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cp-seg__opt:hover { color: var(--cp-text); background: rgba(255,255,255,.05); }
.cp-seg__opt[aria-current="true"] { color: var(--cp-text); background: var(--cp-surface-2); box-shadow: inset 0 0 0 1px var(--cp-line-strong); }
@media (max-width: 479px) { .cp-seg { width: 100%; } .cp-seg__opt { flex: 1 1 auto; justify-content: center; padding: 0 .5rem; } .cp-seg__label { display: none; } }
.cp-work__count { margin: 0; color: var(--cp-text-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
/* kind first, then the sort that applies to it (critic r2 L2): one row on wide screens, stacked on phones */
.cp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 1rem; }
.cp-toolbar .cp-tabs { margin: 0; }
.cp-tabs { display: flex; gap: .35rem; margin: 0 0 1rem; padding: .3rem; border-radius: 14px; background: var(--cp-surface); border: 1px solid var(--cp-line); width: max-content; max-width: 100%; overflow-x: auto; }
.cp-tab { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .95rem; border-radius: 10px; text-decoration: none; color: var(--cp-text-2); font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.cp-tab:hover { color: var(--cp-text); background: rgba(255,255,255,.04); }
.cp-tab[aria-current="page"] { background: var(--cp-surface-2); color: var(--cp-text); box-shadow: inset 0 0 0 1px var(--cp-line-strong); }
.cp-tab__n { font-size: .75rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--cp-text-2); font-variant-numeric: tabular-nums; }
.cp-tab[aria-current="page"] .cp-tab__n { background: var(--cp-accent); color: var(--cp-on-accent); }

.cp-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cp-card { position: relative; display: flex; flex-direction: column; gap: .9rem; justify-content: space-between; min-height: 9.5rem; padding: 1rem 1.1rem; border-radius: var(--cp-r); background: var(--cp-surface); border: 1px solid var(--cp-line); transition: border-color 160ms var(--cp-ease), background-color 160ms var(--cp-ease); }
.cp-card:hover, .cp-card:focus-within { border-color: var(--cp-accent); background: #1A1935; }
.cp-card__link { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--cp-text); }
.cp-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--cp-r); }
.cp-card__link:focus-visible { outline: none; }
.cp-card__link:focus-visible::after { outline: 2px solid var(--cp-ring); outline-offset: 2px; }
.cp-card__kind { font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--cp-text-3); }
.cp-card__title { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.cp-card__meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; font-size: .8125rem; color: var(--cp-text-2); font-variant-numeric: tabular-nums; }
.cp-card__meta > span, .cp-card__meta > time { display: inline-flex; align-items: center; gap: .3rem; }
.cp-card__as { font-family: var(--cp-mono); font-size: .75rem; }
.cp-card__snip { margin: -.35rem 0 0; color: var(--cp-text-2); font-size: .875rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cp-card__img { display: block; margin: -1rem -1.1rem 0; aspect-ratio: 16 / 10; border-radius: var(--cp-r) var(--cp-r) 0 0; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, var(--cp-accent-soft), transparent 60%), var(--cp-surface-2); }
.cp-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* the member's most-upvoted prompt, shown on the default view only (derived: no setting, nothing stored) */
.cp-featured { margin-top: 2rem; }
.cp-featured .cp-fact__h { display: inline-flex; align-items: center; gap: .4rem; }
.cp-featured .cp-fact__h .cp-i { color: var(--cp-accent); }
.cp-featured__card { position: relative; display: grid; gap: .55rem; padding: 1.25rem 1.3rem; border-radius: 18px; text-decoration: none; color: var(--cp-text);
  border: 1px solid var(--cp-line-strong); background: linear-gradient(135deg, var(--cp-surface-2), var(--cp-surface) 70%);
  transition: border-color 160ms var(--cp-ease), background-color 160ms var(--cp-ease); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .cp-featured__card { background: linear-gradient(135deg, color-mix(in srgb, var(--cp-accent) 13%, var(--cp-surface-2)), var(--cp-surface) 70%); }
}
@media (min-width: 640px) { .cp-featured__card { padding: 1.6rem 1.75rem; } }
.cp-featured__card:hover { border-color: var(--cp-accent); }
.cp-featured__title { font-size: clamp(1.2rem, 1rem + .9vw, 1.55rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.cp-featured__snip { color: var(--cp-text-2); font-size: .975rem; line-height: 1.6; max-width: 52rem; overflow-wrap: anywhere; }
.cp-featured__meta { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; align-items: center; color: var(--cp-text-2); font-size: .875rem; font-variant-numeric: tabular-nums; }
.cp-featured__go { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--cp-accent); font-weight: 600; }

.cp-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.cp-pager > :last-child { justify-self: end; }
.cp-pager__pos { color: var(--cp-text-2); font-size: .875rem; font-variant-numeric: tabular-nums; }

.cp-empty { display: grid; justify-items: center; text-align: center; gap: .6rem; padding: 2.5rem 1rem; border-radius: 18px; border: 1px dashed var(--cp-line-strong); background: radial-gradient(ellipse at top, var(--cp-accent-soft), transparent 70%); }
.cp-empty--small { padding: 1.5rem 1rem; }
/* the invitation (no credited work yet): three ghost cards where the work will land, no repeated avatar, no zeros */
.cp-empty--invite { border-style: solid; border-color: var(--cp-line); padding: 2.25rem 1.1rem 2rem; background:
  radial-gradient(ellipse 60% 70% at 50% 0%, var(--cp-accent-soft), transparent 75%), var(--cp-surface); }
@media (min-width: 640px) { .cp-empty--invite { padding: 3rem 2rem 2.5rem; } }
.cp-empty--invite .cp-empty__art { display: flex; align-items: flex-end; justify-content: center; gap: .55rem; height: 76px; margin-bottom: .9rem; }
.cp-ghost { display: grid; place-items: center; width: 56px; height: 64px; border-radius: 12px; border: 1px dashed var(--cp-line-strong); background: var(--cp-surface-2); }
.cp-ghost:nth-child(1) { transform: rotate(-7deg) translateY(4px); opacity: .55; }
.cp-ghost:nth-child(3) { width: 64px; height: 76px; border-style: solid; border-color: var(--cp-accent); color: var(--cp-accent); background: var(--cp-accent-soft); transform: rotate(5deg); }
.cp-ghost:nth-child(2) { opacity: .8; }
.cp-ghost .cp-i { width: 26px; height: 26px; }
.cp-statgrid--standing { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
/* skip link (critic r2 L2): first tab stop on the page, visible only when focused */
.cp-skip { position: absolute; left: 1rem; top: -4rem; z-index: 10000; padding: .7rem 1rem; border-radius: 10px; background: #F4F4FB; color: #0B0A18;
  font: 600 .9375rem/1.2 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; text-decoration: none; }
.cp-skip:focus { top: 1rem; outline: 2px solid #C4B5FD; outline-offset: 2px; }
main.cp:focus, main.cp-gone:focus { outline: none; }
.cp-empty__art { margin-bottom: .4rem; }
.cp-empty__title { margin: 0; font-size: 1.25rem; font-weight: 650; color: var(--cp-text); }
.cp-empty__text { margin: 0; max-width: 32rem; color: var(--cp-text-2); }
.cp-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .6rem; }

.cp-foot { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--cp-line); display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; font-size: .875rem; color: var(--cp-text-2); }
.cp-foot p { margin: 0; display: flex; gap: .5rem; align-items: flex-start; max-width: 40rem; }
.cp-foot .cp-i { margin-top: .2rem; }
.cp-quietlink { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--cp-text-2); text-decoration: underline; text-underline-offset: 3px; }
.cp-quietlink:hover { color: var(--cp-text); }

/* ---------------------------------------------------------------- motion (opt-out honoured) */
/* profiles critic r5 M1 (integration r1): the site's two full-viewport background glows (index1.css body::before/after,
   rotating and scaling for ever) stop on every page this file styles when the visitor asks for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  body.cp-page::before, body.cp-page::after { animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .cp-hero, .cp-stats, .cp-facts, .cp-badges, .cp-work__head, .cp-toolbar, .cp-empty--invite { animation: cp-rise 420ms var(--cp-ease) both; }
  .cp-stats { animation-delay: 60ms; }
  .cp-facts, .cp-badges { animation-delay: 110ms; }
  .cp-card { animation: cp-rise 380ms var(--cp-ease) both; animation-delay: calc(140ms + var(--cp-i, 0) * 35ms); }
  .cp-card { transition: border-color 160ms var(--cp-ease), background-color 160ms var(--cp-ease), transform 160ms var(--cp-ease); }
  .cp-card:hover { transform: translateY(-2px); }
  .cp-btn { transition: background-color 140ms var(--cp-ease), border-color 140ms var(--cp-ease), transform 140ms var(--cp-ease); }
  .cp-btn:active { transform: translateY(1px); }
  .cp-hero__art { animation: cp-settle 1600ms var(--cp-ease) both; }   /* runs once and stops (WCAG 2.2.2: nothing moves > 5 s) */
  .cp-featured { animation: cp-rise 420ms var(--cp-ease) both; animation-delay: 120ms; }
  .cp-featured__card:hover .cp-featured__go .cp-i { transform: translateX(3px); }
  .cp-featured__go .cp-i { transition: transform 160ms var(--cp-ease); }
  .cp-empty--invite { animation-delay: 140ms; }
  .cp-ghost:nth-child(3) { animation: cp-ghost 900ms var(--cp-ease) 320ms both; }   /* lands once, then still */
}
@keyframes cp-ghost { from { opacity: 0; transform: rotate(-4deg) translateY(14px); } to { opacity: 1; transform: rotate(5deg); } }
@keyframes cp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cp-settle { from { transform: rotate(-10deg) scale(.94); } to { transform: none; } }

/* ---------------------------------------------------------------- forced colours + print */
@media (forced-colors: active) {
  .cp-av, .cp-stat, .cp-card, .cp-chip, .cp-badge, .cp-hero, .cp-tab[aria-current="page"], .cp-btn, .cp-seg__opt[aria-current="true"], .cp-featured__card { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .cp-seg__opt[aria-current="true"], .cp-tab[aria-current="page"] { outline: 2px solid Highlight; }
  .cp-av { color: CanvasText; }
}
@media print {
  .cp-actions, .cp-seg, .cp-tabs, .cp-pager, .cp-ownerbar, .cp-hero__art { display: none !important; }
  .cp, .cp-hero, .cp-stat, .cp-card { background: #fff !important; color: #000 !important; border-color: #999 !important; }
}

/* ================================================================ /u/claim.php */
.cp-claim { max-width: 44rem; }
.cp-panel { margin-top: 1.25rem; padding: 1.25rem; border-radius: 18px; border: 1px solid var(--cp-line); background: var(--cp-surface); }
@media (min-width: 640px) { .cp-panel { padding: 1.75rem; } }
.cp-panel h1 { margin: 0 0 .5rem; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; }
.cp-panel p { margin: .5rem 0 0; color: var(--cp-text-2); }
.cp-eyebrow { display: inline-flex; gap: .4rem; align-items: center; margin: 0 0 .6rem; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--cp-accent); }
.cp-callout { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--cp-line-strong); background: var(--cp-surface-2); color: var(--cp-text); }
.cp-callout > .cp-i { margin-top: .15rem; color: var(--cp-accent); }
.cp-callout p { margin: 0; color: var(--cp-text); }
.cp-callout--ok { border-color: #2F8F65; }
.cp-callout--ok > .cp-i { color: #4ADE9C; }
.cp-callout--warn { border-color: #8C6A1A; }
.cp-callout--warn > .cp-i { color: #FBBF24; }
.cp-field { display: grid; gap: .4rem; margin-top: 1.1rem; }
.cp-field label { font-weight: 600; font-size: .9375rem; }
.cp-field textarea { width: 100%; min-height: 6rem; padding: .7rem .8rem; border-radius: 11px; border: 1px solid #6B6F8E; background: var(--cp-bg); color: var(--cp-text); font: inherit; resize: vertical; }
.cp-hint { font-size: .8125rem; color: var(--cp-text-3); }
.cp-steps { margin: 1rem 0 0; padding-left: 1.25rem; color: var(--cp-text-2); }
.cp-steps li { margin: .3rem 0; }
.cp-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }

/* ================================================================ credited-author page panels (author_prompts.php) */
.cp-credit { text-align: left; margin: 1rem 0 0; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid #2E2D52; background: #16152E; color: #F4F4FB; display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.cp-credit p { margin: 0; color: #C8C7DE; font-size: .9375rem; line-height: 1.5; }
.cp-credit strong { color: #F4F4FB; }
.cp-credit__text { flex: 1 1 16rem; min-width: 0; }
.cp-credit__label { display: inline-block; margin-bottom: .2rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #A9A8C4; }
.cp-credit__links { display: flex; flex-wrap: wrap; gap: .5rem; }
.cp-credit__links a { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .9rem; border-radius: 10px; border: 1px solid #45447A; background: #1D1C3A; color: #F4F4FB; text-decoration: none; font-weight: 600; font-size: .875rem; }
.cp-credit__links a:hover { border-color: #C4B5FD; }
.cp-credit__links a:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 2px; }
.cp-credit--member { border-color: var(--cp-accent, #C4B5FD); background: linear-gradient(135deg, #1D1C3A, #16152E); }
.cp-credit--member .cp-credit__name { font-size: 1.0625rem; font-weight: 650; color: #F4F4FB; }
.cp-credit--member .cp-credit__handle { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--cp-accent, #C4B5FD); font-size: .875rem; }
.cp-credit .cp-i { width: 1.05em; height: 1.05em; flex: none; }
.cp-credit .cp-av { --cp-av-size: 52px; }
.cp-credit-kind { justify-content: center; flex-wrap: wrap; display: inline-flex; align-items: center; gap: .35rem; margin: .4rem 0 0; font-size: .8125rem; color: #C8C7DE; }
.cp-gone { max-width: 40rem; margin: 3rem auto; padding: 2rem 1.25rem; text-align: center; color: #F4F4FB; }
.cp-gone h1 { font-size: 1.75rem; margin: 0 0 .75rem; }
.cp-gone p { color: #C8C7DE; }
.cp-gone a { color: #C4B5FD; }
/* a listed row the member's profile does NOT count (a stranger's later row under a claimed name; critic r1 M2) */
.cp-rownote { display: flex; gap: .45rem; align-items: flex-start; margin: .6rem 0 0; padding: .45rem .7rem; border-radius: 9px;
  border: 1px solid #45447A; border-left: 3px solid #FBBF24; background: #1D1C3A; color: #E4E3F2; font-size: .8125rem; line-height: 1.45; }
.cp-rownote .cp-i { width: 1.05em; height: 1.05em; flex: none; margin-top: .12em; color: #FBBF24; }

/* Keyboard focus is never hidden under the site's floating Keeper launcher (WCAG 2.2 SC 2.4.11/2.4.12; critic r4 L5).
   Scrolling a focused control into view keeps it clear of the bottom 6rem where the launcher sits, and the profile ends
   with the same room, so its last controls (pager, report link) can always be scrolled above it.
   Proved by tests/profiles/visual.mjs check "focus" (every Tab stop inside the page, launcher live). */
html:has(.cp, .cp-gone) { scroll-padding-bottom: 6rem; }
.cp { padding-bottom: 5.5rem; }

/* ---------------------------------------------------------------- owner: own name not linked yet (integration r6, design r5 M1) */
.cp-ownerlink {
  display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap;
  margin: -0.25rem 0 1rem; padding: .8rem .95rem; border-radius: 12px;
  background: var(--cp-surface, rgba(255,255,255,.04)); border: 1px solid var(--cp-line-strong); color: var(--cp-text);
  font-size: .9375rem;
}
.cp-ownerlink p { margin: 0; flex: 1 1 16rem; overflow-wrap: anywhere; }
.cp-ownerlink > .cp-i { color: var(--cp-accent); flex: none; }
.cp-ownerlink--done { border-color: var(--cp-accent); }
.cp-ownerlink--done span { flex: 1 1 16rem; }
.cp-ownerlink__form { margin: 0; }
.cp-ownerlink:focus-visible, .cp-callout[data-cp-result]:focus-visible { outline: 2px solid #A78BFA; outline-offset: 2px; }
@media print { .cp-ownerlink { display: none !important; } }
