/* asset.css — /asset/{ticker}. Reuses explore.css for the dark hero + tabs + price chart; only the
   ticker badge under the name is asset-specific. */

/* ticker badge row — sits between the company name and the price quote (like a stock header) */
.as-ticker { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 12px 0 0; }
.as-ticker:empty { display: none; }
.as-ticker .as-tk { font-size: 14px; font-weight: 700; letter-spacing: .6px; color: var(--ivory);
  background: rgba(240, 238, 233, .12); border-radius: 7px; padding: 4px 11px; }
.as-ticker .as-tk-ex { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--dim); text-transform: uppercase; }

/* Real logos are TV-normalized tiles that already carry their own framing/margin,
   so they FILL the circle (no padding → no thick white ring). object-fit:cover on
   the square PNG fills the round clip; the mark is centred by the normalizer. */
#asLogo { object-fit: cover; padding: 0; }
/* the fallback MDX mark is transparent line-art → small inset so it nearly fills the circle (was 26px = tiny) */
#asLogo.as-logo-fallback { object-fit: contain; padding: 12px; }

/* cross-country bond spread (IT-DE-10Y): two circle-flags split on the 45° anti-diagonal inside the
   same hero slot as #asLogo — subject upper-left, benchmark lower-right. Mirrors the img's sizing
   (128px, 148px ≤720px) so it drops into .ex-hero-logo identically. */
.ex-hero-logo .as-splitflag { position: relative; width: 128px; height: 128px; border-radius: 50%;
  overflow: hidden; display: block; background: #fff; }
.as-splitflag .as-half { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-splitflag .as-half.ll { clip-path: polygon(0 0, 100% 100%, 0 100%); }   /* lower-left triangle = benchmark (keeps the most of its top-left canton, e.g. US stars) */
.as-splitflag .as-half.ur { clip-path: polygon(0 0, 100% 0, 100% 100%); }   /* upper-right triangle = subject */
/* hairline ON the clip boundary — the main diagonal "\" from top-left(0 0) to bottom-right(100 100),
   matching the .ll/.ur triangles. rotate(45deg) aligns the bar to that line (rotate(-45deg) would draw
   the opposite "/" and miss the seam). */
.as-splitflag::after { content: ''; position: absolute; top: 50%; left: 50%; width: 142%; height: 2px;
  background: rgba(255, 255, 255, .85); transform: translate(-50%, -50%) rotate(45deg); }
@media (max-width: 720px) { .ex-hero-logo .as-splitflag { width: 148px; height: 148px; } }
/* commodity hero mark — same 128/148px circle as the logo/split-flag; coloured disc + white icon */
.ex-hero-logo .as-commodity-chip { width: 128px; height: 128px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; }
.as-commodity-chip svg { width: 56%; height: 56%; }
@media (max-width: 720px) { .ex-hero-logo .as-commodity-chip { width: 148px; height: 148px; } }

/* the price chart svg needs the same explicit size as the theme's #exChart (id-specific rule) */
#asChart { width: 100%; height: 270px; display: block; overflow: visible; }
@media (max-width: 900px) { #asChart { height: 220px; } }

/* the company description is a full paragraph → clamp to 3 lines in the hero (unlike the theme deck) */
#asDesc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* meta line: country (bold) · GICS (dim) · theme(s) (accent) */
.ex-hero .ex-meta .as-theme { color: #cbb8e6; font-weight: 600; }

@media (max-width: 720px) {
  .as-ticker { justify-content: center; }
}

/* ── classification chips — country · sector (GICS) · themes (core) · also-in (secondary). Lives
   INSIDE the hero's main column (see asset.html), so it inherits the dark slab and the hero owns the
   bottom spacing — no background/padding of its own. Here we only set the gap below the description
   and stack the label→chips rows. Chips align under the description automatically (same column). ── */
.as-class { margin-top: 22px; display: flex; flex-direction: column; gap: 9px; }
.as-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 16px; }
.as-row[hidden] { display: none; }  /* the grid display above beats [hidden]'s UA display:none → restore it */
.as-lbl { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); padding-top: 7px; }
.as-val { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; min-width: 0; }
.as-val-text { color: var(--ivory); font-size: 14px; font-weight: 600; padding-top: 5px; }

/* chips on dark — a link with a hover chevron */
.as-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600;
  text-decoration: none; border-radius: var(--pill, 999px); padding: 6px 13px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s; }
.as-chip::after { content: '›'; font-weight: 700; opacity: .5; transition: opacity .15s, transform .15s; }
.as-chip:hover::after { opacity: 1; transform: translateX(2px); }
.as-chip.nolink { pointer-events: none; }
.as-chip.nolink::after { content: none; }
/* sector (GICS) + country — neutral */
.as-chip.sector, .as-chip.country { background: rgba(240,238,233,.08); border-color: rgba(240,238,233,.20); color: var(--ivory); }
.as-chip.sector:hover, .as-chip.country:hover { background: rgba(240,238,233,.16); border-color: rgba(240,238,233,.42); }
.as-flag { width: 15px; height: 15px; border-radius: 50%; object-fit: cover; margin-right: -1px; }
/* theme (core) — purple accent that reads on dark */
.as-chip.theme { background: rgba(150,110,230,.18); border-color: rgba(150,110,230,.42); color: #d9c8f5; }
.as-chip.theme:hover { background: rgba(150,110,230,.34); border-color: rgba(150,110,230,.72); color: #fff; }
/* also-in (secondary) — muted outline */
.as-chip.also { background: transparent; border-color: rgba(240,238,233,.18); color: rgba(240,238,233,.62); }
.as-chip.also:hover { border-color: rgba(240,238,233,.44); color: var(--ivory); }
/* +N more toggle → reveals the hidden chips in that row */
.as-more { font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; background: transparent;
  border: 1px dashed rgba(240,238,233,.30); color: rgba(240,238,233,.64); border-radius: var(--pill, 999px);
  padding: 6px 12px; transition: color .15s, border-color .15s; }
.as-more:hover { color: var(--ivory); border-color: rgba(240,238,233,.52); }
.as-chip.as-hidden { display: none; }

@media (max-width: 720px) {
  .as-row { grid-template-columns: 1fr; gap: 3px; }
  .as-lbl { padding-top: 2px; }
  .as-val-text { padding-top: 0; }
}

/* Notes tab head — lead count + direct/indirect scope toggle on one row */
.as-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.as-notes-head .ex-notes-lead { margin: 0; }
.as-notes-head #asNotesSeg { flex: 0 0 auto; }

/* ── ASSET RELATIONSHIPS (right rail: Related · Competitors · Peers) — see
   docs/product/asset-relationships-design.md. One compact card; the "?" holds the why/how tooltip. ── */
.rl-sec { margin-top: 20px; }
.rl-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--dim, #6b6b6b); margin: 0 0 10px; }
.rl-h .rl-n { background: rgba(0,0,0,.06); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--black); }
.rl-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.rl-tab { font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent;
  border: 1px solid rgba(0,0,0,.12); border-radius: 999px; padding: 3px 10px; color: var(--dim, #6b6b6b);
  transition: background .15s, border-color .15s, color .15s; }
.rl-tab.on { background: var(--black); border-color: var(--black); color: #fff; }
.rl-shuf { margin-left: auto; background: transparent; border: none; cursor: pointer; font-size: 14px; opacity: .55; }
.rl-shuf:hover { opacity: 1; }
.rl-list { display: flex; flex-direction: column; gap: 6px; }
/* thin sub-group label inside a section (e.g. "Currency exposure" under Related assets) */
.rl-subh { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--dim, #6b6b6b); opacity: .8; margin: 12px 0 7px; }
.rl-card { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 12px; background: #fff;
  border: 1px solid rgba(0,0,0,.08); text-decoration: none; color: var(--black); transition: border-color .15s, box-shadow .15s; }
.rl-card:hover { border-color: rgba(0,0,0,.22); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.rl-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.05);
  display: flex; align-items: center; justify-content: center; font-size: 14px; }
/* commodity chip (icon on a coloured disc) — shared CommodityMeta; bg set inline per symbol */
.rl-ic-chip { background: none; }
.rl-ic-chip svg { width: 62%; height: 62%; }
.rl-bd { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rl-nm { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-sub { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim, #7a7a7a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-flag { width: 13px; height: 13px; border-radius: 50%; object-fit: cover; flex: none; }
.rl-chan { text-transform: capitalize; }
.rl-str { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.rl-str-high { background: #1f9d57; } .rl-str-medium { background: #e0a72e; } .rl-str-low { background: #bbb; }
.rl-up { color: #1f9d57; font-size: 9px; } .rl-dn { color: #d23b3b; font-size: 9px; }
.rl-mc, .rl-spk { font-weight: 700; color: var(--black); }
.rl-q { flex: none; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.06); color: var(--dim, #888);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: help; }
.rl-q:hover { background: rgba(0,0,0,.14); color: var(--black); }

/* the right rail now holds glance + related + competitors + peers → too tall to pin; let it scroll with
   the page (override feed.css's sticky, asset page only). */
.fd-side { position: static; }
/* per-card price context — sparkline + price + %chg (batch-hydrated, like the swarm card) */
.rl-metric { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; min-height: 18px; }
.rl-metric:empty { display: none; }
.rl-spark { width: 58px; height: 18px; flex: none; display: block; overflow: visible; }
.rl-px { font-weight: 700; color: var(--black); font-variant-numeric: tabular-nums; }
.rl-metric .rl-up, .rl-metric .rl-dn { font-size: 11px; font-weight: 700; }
.rl-metric .rl-up { color: #1f9d57; } .rl-metric .rl-dn { color: #d23b3b; }
/* skeleton (warm shimmer) shown in the metric row until the batch price hydrates — mirrors the real
   layout (sparkline block + price/chg bars) so the card doesn't jump when data lands. */
@keyframes rl-sh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.rl-skel { background: linear-gradient(90deg, #E7E4DD 25%, #F2F0EB 50%, #E7E4DD 75%); background-size: 200% 100%;
  animation: rl-sh 1.4s linear infinite; border-radius: 5px; display: inline-block; }
.rl-spark.rl-skel { height: 12px; align-self: center; border-radius: 6px; }
.rl-px-skel { width: 54px; height: 11px; }
.rl-chg-skel { width: 30px; height: 11px; }
/* layer-1: whole placeholder card (icon · name · sub · metric all shimmer) while a section is fetching */
.rl-card-skel { pointer-events: none; cursor: default; }
.rl-ic.rl-skel { border-radius: 50%; }
.rl-nm-skel { width: 66px; height: 12px; }
.rl-sub-skel { width: 92px; height: 10px; }
/* sparkline grow-in: the line starts flat on the chart baseline (scaleY 0) then rises to its real shape
   over ~1s, staggered top→bottom via --rl-d. transform-box: view-box → the origin IS the baseline (y=h). */
.rl-spark.rl-spark-anim polyline { transform-box: view-box; transform-origin: 50% 100%; transform: scaleY(0); }
.rl-spark.rl-spark-anim.rl-spark-in polyline {
  transform: scaleY(1); transition: transform 1s cubic-bezier(.22, .61, .36, 1) var(--rl-d, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .rl-spark.rl-spark-anim polyline { transform: none; transition: none; } }

/* ── card redesign (v2): column layout — icon+name+"?" on top, wide sparkline, price bottom-right ── */
.rl-card { flex-direction: column; align-items: stretch; gap: 5px; padding: 9px 11px; }
.rl-top { display: flex; align-items: center; gap: 8px; }
.rl-top .rl-nm { flex: 1; min-width: 0; }
.rl-q { margin-left: auto; }                         /* "?" pinned top-right of the card */
.rl-sub { flex-wrap: wrap; white-space: normal; }
/* one row: sparkline STRETCHES to fill the row (ends just before the price) · price + %chg on the right */
.rl-metric { flex-direction: row; align-items: center; gap: 10px; margin-top: 3px; }
.rl-spark { flex: 1 1 auto; min-width: 90px; height: 22px; }
/* fixed-width, right-aligned price column → the flex sparkline gets the SAME width on every card */
.rl-pxrow { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; font-size: 12px;
  flex: none; width: 116px; font-variant-numeric: tabular-nums; }
.rl-pxrow .rl-px { font-weight: 700; color: var(--black); }
.rl-pxrow .rl-up { color: #1f9d57; font-weight: 700; font-size: 12px; }
.rl-pxrow .rl-dn { color: #d23b3b; font-weight: 700; font-size: 12px; }
/* "?" popover — reason / news / shared-themes note */
.rl-pop { position: absolute; z-index: 600; background: rgba(42,37,33,.97); color: #f0eee9; border-radius: 10px;
  padding: 10px 12px; font: 500 12px/1.5 'Space Grotesk', sans-serif; box-shadow: 0 10px 34px rgba(0,0,0,.34);
  white-space: pre-line; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: auto; }

/* leading-icon = country flag (peer/competitor): fill the same 26px circle as the commodity glyph */
.rl-ic-img { background: none; padding: 0; overflow: hidden; }
.rl-ic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* mini diagonal split flag inside a 26px rail icon — cross-country bond spread / forex pair. Same
   clip-path triangles + 45° seam as the hero .as-splitflag: benchmark lower-left, subject upper-right. */
.rl-ic-split { background: none; overflow: hidden; position: relative; }
.rl-ic-split .rl-half { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rl-ic-split .rl-half.ll { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.rl-ic-split .rl-half.ur { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.rl-ic-split::after { content: ''; position: absolute; top: 50%; left: 50%; width: 142%; height: 1px;
  background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
