/* Companions of the Lance — the /companions section of the hub.
   Loaded after style.css, only on these pages (body.cl). The hub chrome stays; the section
   brings Solace's night sky and the Storm Aspect's levin-blue as its accent, and each hero
   and Origin wears its own Aspect colours from the game's palette. */
body.cl {
  --cl: #9fd0ff;          /* Storm accent: links, active tab, headings */
  --cl-deep: #2f5fd0;     /* Storm primary: buttons, rules */
  --night: #1b2235;       /* Solace night */
  --feed-panel: #2a2119;
  --feed-row: #1f2438;
  --feed-gold: #e6b84a;
  --feed-trig: #e8892b;
  background: radial-gradient(ellipse 80% 600px at 50% -12%, #1d2538 0%, transparent 100%) no-repeat top center, var(--bg);
}
body.cl main a, body.cl .site-footer a { color: var(--cl); }
body.cl h2 { color: var(--cl); }

/* Aspect palettes: --ap primary, --ac accent, --pt text on the primary */
.a-flame { --ap: #c8321e; --ac: #f2b134; --pt: #fff6e6; }
.a-storm { --ap: #2f5fd0; --ac: #9fd0ff; --pt: #ffffff; }
.a-tide  { --ap: #1e2a2e; --ac: #6fbf3a; --pt: #d9f2c8; }
.a-gale  { --ap: #3e8e41; --ac: #c9d63a; --pt: #f6fbe0; }
.a-rime  { --ap: #dde9f2; --ac: #7fb8e0; --pt: #1b2235; }

/* ------------------------------------------------ section band (sub-nav) */
.cl-band { background: rgba(27, 34, 53, .72); border-bottom: 1px solid rgba(159, 208, 255, .16); }
.cl-band-row { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
body.cl a.cl-title { color: var(--text); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; }
.cl-title span { color: var(--cl); }
.cl-title:hover { text-decoration: none; }
.cl-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; flex: 1; }
body.cl .cl-nav a {
  color: var(--muted); font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 0; border-bottom: 2px solid transparent;
}
body.cl .cl-nav a:hover { color: var(--text); text-decoration: none; }
body.cl .cl-nav a[aria-current="page"] { color: var(--cl); border-bottom-color: var(--cl); }
.cl-status .pill { font-size: 12px; }

/* ------------------------------------------------ page heads */
.cl-hero { padding: 40px 0 4px; margin-top: 0; }
.cl-hero-tight { padding-top: 32px; margin-bottom: 26px; }
.cl-kicker { color: var(--cl); font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; }
/* Each part of a kicker stays whole: on a narrow screen it wraps between the parts, never
   leaving one word alone on the second line. */
.cl-kicker > span { white-space: nowrap; }
.cl-hero h1 { font-size: clamp(30px, 6vw, 50px); line-height: 1.12; margin: 8px 0 14px; letter-spacing: 1px; }
.cl-lede { color: #cbbfa6; font-size: 18px; max-width: 680px; }
.cl-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }
.cl-prealpha {
  margin-top: 22px; max-width: 680px; font-size: 15px; color: #d8ccb2;
  border-left: 3px solid #f2b134; background: rgba(242, 177, 52, .07);
  padding: 10px 14px; border-radius: 0 8px 8px 0;
}
.cl-prealpha strong { color: #f2b134; }

/* buttons */
body.cl .cl-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 18px; border-radius: 8px; font-size: 16px; letter-spacing: .5px;
  color: var(--text); border: 1px solid rgba(159, 208, 255, .35); background: rgba(27, 34, 53, .5);
}
body.cl .cl-btn:hover { border-color: var(--cl); text-decoration: none; }
body.cl .cl-btn.primary { background: var(--cl-deep); border-color: var(--cl-deep); color: #fff; font-weight: bold; }
body.cl .cl-btn.primary:hover { background: #3a6ee0; }
body.cl .cl-btn.big { display: flex; width: 100%; padding: 14px 18px; font-size: 18px; }
.cl-btn small { font-weight: normal; font-size: 13px; opacity: .8; white-space: nowrap; }
body.cl .cl-btn.big { flex-wrap: wrap; row-gap: 2px; }
body.cl .cl-btn.disabled { cursor: default; border-style: dashed; color: var(--muted); background: transparent; }

/* ------------------------------------------------ screenshots */
.cl-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; }
.cl-shot { margin: 0; min-width: 0; }
.cl-shot.wide { grid-column: 1 / -1; }
.cl-shot img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  border: 1px solid #2c3550; background: var(--night);
}
.cl-shot a:hover img { border-color: var(--cl); }
.cl-shot figcaption { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ------------------------------------------------ sections */
.cl-section { margin: 52px 0; }
.cl-intro { color: #cbbfa6; max-width: 720px; margin-bottom: 20px; }
.cl-note { color: var(--muted); font-size: 15px; margin-top: 16px; }
.cl-small { color: var(--muted); font-size: 13.5px; margin-top: 12px; }

.cl-steps { counter-reset: s; list-style: none; display: grid; gap: 4px; }
.cl-steps li { counter-increment: s; position: relative; padding: 8px 0 8px 40px; border-top: 1px solid rgba(255, 255, 255, .06); }
.cl-steps li:first-child { border-top: 0; }
.cl-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(47, 95, 208, .22); color: var(--cl); font-size: 14px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.cl-steps strong { color: var(--text); }

/* ------------------------------------------------ the chain */
.cl-chain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 410px); gap: 30px; align-items: start; }
.cl-states { list-style: none; display: grid; gap: 6px; margin: 18px 0 0; font-size: 15px; color: #cbbfa6; }
.cl-states li { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; }
.cl-state {
  display: inline-block; color: var(--feed-gold); font: bold 12px/1.6 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 1.5px; text-transform: uppercase;
}

/* The feed copies the in-game chase feed: dark panel, orange trigger, navy row, gold count. */
.cl-feed {
  margin: 0; background: var(--feed-panel); border-top: 2px solid var(--gold); border-radius: 4px;
  padding: 10px 10px 12px; font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35); min-width: 0;
}
.cl-feed-head {
  display: flex; justify-content: space-between; color: #bfae8c; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; padding: 0 2px 8px;
}
.cl-feed-head span:first-child { color: #7a2e2e; background: #efe3c8; padding: 0 8px; border-radius: 2px; font-weight: bold; }
.cl-feed-opener, .cl-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: var(--feed-row); padding: 6px 10px 6px 6px; border-radius: 3px;
}
.cl-feed-opener { background: #262c45; border: 1px solid #39436a; }
.cl-links { list-style: none; }
.cl-links li { margin-left: calc(min(var(--d, 0), 5) * 9px); margin-top: 6px; }
.cl-trig {
  display: flex; align-items: center; gap: 6px; color: var(--feed-gold); font-size: 12px; font-weight: bold;
  letter-spacing: 1.2px; padding: 2px 0 3px 4px;
}
.cl-arrow {
  width: 12px; height: 12px; background: var(--feed-trig); flex: none;
  clip-path: polygon(30% 0, 70% 0, 70% 50%, 100% 50%, 50% 100%, 0 50%, 30% 50%);
}
.cl-skill { color: #f3ecda; font-size: 14px; font-weight: 600; line-height: 1.25; min-width: 0; }
.cl-skill small { display: block; color: #9aa6c4; font-size: 11.5px; font-weight: normal; }
.cl-flurry { color: var(--feed-gold); font-weight: bold; font-size: 13.5px; white-space: nowrap; letter-spacing: .3px; }
.cl-feed figcaption { color: #a8997c; font-size: 12.5px; margin-top: 10px; padding: 0 2px; }

/* portraits: the game's placeholder look (Aspect colour + initials) */
.cl-port {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 3px; background: var(--ap, #555); color: var(--pt, #fff); border: 1px solid var(--ac, #888);
  font: bold 11px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .5px; flex: none;
}
.cl-port.big { width: 50px; height: 50px; border-radius: 50%; border-width: 2px; font-size: 15px; }

/* ------------------------------------------------ Origins */
.cl-origins { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; }
.cl-origin {
  position: relative; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 16px 14px; font-size: 14.5px; color: #cbbfa6; min-width: 0;
}
.cl-origin::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--ap), var(--ac));
}
.cl-origin h3 { color: var(--text); font-size: 19px; letter-spacing: .5px; margin: 6px 0 0; }
.cl-origin-aspect {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--ac);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}
.cl-origin-aspect small { color: var(--muted); letter-spacing: 1px; text-transform: none; font-size: 12px; flex-basis: 100%; }
.cl-origin-role { color: var(--ac); font-style: italic; margin-bottom: 8px; font-size: 14px; }
.cl-origin-guise { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.cl-swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--ap) 0 50%, var(--ac) 50% 100%); border: 1px solid var(--ac);
}

/* ------------------------------------------------ in this build / CTA */
.cl-build { list-style: none; columns: 2 300px; column-gap: 34px; }
.cl-build li { break-inside: avoid; padding: 5px 0 5px 22px; position: relative; color: #d8ccb2; }
.cl-build li::before {
  content: ""; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px;
  background: var(--feed-gold); transform: rotate(45deg);
}
.cl-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(47, 95, 208, .16), rgba(27, 34, 53, .55));
  border: 1px solid rgba(159, 208, 255, .22); border-radius: 12px; padding: 20px 24px;
}
.cl-cta h2 { border: 0; padding: 0; margin: 0 0 4px; font-size: 20px; }
.cl-cta p { color: #cbbfa6; max-width: 560px; font-size: 15px; }

/* ------------------------------------------------ heroes */
.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
body.cl a.cl-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-raise); color: var(--text); font-size: 14px;
}
body.cl a.cl-chip:hover { border-color: var(--ac, var(--cl)); text-decoration: none; }
body.cl a.cl-chip.on { border-color: var(--ac, var(--cl)); background: rgba(159, 208, 255, .1); }
.cl-chip > span:last-child { color: var(--muted); font-size: 12.5px; }

.cl-heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.cl-hero-card {
  display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 14px; align-items: start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  scroll-margin-top: 16px;
}
.cl-hero-card[hidden] { display: none; }
.cl-hero-card:target { border-color: var(--ac); }
.cl-hero-card h3 { color: var(--text); font-size: 17.5px; line-height: 1.25; letter-spacing: .3px; }
/* A hero with two kits: each card says which form it is. */
.cl-form {
  display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--ac); color: var(--ac); font: normal 11px/1.6 "Segoe UI", system-ui, sans-serif;
  letter-spacing: .8px; text-transform: uppercase; white-space: nowrap;
}
.cl-epithet { color: #cbbfa6; font-style: italic; font-size: 14.5px; line-height: 1.35; }
.cl-hero-meta { font-size: 12.5px; color: var(--muted); margin: 6px 0 6px; letter-spacing: .3px; }
.cl-aspect-name { color: var(--ac); text-transform: uppercase; letter-spacing: 1.5px; }
.cl-tag {
  display: inline-block; padding: 0 7px; border-radius: 999px; border: 1px solid rgba(159, 208, 255, .4);
  color: var(--cl); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
}
.cl-bio { font-size: 14px; color: #b9ab90; line-height: 1.5; }
.cl-roster-note { font-size: 13.5px; }

/* ------------------------------------------------ play */
.cl-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cl-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px;
  margin: 0; min-width: 0;
}
.cl-panel h2 { font-size: 18px; }
.cl-panel h3, .cl-section h3 { color: var(--text); font-size: 16px; letter-spacing: .5px; margin: 18px 0 4px; }
.cl-panel > p { color: #cbbfa6; font-size: 15px; }
.cl-mode { margin-top: 4px; }
.cl-mode p { color: #cbbfa6; font-size: 15px; }
.cl-mode h3 { color: var(--cl); }
.cl-secure { border-left: 3px solid var(--cl-deep); padding-left: 12px; margin-top: 16px; }
.cl-secure h3 { margin-top: 0; }
.cl-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 16px 0 0; font-size: 14px; }
.cl-facts dt { color: var(--muted); }
.cl-facts dd { min-width: 0; }
.cl-hash, .cl-facts code { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.cl-facts code { background: none; border: 0; padding: 0; }
/* The file name wraps only after its hyphens (the template puts a <wbr> there). */
.cl-facts code.cl-file { overflow-wrap: normal; word-break: normal; }
.cl-list { list-style: none; font-size: 15px; color: #cbbfa6; }
.cl-list li { padding: 3px 0 3px 18px; position: relative; }
.cl-list li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; background: var(--cl); transform: rotate(45deg); }
.cl-section > p { color: #cbbfa6; max-width: 760px; margin: 10px 0; }
.cl-pre {
  background: #0d0a08; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  margin: 10px 0; overflow-x: auto; font-size: 13px; line-height: 1.5; max-width: 100%;
}
.cl-pre code { background: none; border: 0; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
body.cl code { color: #cfe6ff; }
.cl-callout {
  margin-top: 20px; border-left: 3px solid var(--cl-deep); background: rgba(47, 95, 208, .08);
  border-radius: 0 10px 10px 0; padding: 14px 18px;
}
.cl-callout h3 { margin-top: 0; }
.cl-callout p { color: #cbbfa6; font-size: 15px; margin: 6px 0; }

/* ------------------------------------------------ notes */
.cl-notes h2 { margin-top: 8px; font-size: 20px; }
.cl-notes h3 { color: var(--feed-gold); font-size: 16px; letter-spacing: .5px; }
.cl-notes p, .cl-notes li { color: #d8ccb2; }
/* The same diamond bullets as the other lists in the section (works for both Markdown renderers). */
.cl-notes ul { list-style: none; padding-left: 0; margin-left: 0; }
.cl-notes li { position: relative; padding: 3px 0 3px 22px; }
.cl-notes li::before {
  content: ""; position: absolute; left: 4px; top: 13px; width: 7px; height: 7px;
  background: var(--feed-gold); transform: rotate(45deg);
}
.cl-unpublished { margin: 0 0 26px; }

/* ------------------------------------------------ narrow screens */
@media (max-width: 820px) {
  .cl-chain, .cl-play { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cl-shots { grid-template-columns: minmax(0, 1fr); }
  .cl-band-row { gap: 6px 14px; }
  .cl-nav { order: 3; flex-basis: 100%; gap: 4px 16px; }
  /* Title and pill share the first row: the band already sits under the hub header, so the
     short title is enough here. */
  .cl-title span { display: none; }
  .cl-status { margin-left: auto; }
  .cl-hero { padding-top: 28px; }
  .cl-lede { font-size: 16.5px; }
  .cl-cta { padding: 18px; }
  .cl-heroes, .cl-origins { grid-template-columns: minmax(0, 1fr); }
}
