/*
 * GBP Stablecoins: a chart's own page, /analytics/<id>/, built from the Pen frames
 * "N · Analytics chart permalink" (tQwPk) and "N · Mobile · Analytics chart permalink" (UGH0Y).
 * Loaded after analytics.css on those pages only (d2/chart-page.php); the chart panel is analytics.css's.
 */
.d2-cphead__title, .d2-cppanel__t, .d2-cprail__t { font-variation-settings: "opsz" 18; font-optical-sizing: none; }
.d2-an-narrow { display: none; }
.d2-nowrap { white-space: nowrap; }

/* Crumbs (YGsTQ) */
.d2-cpcrumbs { display: flex; align-items: center; gap: 8px; height: 35px; padding: 18px var(--shell-pad) 0; /* same bar as .d2-crumbs */ font-size: 13px; line-height: 17px; color: var(--ink); }
.d2-cpcrumbs a { font-weight: 500; color: var(--accent); }

/* Page head (wZzO3) */
.d2-cphead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 20px var(--shell-pad) 28px; }
.d2-cphead__titles { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.d2-cphead__eyebrow { font: 400 11px/14px var(--font-mono); letter-spacing: 1.6px; color: var(--accent); }
.d2-cphead__title { font-family: var(--font-heading); font-size: 44px; line-height: 44px; font-weight: 400; letter-spacing: -0.6px; color: var(--ink); }
.d2-cphead__lede { max-width: 820px; font-size: 17px; line-height: 26px; color: var(--ink-secondary); }
.d2-cpactions { flex: none; display: flex; gap: 8px; }
.d2-cpbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 35px; padding: 9px 13px; border: 0; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px/17px var(--font-body); color: var(--ink); cursor: pointer; white-space: nowrap; }
.d2 .d2-cpbtn:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--ink-muted); }
.d2-cpbtn.is-dark { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--on-ink); }
.d2 .d2-cpbtn.is-dark:hover { background: var(--ink-hover); }
.d2-cpbtn.is-copied { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.d2-cpbtn.is-copied span { font-size: 0; }
.d2-cpbtn.is-copied span::after { content: "Copied"; font-size: 13px; color: var(--accent); }

/* Body (S78Q8x): main 920 + rail 360, gap 32 */
.d2-cpbody { display: flex; align-items: flex-start; gap: 32px; padding: 0 var(--shell-pad) 48px; }
.d2-cpmain { flex: 1 1 920px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.d2-cprail { flex: 0 0 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.d2-cp .d2-apanel { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* Panels: About (q9Omn) and Cite (qAVzd) */
.d2-cppanel { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.d2-cppanel__t { font-family: var(--font-heading); font-size: 22px; line-height: 22px; font-weight: 400; color: var(--ink); }
.d2-cpabout__rows { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.d2-cprow { display: flex; gap: 16px; padding: 10px 0; box-shadow: inset 0 1px 0 var(--line); }
.d2-cprow__k { flex: none; width: 170px; font: 400 10px/13px var(--font-mono); letter-spacing: 1.2px; color: var(--ink-muted); }
.d2-cprow__v { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 21px; color: var(--ink); }
.d2-cpcite__head { display: flex; flex-direction: column; gap: 4px; }
.d2-cpcite__sub { font-size: 14px; line-height: 20px; color: var(--ink-secondary); }
.d2-cpcite__item { display: flex; flex-direction: column; gap: 6px; }
.d2-cpcite__meta { display: flex; justify-content: space-between; align-items: center; height: 16px; font: 400 10px/13px var(--font-mono); letter-spacing: 1.2px; color: var(--ink-muted); }
.d2-cpcopy { display: inline-flex; align-items: center; gap: 4px; height: 16px; padding: 0; border: 0; background: none; font: 500 12px/16px var(--font-body); letter-spacing: 0; color: var(--accent); cursor: pointer; }
.d2-cpcopy.is-copied span { font-size: 0; }
.d2-cpcopy.is-copied span::after { content: "Copied"; font-size: 12px; }
.d2-cpcite__box { padding: 10px 12px; border-radius: 6px; background: var(--surface-alt); font: 400 12px/18px var(--font-mono); color: var(--ink); overflow-wrap: break-word; }

/* Rail (hDSMU): key numbers, other charts, changelog */
.d2-cprail__t { font-family: var(--font-heading); font-size: 20px; line-height: 20px; font-weight: 400; color: var(--ink); }
.d2-cpkeys { display: flex; flex-direction: column; gap: 12px; }
.d2-cpkeys__grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.d2-cpstat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.d2-cpstat__k { font: 400 10px/13px var(--font-mono); letter-spacing: 1.2px; color: var(--ink-muted); }
.d2-cpstat__v { font: 400 24px/31px var(--font-mono); letter-spacing: -0.5px; color: var(--ink); white-space: nowrap; }
.d2-cpstat__d { font-size: 12px; line-height: 16px; color: var(--ink-secondary); }
.d2-cpother { display: flex; flex-direction: column; padding-top: 8px; }
.d2-cpother__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--line); }
.d2-cpother__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.d2-cpother__t { font: 500 14px/18px var(--font-body); color: var(--ink); }
.d2-cpother__d { font-size: 12px; line-height: 16px; color: var(--ink-secondary); }
.d2-cplog { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 10px; background: var(--surface-alt); }
.d2-cplog__k { font: 400 10px/13px var(--font-mono); letter-spacing: 1.4px; color: var(--ink-muted); }
.d2-cplog__list { display: flex; flex-direction: column; gap: 8px; }
.d2-cplog__entry { display: flex; gap: 10px; }
.d2-cplog__d { flex: none; width: 84px; font: 400 11px/14px var(--font-mono); color: var(--ink-muted); }
.d2-cplog__t { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; color: var(--ink); }

/* Tablet: the rail goes under the main column. */
@media (max-width: 1100px) {
  .d2-cphead { flex-wrap: wrap; }
  .d2-cpbody { flex-direction: column; align-items: stretch; }
  .d2-cprail { flex: none; }
  .d2-cpkeys__grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* =====================================================================
   Mobile (Pen UGH0Y "N · Mobile · Analytics chart permalink"), 390 wide
   ===================================================================== */
@media (max-width: 760px) {
  .d2-an-narrow { display: inline; }

  .d2-cpcrumbs { height: 28px; padding: 12px 16px 0; font-size: 12px; line-height: 16px; }
  .d2-cpcrumbs svg { width: 11px; height: 11px; }

  .d2-cphead { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px 16px; }
  .d2-cphead__titles { gap: 8px; }
  .d2-cphead__eyebrow { font-size: 10px; line-height: 13px; letter-spacing: 1.4px; }
  .d2-cphead__title { font-size: 28px; line-height: 32px; letter-spacing: -0.4px; }
  .d2-cphead__lede { font-size: 14px; line-height: 20px; }
  .d2-cpactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .d2-cpbtn { height: 40px; padding: 0; }

  .d2-cpbody { gap: 16px; padding: 0 16px 24px; }
  .d2-cpmain, .d2-cprail { gap: 16px; }

  .d2-cppanel { gap: 10px; padding: 16px; }
  .d2-cppanel__t, .d2-cprail__t { font-size: 20px; line-height: 20px; }
  .d2-cpabout__rows { gap: 10px; }
  .d2-cprow { flex-direction: column; gap: 3px; padding: 8px 0; }
  .d2-cprow__k { width: auto; font-size: 9px; line-height: 12px; }
  .d2-cprow__v { font-size: 13px; line-height: 20px; }
  .d2-cpcite__head { gap: 10px; }
  .d2-cpcite__sub { font-size: 13px; line-height: 19px; }
  .d2-cpcite__item.is-wide { display: none; }
  .d2-cpcite__meta { font-size: 9px; line-height: 12px; }
  .d2-cpcite__box { font-size: 11px; line-height: 17px; }

  .d2-cpkeys { gap: 10px; }
  .d2-cpkeys__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .d2-cpstat { padding: 12px; border-radius: 8px; }
  .d2-cpstat__k { font-size: 9px; line-height: 12px; letter-spacing: 1.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .d2-cpstat__v { font-size: 20px; line-height: 26px; letter-spacing: -0.3px; }
  .d2-cpstat__d { display: none; }
  .d2-cpother { padding-top: 0; }
  .d2-cplog { padding: 14px; }
  .d2-cplog__k { font-size: 9px; line-height: 12px; letter-spacing: 1.3px; }
  .d2-cplog__entry { flex-direction: column; gap: 2px; }
  .d2-cplog__d { width: auto; font-size: 10px; line-height: 13px; }
}
