@layer legacy {
.sheet, .views, .view, .screen, .site { all: unset; display: block; }
body { margin: 0; }

/* ---- Frame ---- */
.cp { --left-w: 240px; --side-w: 300px; --stage-pad: 24px;
  box-sizing: border-box; width: 100%; max-width: 1640px; margin: 0 auto; padding: 22px var(--pad) 72px;
  display: flex; flex-direction: column; gap: 20px; }
.cp [hidden], .cp-state[hidden] { display: none !important; }
.cp-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.8125rem; color: var(--text-dim); }
.cp-crumb a { color: var(--text-muted); transition: color .15s; }
.cp-crumb a:hover { color: var(--amber-bright); }
.cp-crumb span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cp-state { padding: 96px 0 120px; text-align: center; color: var(--text-muted); }
.cp-state h1 { margin: 0 0 12px; font-size: 1.75rem; font-weight: 700; color: var(--text); }
.cp-state p { margin: 0 auto 8px; max-width: 480px; font-size: 0.9375rem; line-height: 1.6; }
.cp-state a { color: var(--amber); }
.cp-status { padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-left: 2px solid var(--amber); font-size: 0.84375rem; line-height: 1.55; color: var(--text-muted); }

.cp-label { margin: 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.cp-n { flex: none; min-width: 24px; height: 22px; padding: 0 7px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); background: var(--card-hover); font-size: 0.6875rem; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cp-rav { position: relative; flex: none; box-sizing: border-box; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--bg); box-shadow: 0 0 0 1px var(--border-strong); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.cp-rav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-rav svg { width: 60%; height: 60%; color: var(--amber); }

/* ======================================================================
   HERO: the community's colour, the banner fading in from the right,
   the coin, the name; the ledger and the actions along the foot
   ====================================================================== */
/* not overflow: hidden, or the Socials and Share menus in the foot would be
   cut off; z-index keeps those menus over the stage below */
.cp-hero { position: relative; z-index: 2; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 400px;
  background: var(--tint, var(--card)); border: 1px solid rgba(var(--bg-rgb), .6); transition: background-color .4s; }
.cp-banner { position: absolute; top: 0; right: 0; z-index: -1; display: block; height: 100%; width: auto; max-width: 72%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.12) 60px, rgba(0,0,0,.6) 200px, #000 55%);
          mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.12) 60px, rgba(0,0,0,.6) 200px, #000 55%);
  opacity: 0; transition: opacity .5s ease; }
.cp-banner.is-in { opacity: 1; }
/* a wide banner reaches under the name: a pool of the colour keeps it readable */
.cp-hero.has-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 90% at 0% 100%, var(--tint-a, rgba(24,35,57,.85)) 0%, transparent 100%); }
.cp-mark { position: absolute; z-index: -1; top: 42%; right: 6%; width: 300px; height: 300px; translate: 0 -50%; color: rgba(255,255,255,.05); }
.cp-hero.has-banner .cp-mark { display: none; }

.cp-id { display: flex; align-items: center; gap: 32px; min-width: 0; max-width: min(860px, 64%); padding: 40px 40px 32px; }
.cp-who { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cp-name { display: block; margin: 0; font-size: 2.75rem; line-height: 1.08; font-weight: 700; letter-spacing: -.015em; color: var(--text);
  overflow-wrap: anywhere; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.cp-tagline { margin: 0; font-size: 1rem; line-height: 1.5; color: #d3d9e3; text-shadow: 0 1px 10px rgba(0,0,0,.5);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cp-tag { padding: 5px 10px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #dde2ea;
  background: rgba(5,8,14,.36); border: 1px solid rgba(255,255,255,.16); }

/* ---- The coin: the emblem inside a rim engraved with the name and year ---- */
.cp-coin { position: relative; flex: none; width: 196px; height: 196px; display: grid; place-items: center; }
.cp-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--amber); }
.cp-ring .face { fill: rgba(var(--bg-rgb), .72); }
.cp-ring .rim { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-opacity: .8; }
.cp-ring .rim-in { fill: none; stroke: currentColor; stroke-width: 1; stroke-opacity: .4; }
.cp-ring text { fill: var(--amber-bright); font-family: var(--font-ui, inherit); font-weight: 600; }
.cp-coin.is-dim .cp-ring { color: var(--text-dim); }
.cp-coin.is-dim .cp-ring text { fill: var(--text-muted); }
.cp-emblem { position: relative; z-index: 1; width: 136px; height: 136px; }
.cp-emblem > .pf-initials { color: var(--amber); }
.cp-emblem.has-img > .pf-initials { display: none !important; }
.cp-emblem > .pf-initials svg { width: 52%; height: 52%; }

/* loading: the hero's shape with nothing in it yet */
.cp-hero.is-skel .cp-who { gap: 12px; }
.cp-skel-line { display: block; height: 12px; width: 240px; max-width: 60vw; background: var(--border); }
.cp-skel-line.is-name { height: 30px; width: 360px; }
.cp-hero.is-skel .cp-emblem > .pf-initials svg { opacity: .25; }
.cp-hero.is-skel .cp-ring text { display: none; }

/* ---- The foot: the ledger on the left, the actions on the right ---- */
.cp-band { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 36px;
  padding: 16px 24px 16px 40px; background: rgba(var(--bg-rgb), .66); border-top: 1px solid rgba(255,255,255,.08); }
.cp-ledger { display: flex; min-width: 0; }
.cp-ledger > * { display: flex; flex-direction: column; gap: 5px; padding: 0 24px; border-left: 1px solid rgba(255,255,255,.1); color: inherit; text-decoration: none; }
.cp-ledger > :first-child { padding-left: 0; border-left: 0; }
.cp-ledger b { font-size: 1.375rem; font-weight: 600; line-height: 1.1; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .15s; }
.cp-ledger i { font-style: normal; font-size: 0.65625rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.cp-ledger a:hover b, .cp-ledger a:focus-visible b { color: var(--amber-bright); }
.cp-ledger a:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: 4px; }
.cp-ledger .is-live b { color: #7fe0a4; }

.cp-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cp-acts .b-case { box-sizing: border-box; height: 42px; padding: 0 16px; gap: 9px; white-space: nowrap; }
.cp-acts .b-icon { box-sizing: border-box; width: 42px; height: 42px; }
.cp-acts .b svg { width: 16px; height: 16px; flex: none; }
.cp-acts .b .chev { width: 10px; height: 10px; margin-left: 2px; opacity: .7; transition: transform .2s; }
.cp-acts .b .ext { width: 11px; height: 11px; opacity: .6; }
.cp-join { padding: 0 20px !important; }
.cp-site-host { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.cp-drop { position: relative; }
.cp-drop.is-open > .b .chev { transform: rotate(180deg); }
.cp-drop.is-open > .b-quiet { border-color: var(--border-strong); background: var(--card); }
.cp-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: none; flex-direction: column; box-sizing: border-box;
  min-width: 250px; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 14px 34px rgba(0,0,0,.55); text-align: left;
  width: min-content; /* a popover (ui/menu.js), sized in the window now, not in its narrow .cp-drop: min-content keeps the width it had there */ }
.cp-menu:popover-open { display: flex; } /* a popover (ui/menu.js); closed, components/site.css hides it */
.cp-menu a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 0.875rem; color: var(--text); white-space: nowrap; }
.cp-menu a:hover, .cp-menu a:focus-visible { background: var(--card-hover); outline: none; }
.cp-menu a:hover::before, .cp-menu a:focus-visible::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--amber); }
.cp-menu .h { margin-left: auto; max-width: 140px; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; color: var(--text-dim); }
.cp-share-menu { width: 300px; padding: 16px; gap: 12px; }
.cp-share-menu .charon-qr__well svg { display: block; width: 100%; height: 100%; }
.cp-share-menu .ship-share-qr-fallback { padding: 18px 8px; }

/* ======================================================================
   BODY: the rail, the stage, the panels
   ====================================================================== */
.cp-body { display: grid; grid-template-columns: var(--left-w) minmax(0, 1fr) var(--side-w); grid-template-areas: "left mid side";
  column-gap: 28px; align-items: start; }

/* ---- Left: at a glance, the builders ---- */
.cp-left { grid-area: left; min-width: 0; display: flex; flex-direction: column; gap: 30px; padding-top: var(--stage-pad); }
.cp-glance { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cp-glance > .cp-label { padding-left: 12px; }
.cp-facts { margin: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 14px; }
.cp-facts > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-facts dt { font-size: 0.65625rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.cp-facts dd { margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }

.cp-roster { display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin-top: 90px; }
.cp-roster > .cp-label { padding-left: 12px; }
.cp-roster > .cp-label.is-sub { margin-top: 14px; }
.cp-rlist, .cp-alist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cp-rlist > li, .cp-alist > li { display: flex; min-width: 0; }
.cp-rb { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 6px 10px 6px 12px;
  border: 0; background: none; cursor: pointer; text-align: left; font: 500 0.875rem/1.25 var(--font-ui, inherit); color: var(--text); transition: background-color .15s; }
.cp-rb:hover { background: var(--card); }
.cp-rb.is-on { background: rgba(var(--amber-rgb), .08); font-weight: 600; }
.cp-rb.is-on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--gold-line); }
.cp-rb.is-on .cp-n { color: var(--text); border-color: rgba(var(--amber-rgb), .5); }
.cp-rb.is-on .cp-rav { box-shadow: 0 0 0 1px rgba(var(--amber-rgb), .7); }
.cp-rb:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: -2px; }
.cp-rname { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.cp-rname > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-rname .sc-ver { width: 12px; height: 12px; }
.cp-alist a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 38px; box-sizing: border-box; padding: 4px 12px;
  font-size: 0.84375rem; color: var(--text-muted); text-decoration: none; transition: background-color .15s, color .15s; }
.cp-alist a:hover { background: var(--card); color: var(--text); }
.cp-alist a:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: -2px; }
.cp-alist a > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-alist .cp-rav { width: 24px; height: 24px; font-size: 0.6875rem; }

/* ---- Middle: the stage ---- */
.cp-mid { grid-area: mid; min-width: 0; box-sizing: border-box; padding: var(--stage-pad) 28px 36px;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg)); border: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: 44px; container: stage / inline-size; }
.cp-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: 90px; }
.cp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; min-height: 40px; }
.cp-h { margin: 0; font-size: 1.125rem; font-weight: 700; letter-spacing: -.005em; line-height: 1.1; color: var(--text); }
.cp-bar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* Who we are: folded to the opening lines; Read more opens it */
.cp-about { --closed: 136px; }
.cp-about-toggle { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 2px 0 12px; cursor: pointer; }
.cp-about-toggle:hover span, .cp-about-toggle:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
.cp-about-toggle svg { width: 10px; height: 10px; transition: transform .25s; }
.cp-about.is-open .cp-about-toggle svg { transform: rotate(180deg); }
.cp-bio { min-width: 0; max-width: 780px; overflow: hidden; transition: max-height .35s ease; }
.cp-bio p { margin: 0 0 14px; font-size: 0.9375rem; line-height: 1.7; color: var(--text-soft); }
.cp-bio p:first-child { font-size: 1.0625rem; color: var(--text); }
.cp-bio p:last-child { margin-bottom: 0; }
.cp-about.can-fold:not(.is-open) .cp-bio { max-height: var(--closed);
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }

/* ---- The fleet ---- */
.cp-sort { height: 40px; cursor: pointer; }
.cp-sort select { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; outline: none; }
.cp-sort select option { background: var(--surface); color: var(--text); }
.cp-by { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.cp-by-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; max-width: 260px; box-sizing: border-box; padding: 0 4px 0 6px;
  border: 1px solid rgba(var(--amber-rgb), .55); background: rgba(var(--amber-rgb), .07); font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.cp-by-chip .cp-rav { width: 22px; height: 22px; font-size: 0.625rem; }
.cp-by-chip > span:not(.cp-rav) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-by-x { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text-muted); }
.cp-by-x:hover, .cp-by-x:focus-visible { color: var(--amber-bright); outline: none; }
.cp-by-x svg { width: 10px; height: 10px; }
.cp-by .b-link { font-size: 0.6875rem; white-space: nowrap; }

/* the builder filter as chips, once the rail is a bar (under 1280px) */
.cp-chips { display: none; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
.cp-chips::-webkit-scrollbar { display: none; }
.cp-chips .cp-rb { flex: none; min-height: 38px; padding: 0 10px 0 8px; border: 1px solid var(--border); }
.cp-chips .cp-rb:hover { background: none; border-color: var(--border-strong); }
.cp-chips .cp-rb.is-on { border-image: var(--gold-line) 1; background: rgba(var(--amber-rgb), .07); }
.cp-chips .cp-rb.is-on::before { display: none; }
.cp-chips .cp-rav { width: 24px; height: 24px; font-size: 0.6875rem; }
.cp-chips .cp-n { height: 20px; min-width: 22px; font-size: 0.65625rem; }

/* the flagship: the ship the most pilots have taken, as a wide card with
   the amber corners of a feature (the Tool Bazaar's Instruments cover) */
.cp-flag { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); min-width: 0;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text); text-decoration: none;
  transition: border-color .18s, background-color .18s; }
.cp-flag::before, .cp-flag::after { content: ""; position: absolute; z-index: 2; width: 18px; height: 18px; border: 0 solid var(--amber); pointer-events: none; }
.cp-flag::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.cp-flag::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.cp-flag:hover { border-color: var(--amber); background: var(--card-hover); }
.cp-flag:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: 3px; }
.cp-flag-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); display: grid; place-items: center; color: rgba(var(--amber-rgb), .25); }
.cp-flag-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.cp-flag-pic > svg { width: 56px; height: 56px; }
.cp-flag:hover .cp-flag-pic img { transform: scale(1.03); }
.cp-flag-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 24px 26px; }
.cp-flag-k { display: inline-flex; align-items: center; gap: 8px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--amber); }
.cp-flag-k svg { width: 14px; height: 14px; }
.cp-flag-name { margin: 0; font-size: 1.625rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.cp-flag-by { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84375rem; color: var(--text-muted); }
.cp-flag-by b { font-weight: 600; color: var(--amber); }
.cp-flag-desc { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.55; color: var(--text-soft);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cp-flag-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; width: 100%; box-sizing: border-box; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.cp-flag-stats > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-flag-stats b { display: inline-flex; align-items: center; gap: 6px; font-size: 1.0625rem; font-weight: 600; line-height: 1.1; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-flag-stats b .coin { width: 12px; height: 12px; }
.cp-flag-stats i { font-style: normal; font-size: 0.625rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.cp-flag-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.71875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-bright); }
.cp-flag-go svg { width: 15px; height: 15px; transition: transform .18s; }
.cp-flag:hover .cp-flag-go svg { transform: translateX(3px); }

.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 16px; }
.cp-grid .wc { height: 100%; }
.cp-more { align-self: center; }
.cp-empty { margin: 0; padding: 22px 24px; border: 1px dashed var(--border-strong); font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }
.cp-empty a { color: var(--amber); }
.cp-skel-card { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--card); }
.cp-skel-card > i { display: block; aspect-ratio: 16 / 9; background: var(--card-hover); }
.cp-skel-card > b { display: block; height: 12px; margin: 14px 14px 0; width: 60%; background: var(--border); }
.cp-skel-card > span { display: block; height: 10px; margin: 10px 14px 16px; width: 40%; background: var(--border); }
.cp-skel-card { animation: cp-pulse 1.6s ease-in-out infinite; }
@keyframes cp-pulse { 50% { opacity: .55; } }

/* ---- Events ---- */
.cp-ev-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cp-ev { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 18px 20px; background: var(--card); border: 1px solid var(--border);
  transition: border-color .2s; scroll-margin-top: 110px; }
.cp-ev.is-picked { border-color: rgba(var(--amber-rgb), .7); }
.cp-ev-date { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 9px; border: 1px solid; border-image: var(--gold-line) 1;
  background: rgba(var(--amber-rgb), .06); text-align: center; }
.cp-ev-date .mo { font-size: 0.65625rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--amber-bright); }
.cp-ev-date .d { font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.cp-ev-date .wd { font-size: 0.65625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.cp-ev-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cp-ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cp-ev-title { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.cp-ev-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font-size: 0.65625rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber-bright); border: 1px solid rgba(var(--amber-rgb), .45); }
.cp-ev-badge.is-live { color: #7fe0a4; border-color: rgba(127,224,164,.45); }
.cp-ev-badge.is-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5fd38d; }
.cp-ev-when, .cp-ev-where { display: flex; align-items: center; gap: 7px; font-size: 0.84375rem; line-height: 1.45; color: var(--text-muted); }
.cp-ev-when svg, .cp-ev-where svg { flex: none; width: 14px; height: 14px; color: var(--text-dim); }
.cp-ev-desc { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.6; color: var(--text-soft); white-space: pre-line; overflow-wrap: anywhere; }
.cp-ev-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 4px; }
.cp-ev-links .b-link { font-size: 0.6875rem; }
.cp-ev-poster { display: block; width: 150px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface); }
.cp-ev-poster img { display: block; width: 100%; max-height: 200px; object-fit: cover; transition: transform .4s; }
.cp-ev-poster:hover img { transform: scale(1.04); }
.cp-ev.is-past { opacity: .72; }
.cp-ev.is-past .cp-ev-date { border-image: none; border-color: var(--border-strong); background: transparent; }
.cp-ev.is-past .cp-ev-date .mo { color: var(--text-muted); }
.cp-ev-label { margin: 12px 0 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.cp-ev-empty { margin: 0; padding: 22px 24px; border: 1px dashed var(--border-strong); font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }
.cp-ev-empty a { color: var(--amber); }

/* ---- Right: the panels ---- */
.cp-side { grid-area: side; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-top: var(--stage-pad); }
.cp-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; border: 1px solid var(--border); background: var(--card); }
.cp-card h2 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.cp-card p { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--text-soft); white-space: pre-line; overflow-wrap: anywhere; }
.cp-card .b { margin-top: 6px; }
.cp-card .b svg { width: 15px; height: 15px; }
.cp-card-note { margin-top: -6px; font-size: 0.78125rem; color: var(--text-muted); }

.cp-lead-list { margin: 0 -10px -6px; padding: 0; width: calc(100% + 20px); list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cp-lead-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px; color: inherit; text-decoration: none; transition: background-color .15s; }
a.cp-lead-row:hover { background: var(--card-hover); }
a.cp-lead-row:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: -2px; }
.cp-lead-row .cp-rav { width: 38px; height: 38px; font-size: 0.875rem; }
.cp-lead-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-lead-txt b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.cp-lead-txt b > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-lead-txt b .sc-ver { width: 12px; height: 12px; }
.cp-lead-txt > span { font-size: 0.78125rem; color: var(--amber-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cp-cal { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.cp-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-cal-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.cp-cal-nav { display: flex; gap: 6px; }
.cp-cal-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); transition: color .15s, border-color .15s; }
.cp-cal-btn:hover, .cp-cal-btn:focus-visible { color: var(--amber-bright); border-color: var(--amber); outline: none; }
.cp-cal-btn svg { width: 12px; height: 12px; }
.cp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cp-cal-dow { padding-bottom: 6px; font-size: 0.625rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--text-dim); }
.cp-cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; padding: 0; border: 1px solid transparent;
  background: none; font: inherit; font-size: 0.8125rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cp-cal-day.is-today { color: var(--text); border-color: var(--border-strong); }
.cp-cal-day.has { color: var(--text); font-weight: 600; cursor: pointer; background: rgba(var(--amber-rgb), .07); }
.cp-cal-day.has::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-fill); }
.cp-cal-day.has:hover { border-color: var(--border-strong); }
.cp-cal-day.is-sel { border-image: var(--gold-line) 1; color: var(--amber-bright); background: rgba(var(--amber-rgb), .14); }
.cp-cal-day:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.cp-cal-day:disabled { cursor: default; }
.cp-cal-picked { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.cp-cal-picked:empty { display: none; }
.cp-cal-picked .lab { font-size: 0.65625rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.cp-cal-item { display: flex; flex-direction: column; gap: 3px; padding: 0 0 0 12px; border: 0; border-left: 2px solid var(--amber); background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.cp-cal-item b { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.cp-cal-item span { font-size: 0.78125rem; color: var(--text-muted); }
.cp-cal-item:hover b, .cp-cal-item:focus-visible b { color: var(--amber-bright); }
.cp-cal-item:focus-visible { outline: none; }

.cp-report { align-self: flex-start; margin-left: 2px; font-size: 0.6875rem; }

/* ======================================================================
   Narrower screens
   ====================================================================== */
/* 1280-1439px: no room for a third column; the panels go under the rail */
@media (max-width: 1439px) {
  .cp-body { grid-template-columns: var(--left-w) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "left mid" "side mid"; }
  .cp-side { padding-top: 30px; }
  .cp-id { max-width: 70%; }
}
/* under 1280px: the rail becomes a row of facts; the builders move into the fleet as chips */
@media (max-width: 1279px) {
  .cp-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "left" "mid" "side"; row-gap: 20px; }
  .cp-left { padding-top: 0; gap: 0; }
  .cp-left:not(:has(.cp-glance:not([hidden]))) { display: none; }
  .cp-glance > .cp-label { display: none; }
  .cp-facts { flex-direction: row; flex-wrap: wrap; gap: 14px 40px; padding: 4px 0 0; }
  .cp-roster { display: none; }
  .cp-chips { display: flex; }
  .cp-mid { padding-left: 20px; padding-right: 20px; }
  .cp-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; padding-top: 0; }
  .cp-report { grid-column: 1 / -1; }
}
@container stage (max-width: 700px) {
  .cp-flag { grid-template-columns: minmax(0, 1fr); }
  .cp-flag-body { padding: 18px 20px 20px; }
  .cp-flag-name { font-size: 1.375rem; }
}
@media (max-width: 1100px) {
  .cp-band { flex-direction: column; align-items: stretch; }
  .cp-acts { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .cp-id { max-width: none; padding: 32px 32px 26px; gap: 24px; }
  .cp-coin { width: 164px; height: 164px; }
  .cp-emblem { width: 112px; height: 112px; }
  .cp-name { font-size: 2.125rem; }
  .cp-band { padding-left: 32px; }
}
/* phones: the banner on top, uncropped, the coin on its bottom edge */
@media (max-width: 720px) {
  .cp { padding-top: 16px; gap: 16px; }
  .cp-hero { min-height: 0; margin: 0 calc(-1 * var(--pad)); border-left: 0; border-right: 0; }
  .cp-banner { position: relative; z-index: 0; width: 100%; max-width: none; height: auto; max-height: 240px; object-fit: cover;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .cp-hero.has-banner::after { display: none; }
  .cp-mark { top: 18px; right: 12px; width: 180px; height: 180px; translate: none; }
  .cp-id { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px var(--pad) 22px; }
  .cp-hero.has-banner .cp-id { position: relative; z-index: 1; margin-top: -64px; padding-top: 0; }
  .cp-coin { width: 136px; height: 136px; }
  .cp-emblem { width: 92px; height: 92px; }
  .cp-name { font-size: 1.75rem; }
  .cp-tagline { font-size: 0.90625rem; }
  .cp-band { padding: 16px var(--pad) 18px; gap: 16px; }
  .cp-ledger { overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); }
  .cp-ledger::-webkit-scrollbar { display: none; }
  .cp-ledger > * { padding: 0 16px; }
  .cp-ledger b { font-size: 1.125rem; }
  .cp-ledger i { font-size: 0.59375rem; letter-spacing: .14em; }
  .cp-acts { flex-wrap: nowrap; }
  .cp-join { flex: 1 1 auto; justify-content: center; }
  .cp-site { width: 42px; padding: 0 !important; justify-content: center; }
  .cp-site .cp-site-host, .cp-site .ext, .cp-soc > .b .lbl, .cp-soc > .b .chev, .cp-edit .lbl { display: none; }
  .cp-soc > .b, .cp-edit { width: 42px; padding: 0 !important; justify-content: center; }
  .cp-mid { margin: 0 calc(-1 * var(--pad)); padding: 20px var(--pad) 28px; border-left: 0; border-right: 0; gap: 36px; }
  .cp-chips { margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); }
  .cp-bar-end { margin-left: 0; width: 100%; }
  .cp-sort { flex: 1 1 auto; }
  .cp-sort select { flex: 1 1 auto; min-width: 0; }
  .cp-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
  .cp-ev { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .cp-ev-date .d { font-size: 1.375rem; }
  .cp-ev-poster { grid-column: 1 / -1; width: 100%; }
  .cp-ev-poster img { max-height: 260px; }
}
@media (max-width: 400px) {
  .cp-join-x { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-hero, .cp-banner, .cp-bio, .cp-ev, .cp-flag, .cp-flag-pic img, .cp-flag-go svg, .cp-ev-poster img { transition: none; }
  .cp-skel-card { animation: none; }
}

}
