/* =========================================================================
   PubArx: International Researcher Communities (every class starts with rc-).
   Loaded before editorial.css, which flattens only the selectors it names, so
   the showpieces (emblem, membership card, hologram seal, community hero) use
   their own classes. The card and the seal are dark and iridescent in both
   themes; everything around them uses the theme tokens of pubarx.css.
   Palettes mirror App\Models\Community::PALETTES (deep, base, light, metal).
   No inline styles: app.js sets only custom properties with setProperty().
   ========================================================================= */

/* ------------------------------------------------------------------ palettes */

.rc-emblem, .rc-card, .rc-hero, .rc-tile, .rc-mini-card {
  --rc-deep: #0b1d36; --rc-base: #17365f; --rc-light: #4f7cc0; --rc-metal: #c8a44d;
}
.rc-palette-0 { --rc-deep: #0b1d36; --rc-base: #17365f; --rc-light: #4f7cc0; --rc-metal: #c8a44d; }
.rc-palette-1 { --rc-deep: #062a2c; --rc-base: #0f5257; --rc-light: #3fa7a3; --rc-metal: #d3b46a; }
.rc-palette-2 { --rc-deep: #16123d; --rc-base: #2f2a7a; --rc-light: #7b74d9; --rc-metal: #c9b37a; }
.rc-palette-3 { --rc-deep: #2c0a12; --rc-base: #6d1a2c; --rc-light: #c0566d; --rc-metal: #d8b26a; }
.rc-palette-4 { --rc-deep: #0d2416; --rc-base: #1f4d33; --rc-light: #5ea47a; --rc-metal: #cdb26b; }
.rc-palette-5 { --rc-deep: #141a22; --rc-base: #2f3b4c; --rc-light: #7d8ea6; --rc-metal: #c0c6cf; }
.rc-palette-6 { --rc-deep: #260f2b; --rc-base: #5a2463; --rc-light: #a76bb3; --rc-metal: #d6b77a; }
.rc-palette-7 { --rc-deep: #2a1608; --rc-base: #6b3b17; --rc-light: #c08a55; --rc-metal: #e0c08a; }

/* ------------------------------------------------------------------ emblem */

.rc-emblem { display: block; flex-shrink: 0; width: 56px; height: 56px; overflow: visible; }
.rc-emblem-sm { width: 32px; height: 32px; }
.rc-emblem-md { width: 56px; height: 56px; }
.rc-emblem-lg { width: 112px; height: 112px; }
.rc-emblem-xl { width: 160px; height: 160px; }
.rc-emblem .rc-stop-light { stop-color: var(--rc-light); }
.rc-emblem .rc-stop-base { stop-color: var(--rc-base); }
.rc-emblem .rc-stop-deep { stop-color: var(--rc-deep); }
.rc-emblem .rc-stop-metal-hi { stop-color: color-mix(in srgb, var(--rc-metal) 38%, #fff); }
.rc-emblem .rc-stop-metal { stop-color: var(--rc-metal); }
.rc-emblem .rc-stop-metal-lo { stop-color: color-mix(in srgb, var(--rc-metal) 62%, #000); }
.rc-emblem-ticks { stroke: var(--rc-metal); opacity: .55; }
.rc-emblem-ticks.is-major { opacity: .95; }
.rc-emblem-rosette ellipse { stroke: color-mix(in srgb, var(--rc-light) 55%, #fff); stroke-width: .45; opacity: .45; }
.rc-emblem-core { fill: var(--rc-deep); opacity: .78; }
.rc-emblem-abbr { fill: color-mix(in srgb, var(--rc-metal) 28%, #fff); font-family: var(--font-serif); font-weight: 600; letter-spacing: .02em; }
.rc-emblem-sm .rc-emblem-core { opacity: .35; }

/* ------------------------------------------------------------------ shared page pieces */

.rc-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--text);
}
.rc-section-head h2 { margin: 0; font-size: 1.2rem; }
.rc-title-row { display: flex; align-items: center; gap: 18px; }
.rc-title-row h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.rc-title-row .eyebrow { margin-bottom: 2px; }
.rc-title-row .lede { margin: 0; }
@media (max-width: 560px) { .rc-title-row { align-items: flex-start; gap: 14px; } .rc-title-row .rc-emblem-md { width: 44px; height: 44px; } }

/* "How membership works": numbered steps in the editorial style of the home page. */
.rc-how { margin-bottom: 40px; }
.rc-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: rc-step; }
.rc-steps li { padding: 16px 20px 4px 0; counter-increment: rc-step; }
.rc-steps li + li { padding-left: 20px; border-left: 1px solid var(--border); }
.rc-steps strong { display: block; margin-bottom: 4px; font-size: .98rem; }
.rc-steps strong::before { content: counter(rc-step) "."; margin-right: 6px; color: var(--accent); font-variant-numeric: tabular-nums; }
.rc-steps span { display: block; font-size: .9rem; color: var(--text-2); }
@media (max-width: 980px) {
  .rc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .rc-steps { grid-template-columns: 1fr; }
  .rc-steps li, .rc-steps li + li { padding-left: 0; border-left: 0; }
}

/* ------------------------------------------------------------------ communities index */

.rc-list { margin-bottom: 40px; }
.rc-list-note { margin: 12px 0 0; }
.rc-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px;
  list-style: none; margin: 18px 0 0; padding: 0;
}
.rc-tile {
  position: relative; display: flex; align-items: flex-start; gap: 16px; min-width: 0;
  padding: 18px 18px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.rc-tile::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--rc-base), var(--rc-light) 60%, var(--rc-metal));
}
.rc-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.rc-tile:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.rc-tile.is-member { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.rc-tile-body { min-width: 0; flex: 1; }
.rc-tile-title { margin: 2px 0 2px; font-size: 1.12rem; line-height: 1.3; }
.rc-tile-title a { color: var(--text); }
.rc-tile-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rc-tile-title a:hover { color: var(--link); text-decoration: none; }
.rc-tile-title a:focus-visible { outline: none; }
.rc-tile-name { margin: 0 0 10px; font-size: .82rem; line-height: 1.4; color: var(--text-3); }
.rc-tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: .85rem; color: var(--text-2); }

.rc-verify-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.rc-verify-cta > div { flex: 1 1 360px; min-width: 0; }
.rc-verify-cta h2 { margin: 0 0 4px; font-size: 1.15rem; }
.rc-verify-cta p { margin: 0; font-size: .93rem; color: var(--text-2); max-width: 68ch; }

/* ------------------------------------------------------------------ community page */

.rc-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 40px;
  padding: clamp(22px, 4vw, 40px); margin-bottom: 36px; border-radius: var(--radius-lg); color: #f4f6fa;
  background:
    radial-gradient(110% 120% at 0% 0%, color-mix(in srgb, var(--rc-light) 42%, transparent) 0%, transparent 55%),
    radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--rc-metal) 18%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, var(--rc-base) 0%, var(--rc-deep) 82%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../images/communities/guilloche.svg?v=2") right center / cover no-repeat;
  opacity: .22; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(100deg, transparent 8%, #000 62%); mask-image: linear-gradient(100deg, transparent 8%, #000 62%);
}
.rc-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: -1;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rc-metal) 85%, #fff), transparent);
  opacity: .55;
}
.rc-hero-main { display: flex; align-items: center; gap: 26px; min-width: 0; }
.rc-hero-emblem { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.rc-hero-text { min-width: 0; }
.rc-hero h1 { margin: 0; color: #fff; line-height: 1.1; }
.rc-hero-kicker {
  display: block; margin-bottom: 8px; font-family: var(--font-sans); font-size: .8rem; font-weight: 600; line-height: 1.4;
  letter-spacing: .11em; text-transform: uppercase; color: color-mix(in srgb, var(--rc-metal) 70%, #fff);
}
.rc-hero-field { display: block; font-size: clamp(1.85rem, 1.25rem + 2.4vw, 2.9rem); overflow-wrap: anywhere; text-wrap: balance; }
.rc-hero-field.is-long { font-size: clamp(1.6rem, 1.05rem + 1.7vw, 2.3rem); }
.rc-hero-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; list-style: none; margin: 14px 0 0; padding: 0; font-size: .9rem; color: rgba(255, 255, 255, .82); }
.rc-hero-facts a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 3px; }
.rc-hero-facts a:hover { text-decoration-color: #fff; }
.rc-hero a:focus-visible { outline-color: #fff; }
.rc-hero-open { display: inline-flex; align-items: center; gap: 8px; }
.rc-hero-cta { display: none; }
@media (max-width: 980px) {
  .rc-hero-cta {
    display: inline-flex; align-items: center; height: 36px; margin-top: 18px; padding: 0 16px; border-radius: var(--radius-sm);
    background: #fff; color: var(--rc-deep); font-size: .92rem; font-weight: 600; white-space: nowrap;
  }
  .rc-hero-cta:hover { background: color-mix(in srgb, #fff 85%, var(--rc-metal)); color: var(--rc-deep); text-decoration: none; }
}
.rc-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa3ad; }
.rc-hero-open.is-open .rc-hero-dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2), 0 0 8px rgba(74, 222, 128, .7); }
.rc-hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); margin: 0; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(5, 10, 20, .22);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.rc-hero-stats > div { padding: 12px 20px; }
.rc-hero-stats > div + div { border-left: 1px solid rgba(255, 255, 255, .14); }
.rc-hero-stats dt { font-size: .76rem; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.rc-hero-stats dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .rc-hero { grid-template-columns: 1fr; align-items: start; } .rc-hero-stats { justify-self: start; } }
@media (max-width: 560px) {
  .rc-hero-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rc-hero .rc-emblem-lg { width: 84px; height: 84px; }
  .rc-hero-stats { justify-self: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-hero-stats > div { padding: 10px 12px; }
  .rc-hero-stats dt { white-space: normal; line-height: 1.3; }
  .rc-hero-stats dd { font-size: 1.4rem; }
}

.rc-about { margin-bottom: 36px; }
.rc-about h2 { margin-bottom: 10px; font-size: 1.2rem; }
.rc-summary { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.65; color: var(--text); max-width: 68ch; }
.rc-benefits { display: grid; gap: 10px; list-style: none; margin: 0 0 16px; padding: 0; max-width: 72ch; }
.rc-benefits li { position: relative; padding-left: 22px; font-size: .95rem; color: var(--text-2); }
.rc-benefits li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; transform: rotate(45deg);
  background: var(--accent); border-radius: 1px;
}
.rc-benefits strong { color: var(--text); }

.rc-people {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0 22px;
  list-style: none; margin: 8px 0 0; padding: 0;
}
.rc-person { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--border); }
.rc-person > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.rc-person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.rc-person-name:hover { color: var(--link); text-decoration: none; }
.rc-person-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--text-3); }

/* The join panel: the requirements checklist, then the form, the blocker or the member's summary. */
.rc-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.rc-aside .card + .card { margin-top: 0; }
.rc-aside .btn-block { height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; line-height: 1.3; white-space: normal; text-align: center; }
.rc-join { border-top: 3px solid var(--brand); }
.rc-join-intro { margin: -2px 0 6px; }
.rc-reqs { list-style: none; margin: 0 0 16px; padding: 0; }
.rc-req { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.rc-req:first-child { border-top: 0; }
.rc-req-icon { width: 20px; height: 20px; margin-top: 1px; color: var(--success); }
.rc-req-mark { width: 18px; height: 18px; margin: 2px 1px 0; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.rc-req strong { display: block; font-size: .92rem; line-height: 1.35; }
.rc-req p { margin: 3px 0 0; font-size: .85rem; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.rc-req.is-met p { color: var(--text-3); }
.rc-req-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0; font-size: .86rem; }
.rc-join-form .field { margin-bottom: 14px; }
/* A tick box with its sentence beside it (pubarx.css makes ".field > label" a bold block). */
.rc-join-form .field > .check, .rc-notice .field > .check { display: flex; font-weight: 400; }
.rc-conduct-field .check { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .88rem; }
.rc-conduct-field.has-error .check { border-color: var(--danger); }
.rc-member-box { padding: 14px; border-radius: var(--radius-sm); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.rc-member-box p { margin: 0 0 12px; font-size: .9rem; }
.rc-member-box .mono { white-space: nowrap; }
/* Added by an administrator, code of conduct not accepted yet: the next step is on the membership page. */
.rc-member-box.is-pending { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 32%, transparent); }
.rc-member-todo { font-weight: 600; }
.rc-blocker { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.rc-blocker p { margin: 0; }
.rc-blocker p + p { margin-top: 6px; }
.rc-blocker.is-revoked { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.rc-join-later { margin: 0; }
.rc-link-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.rc-link-list li + li { margin-top: 6px; }

/* ------------------------------------------------------------------ members list */

.rc-roster { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.rc-roster li {
  display: grid; grid-template-columns: 92px 36px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.rc-roster-label { font-family: var(--font-mono); font-size: .86rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rc-roster-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.rc-roster-who a { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.rc-roster-who a:hover { color: var(--link); text-decoration: none; }
.rc-roster-who span { font-size: .84rem; color: var(--text-3); overflow-wrap: anywhere; }
.rc-roster-since { font-size: .84rem; color: var(--text-3); white-space: nowrap; }
@media (max-width: 600px) {
  .rc-roster li { grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; }
  .rc-roster-label, .rc-roster-since { grid-column: 2; }
  .rc-roster .avatar { grid-row: 1 / span 3; align-self: start; }
  .rc-roster-label { order: 3; font-size: .8rem; }
  .rc-roster-since { order: 4; font-size: .8rem; }
}

/* ------------------------------------------------------------------ code of conduct */

.rc-conduct-version { margin: 0; font-size: .95rem; color: var(--text-3); }
.rc-conduct-intro { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.65; }
.rc-conduct-list, .prose .rc-conduct-list { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: rc-rule; }
.prose .rc-conduct-list li + li { margin-top: 0; }
.rc-conduct-list li { position: relative; padding: 18px 0 4px 52px; border-top: 1px solid var(--border); counter-increment: rc-rule; }
.rc-conduct-list li::before {
  content: counter(rc-rule); position: absolute; left: 0; top: 18px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-serif); font-weight: 600; font-size: 1rem;
  color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
}
.prose .rc-conduct-list h2 { margin: 4px 0 6px; font-size: 1.15rem; }
.rc-conduct-list p { margin: 0 0 12px; }

/* ------------------------------------------------------------------ the membership card */

.rc-card-scene {
  --rc-rx: 0deg; --rc-ry: 0deg; --rc-angle: 210deg; --rc-sheen: 40%; --rc-px: 28%; --rc-py: 18%;
  container-type: inline-size;
  width: 100%; max-width: 440px; margin-inline: auto; perspective: 1500px;
}
.rc-card-tilt {
  transform: rotateX(var(--rc-rx)) rotateY(var(--rc-ry)); transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.rc-card-scene.is-tracking .rc-card-tilt { transition: transform .1s linear; }
.rc-card-flipper { display: grid; gap: 18px; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }
.rc-card-scene.is-ready .rc-card-flipper { gap: 0; }
.rc-card-scene.is-ready .rc-card { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.rc-card-scene.is-ready .rc-card-back { transform: rotateY(180deg); }
.rc-card-scene.is-flipped .rc-card-flipper { transform: rotateY(180deg); }

.rc-card {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 85.6 / 54;
  border-radius: 16px; border-radius: 3.65cqw; color: #f4f6fa; font-family: var(--font-sans); line-height: 1.25;
  background:
    radial-gradient(120% 95% at 6% 0%, color-mix(in srgb, var(--rc-light) 58%, transparent) 0%, transparent 56%),
    radial-gradient(85% 80% at 100% 100%, color-mix(in srgb, var(--rc-metal) 24%, transparent) 0%, transparent 62%),
    linear-gradient(135deg, var(--rc-base) 0%, var(--rc-deep) 80%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 12px 28px -10px rgba(8, 15, 30, .55), 0 30px 60px -28px rgba(8, 15, 30, .5);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-card::selection, .rc-card *::selection { background: rgba(255, 255, 255, .3); }
.rc-card-guilloche {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../images/communities/guilloche.svg?v=2") center / cover no-repeat;
  opacity: .22; mix-blend-mode: screen;
}
.rc-card-back .rc-card-guilloche { transform: scaleX(-1); opacity: .16; }
/* A metallic hairline frame: a gradient border cut out with a mask. */
.rc-card-frame {
  position: absolute; inset: 2.6cqw; z-index: 1; pointer-events: none; border-radius: 2.1cqw; border: 1px solid transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc-metal) 30%, #fff), var(--rc-metal) 28%,
    color-mix(in srgb, var(--rc-metal) 55%, #000) 52%, color-mix(in srgb, var(--rc-metal) 40%, #fff) 78%, var(--rc-metal)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .75;
}
/* The holographic foil patch with an embossed PX monogram. */
.rc-foil {
  position: absolute; top: 6.4cqw; right: 6.4cqw; z-index: 2; display: grid; place-items: center;
  width: 64px; width: 14cqw; aspect-ratio: 1.22; border-radius: 1.7cqw; overflow: hidden;
  background:
    linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .85) 47%, transparent 61%) var(--rc-sheen) 0 / 300% 100% no-repeat,
    repeating-linear-gradient(120deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 45%),
    conic-gradient(from var(--rc-angle) at 50% 55%, #ffd8a8, #fd7a97, #c88cf7, #74c4ff, #8ef0c6, #fff3a0, #ffd8a8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 0 8px rgba(255, 255, 255, .35), 0 1px 3px rgba(0, 0, 0, .4);
  animation: rc-foil-shift 12s linear infinite;
}
.rc-card-scene.is-tracking .rc-foil { animation: none; }
.rc-foil-mono {
  font-family: var(--font-serif); font-size: 26px; font-size: 5.6cqw; font-weight: 700; letter-spacing: .02em; line-height: 1;
  color: rgba(255, 255, 255, .42); text-shadow: 0 -1px 0 rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .6); mix-blend-mode: overlay;
}
@keyframes rc-foil-shift { to { filter: hue-rotate(360deg); } }
/* Light that follows the pointer (static without JavaScript). */
.rc-card-glare {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(farthest-corner circle at var(--rc-px) var(--rc-py), rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .07) 26%, transparent 52%);
  mix-blend-mode: soft-light;
}

/* Front. */
.rc-card-front { display: grid; grid-template-rows: auto 1fr auto; padding: 27px 28px 22px; padding: 6.2cqw 6.6cqw 5.2cqw; }
.rc-card-head, .rc-card-holder, .rc-card-meta, .rc-card-back-body { position: relative; z-index: 4; }
.rc-card-head { display: flex; flex-direction: column; min-width: 0; padding-right: 19cqw; }
.rc-wordmark { font-family: var(--font-serif); font-size: 20px; font-size: 4.7cqw; font-weight: 600; line-height: 1; letter-spacing: -.01em; color: #fff; }
.rc-wordmark span { color: #f4a8b4; }
.rc-card-kicker {
  margin-top: 2.7cqw; font-size: max(7px, 2.05cqw); font-weight: 650; letter-spacing: .16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--rc-metal) 76%, #fff);
}
.rc-card-field {
  margin-top: .8cqw; font-family: var(--font-serif); font-size: 24px; font-size: 5.6cqw; font-weight: 600; line-height: 1.12; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
}
.rc-card-holder { display: flex; align-items: center; gap: 3.4cqw; align-self: end; min-width: 0; margin-bottom: 3.2cqw; }
.rc-card-holder .avatar {
  width: 58px; height: 58px; width: 13.4cqw; height: 13.4cqw; font-size: 4.6cqw; flex-shrink: 0; border: 0;
  background: color-mix(in srgb, var(--rc-light) 40%, var(--rc-deep)); color: #fff; font-family: var(--font-sans);
  box-shadow: 0 0 0 .55cqw color-mix(in srgb, var(--rc-metal) 75%, transparent), 0 3px 8px rgba(0, 0, 0, .4);
}
.rc-card-who { display: flex; flex-direction: column; gap: .9cqw; min-width: 0; }
.rc-card-name {
  font-size: 19px; font-size: 4.35cqw; font-weight: 650; line-height: 1.15; color: #fff; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-card-orcid { display: inline-flex; align-items: center; gap: 1.3cqw; font-family: var(--font-mono); font-size: max(9px, 2.8cqw); letter-spacing: .03em; color: rgba(255, 255, 255, .85); }
.rc-card-orcid .rc-orcid-mark { width: 3.5cqw; height: 3.5cqw; min-width: 11px; min-height: 11px; }
.rc-card-meta {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 5.4cqw; margin: 0; padding-top: 2.6cqw;
  border-top: 1px solid color-mix(in srgb, var(--rc-metal) 38%, transparent);
}
.rc-card-meta > div { min-width: 0; }
.rc-card-meta dt { font-size: max(6.5px, 1.85cqw); font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.rc-card-meta dd { margin: .6cqw 0 0; font-size: max(9.5px, 3.1cqw); font-weight: 600; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-card-label { font-family: var(--font-mono); letter-spacing: .05em; }
.rc-card-status { justify-self: end; text-align: right; }
.rc-dot {
  display: inline-block; width: 1.9cqw; height: 1.9cqw; min-width: 6px; min-height: 6px; margin-right: 1.3cqw; border-radius: 50%; vertical-align: .08em;
  background: #4ade80; box-shadow: 0 0 0 .5cqw rgba(74, 222, 128, .25), 0 0 1.8cqw rgba(74, 222, 128, .85);
}

/* Back. */
.rc-card-back { display: flex; flex-direction: column; padding: 0 6.6cqw 7cqw; }
.rc-card-stripe {
  position: relative; z-index: 2; display: block; flex: 0 0 auto; height: 10.5cqw; margin: 6.2cqw -6.6cqw 4.4cqw;
  background:
    linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .75) 46%, transparent 62%) var(--rc-sheen) 0 / 300% 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, #f6d48f, #fd8ca0, #d39bf6, #8fc3ff, #8ef0c6, #f7f29a, #f6d48f) calc(100% - var(--rc-sheen)) 0 / 200% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .25);
  opacity: .92; animation: rc-foil-shift 16s linear infinite;
}
.rc-card-scene.is-tracking .rc-card-stripe { animation: none; }
.rc-card-back-body { display: flex; align-items: center; gap: 4.6cqw; flex: 1; min-height: 0; padding-bottom: 1.5cqw; }
.rc-qr {
  display: block; flex: 0 0 auto; width: 25cqw; aspect-ratio: 1; overflow: hidden; border-radius: 1.8cqw; background: #fff;
  box-shadow: 0 0 0 .7cqw rgba(255, 255, 255, .16), 0 3px 10px rgba(0, 0, 0, .4);
}
.rc-qr svg { display: block; width: 100%; height: 100%; }
.rc-qr:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rc-card-back-text { display: flex; flex-direction: column; gap: .9cqw; min-width: 0; }
.rc-card-back .rc-card-kicker { margin-top: 0; }
.rc-card-code { font-family: var(--font-mono); font-size: max(10px, 3.45cqw); font-weight: 600; letter-spacing: .03em; color: #fff; white-space: nowrap; }
.rc-card-verify { font-size: max(8.5px, 2.65cqw); color: rgba(255, 255, 255, .88); overflow-wrap: anywhere; }
.rc-card-seal { font-family: var(--font-mono); font-size: max(8px, 2.3cqw); letter-spacing: .03em; color: color-mix(in srgb, var(--rc-metal) 72%, #fff); }
.rc-card-note { margin-top: 1.2cqw; font-size: max(7.5px, 2.1cqw); line-height: 1.38; color: rgba(255, 255, 255, .66); }
.rc-card-micro {
  position: absolute; left: 6.6cqw; right: 6.6cqw; bottom: 2.6cqw; z-index: 4; overflow: hidden; white-space: nowrap;
  font-size: max(4px, 1.2cqw); letter-spacing: .14em; color: rgba(255, 255, 255, .42);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* Where the card sits on the membership page. */
.rc-stage {
  padding: clamp(22px, 5vw, 46px) clamp(14px, 4vw, 40px) clamp(16px, 3vw, 24px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: radial-gradient(80% 90% at 50% 0%, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface-2) 75%);
}
.rc-card-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 18px; min-height: 30px; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
/* Under the card, in place of the downloads, when the PDFs cannot print the certificate. */
.rc-stage + .rc-notice { margin-top: 22px; }
.rc-share { margin-top: 22px; }
.rc-share .copy-field { flex-wrap: wrap; }
.rc-share .copy-field input { flex: 1 1 260px; font-size: .88rem; color: var(--text-2); }

/* ------------------------------------------------------------------ the membership page */

.rc-membership { margin-bottom: 32px; }
.rc-notice { align-items: flex-start; }
.rc-notice h2 { margin: 0 0 4px; font-family: var(--font-sans); font-size: 1rem; font-weight: 650; }
.rc-notice p { margin: 0 0 10px; }
.rc-notice form { margin: 0; }
.rc-notice .field { margin-bottom: 10px; }
/* The ORCID step under the code of conduct form of a member added by an administrator. */
.rc-notice-orcid { margin-top: 14px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--info) 24%, transparent); }
.rc-details .kv { grid-template-columns: 100px minmax(0, 1fr); gap: 9px 12px; }
.rc-details .kv .mono { font-size: .84rem; }
.rc-status-line { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.rc-status-line > div { display: flex; flex-direction: column; min-width: 0; }
.rc-status-line strong { font-size: .98rem; }
.rc-status-line span { font-size: .84rem; color: var(--text-2); }
.rc-code-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
/* The 23-character code fits the 320px sidebar on one line. */
.rc-code-cell .mono { white-space: nowrap; }
.rc-details .rc-code-cell .mono { font-size: .8rem; }
.rc-earlier { margin-top: 16px; }
.rc-earlier > summary { display: block; padding: 14px 22px; cursor: pointer; font-size: .92rem; font-weight: 600; list-style: none; }
.rc-earlier > summary::-webkit-details-marker { display: none; }
.rc-earlier > summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--text-3); transition: transform .15s; }
.rc-earlier[open] > summary::before { transform: rotate(90deg); }
.rc-earlier ul { list-style: none; margin: 0; padding: 0 22px 14px; font-size: .85rem; }
.rc-earlier li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px dashed var(--border); }
.rc-earlier li span { color: var(--text-3); }
.rc-leave { max-width: 760px; }
.rc-ended { max-width: 760px; }
.rc-ended h2 { margin: 8px 0 10px; font-size: 1.25rem; }
.rc-ended-status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9rem; color: var(--text-2); }
.rc-ended.is-revoked { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

/* ------------------------------------------------------------------ the hologram seal */

.rc-seal {
  --rc-seal: 168px; position: relative; display: inline-block; flex-shrink: 0; width: var(--rc-seal); height: var(--rc-seal); border-radius: 50%;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-seal-sm { --rc-seal: 44px; }
.rc-seal-md { --rc-seal: 96px; }
.rc-seal-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .22) 0 1.2deg, transparent 1.2deg 4deg),
    conic-gradient(from var(--rc-angle, 200deg), #f9d29b, #f7899f, #c38bf5, #7cc4fa, #86f0c8, #f4ef98, #f9d29b);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 26px -12px rgba(20, 30, 60, .55), inset 0 0 0 1px rgba(255, 255, 255, .55);
  animation: rc-seal-spin 30s linear infinite;
}
@keyframes rc-seal-spin { to { transform: rotate(360deg); } }
.rc-seal-disc {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #eef1f5 32%, #d3d9e1 68%, #b7c0cb 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 3px 8px rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .1);
}
.rc-seal-art { position: absolute; inset: 8%; width: 84%; height: 84%; overflow: visible; }
.rc-seal-lines { stroke: #6f81a1; stroke-width: .55; opacity: .5; }
.rc-seal.is-valid .rc-seal-lines { stroke: #5f74a6; opacity: .62; }
.rc-seal-micro { font-family: var(--font-sans); font-size: 8.6px; font-weight: 700; letter-spacing: 1.3px; fill: #56647a; }
.rc-seal-core { fill: #8a929e; }
.rc-seal.is-valid .rc-seal-core { fill: #1b7347; }
.rc-seal-symbol { stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.rc-seal-sm .rc-seal-symbol { stroke-width: 11; }
.rc-seal::after {
  content: ""; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, .7) 50%, transparent 66%) var(--rc-sheen, 40%) 0 / 280% 100% no-repeat;
  mix-blend-mode: soft-light;
}
.rc-seal.is-muted .rc-seal-ring {
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .25) 0 1.2deg, transparent 1.2deg 4deg),
    conic-gradient(from var(--rc-angle, 200deg), #dfe3e8, #aab2bc, #eef0f3, #98a1ac, #dfe3e8);
  animation: none;
}

/* ------------------------------------------------------------------ verification */

.rc-verify-card { margin-bottom: 28px; }
.rc-verify-form .field-label { margin-bottom: 8px; }
.rc-verify-row { display: flex; gap: 8px; }
.rc-code-input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase; }
.rc-code-input::placeholder { text-transform: none; letter-spacing: .02em; }
.rc-verify-row .btn { flex-shrink: 0; height: auto; min-height: 42px; padding: 0 22px; }
.rc-verify-error { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; color: var(--text);
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.rc-verify-form .help { margin: 8px 0 0; font-size: .84rem; color: var(--text-3); }
.rc-verify-help h2 { font-size: 1.1rem; margin-bottom: 10px; }
.rc-status-list { display: grid; gap: 12px; list-style: none; margin: 0 0 14px; padding: 0; }
.rc-status-list li { display: flex; align-items: center; gap: 14px; font-size: .93rem; color: var(--text-2); }
.rc-status-list strong { color: var(--text); }
.rc-status-list .rc-seal-ring { animation: none; }

.rc-verdict {
  --rc-tone: var(--neutral); --rc-tone-soft: var(--neutral-soft);
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px 32px;
  padding: clamp(20px, 4vw, 32px); margin-bottom: 22px; border: 1px solid var(--border); border-top: 4px solid var(--rc-tone);
  border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--rc-tone-soft), var(--surface) 78%);
}
.rc-verdict.is-success { --rc-tone: var(--success); --rc-tone-soft: var(--success-soft); }
.rc-verdict.is-warning { --rc-tone: var(--warning); --rc-tone-soft: var(--warning-soft); }
.rc-verdict.is-danger { --rc-tone: var(--danger); --rc-tone-soft: var(--danger-soft); }
.rc-verdict-seal { display: grid; place-items: center; }
.rc-verdict-text { min-width: 0; }
.rc-verdict-code { margin: 0 0 4px; font-size: .88rem; color: var(--text-3); }
.rc-verdict-code .mono { color: var(--text-2); overflow-wrap: anywhere; }
.rc-verdict h1 { margin: 0 0 8px; color: var(--rc-tone); }
.rc-verdict.is-neutral h1 { color: var(--text); }
.rc-verdict-message { margin: 0 0 12px; font-size: 1.06rem; line-height: 1.55; color: var(--text); max-width: 60ch; }
.rc-verdict-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: .84rem; color: var(--text-3); }
@media (max-width: 640px) {
  .rc-verdict { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .rc-verdict .rc-seal-lg { --rc-seal: 136px; }
  .rc-verdict-meta { justify-content: center; }
}
.rc-holder { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rc-holder > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.rc-holder strong { font-size: 1.05rem; }
.rc-holder span { font-size: .88rem; color: var(--text-2); }
.rc-holder a { margin-top: 2px; font-size: .9rem; }
.rc-facts { margin-bottom: 28px; }
@media (min-width: 521px) { .rc-facts .kv { grid-template-columns: 180px minmax(0, 1fr); } }
.rc-orcid-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .92em; }
.rc-orcid-link svg { width: 16px; height: 16px; }
.rc-verify-again { padding-top: 18px; border-top: 1px solid var(--border); }
.rc-verify-again h2 { font-size: 1.1rem; }

/* ------------------------------------------------------------------ researcher panel */

.rc-orcid-alert p { margin: 0 0 10px; }
.rc-orcid-alert form { margin: 0; }
.rc-dash-section { margin-bottom: 28px; }
.rc-dash-section .dash-section-title { margin-top: 8px; }
.rc-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.rc-mini { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.rc-mini-card {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 16px; min-height: 104px; padding: 18px 20px; color: #fff;
  background:
    radial-gradient(110% 120% at 0% 0%, color-mix(in srgb, var(--rc-light) 48%, transparent) 0%, transparent 58%),
    linear-gradient(135deg, var(--rc-base), var(--rc-deep) 85%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-mini-guilloche { position: absolute; inset: 0; z-index: -1; background: url("../images/communities/guilloche.svg?v=2") right center / cover no-repeat; opacity: .2; mix-blend-mode: screen; }
.rc-mini-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-mini-kicker { font-size: .66rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--rc-metal) 72%, #fff); }
.rc-mini-field { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.rc-mini-field:hover { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); }
.rc-mini-field:focus-visible { outline-color: #fff; }
.rc-mini-meta { font-size: .84rem; color: rgba(255, 255, 255, .82); }
.rc-mini-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 20px; font-size: .88rem; }
/* What a member has to do before they can have a card and certificate: the badge, then the sentence flowing after it. */
.rc-mini-todo { margin: 0; padding: 14px 20px 0; font-size: .88rem; line-height: 1.6; }
.rc-mini-todo .badge { margin-right: 4px; vertical-align: 1px; }
.rc-dash-row { display: flex; align-items: center; gap: 12px; }
.rc-dash-row > div { min-width: 0; }

/* ------------------------------------------------------------------ dark theme */

@media (prefers-color-scheme: dark) {
  .rc-card { box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 14px 34px -12px rgba(0, 0, 0, .8), 0 30px 70px -30px rgba(0, 0, 0, .8); }
  .rc-stage { background: radial-gradient(80% 90% at 50% 0%, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface-2) 75%); }
  .rc-hero { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
  .rc-seal-ring { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px -10px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .5); }
}

/* ------------------------------------------------------------------ motion, print */

@media (prefers-reduced-motion: reduce) {
  .rc-card-tilt { transform: none !important; }
}

@media print {
  .rc-card-scene { max-width: 86mm; perspective: none; }
  .rc-card-tilt, .rc-card-flipper, .rc-card-scene.is-ready .rc-card-back { transform: none !important; transition: none; }
  .rc-card-scene .rc-card-flipper, .rc-card-scene.is-ready .rc-card-flipper { gap: 6mm; }
  .rc-open-note, .rc-details [data-copy] { display: none !important; }
  .rc-card-scene.is-ready .rc-card { grid-area: auto; -webkit-backface-visibility: visible; backface-visibility: visible; }
  .rc-card, .rc-hero, .rc-seal-ring { box-shadow: none; }
  .rc-card { break-inside: avoid; }
  .rc-foil, .rc-card-stripe, .rc-seal-ring { animation: none; }
  .rc-stage { padding: 0; border: 0; background: none; }
  .rc-card-controls, .rc-actions, .rc-share, .rc-leave, .rc-notice form, .rc-join form, .rc-verify-again, .rc-verify-card, .rc-side-links { display: none !important; }
}
