.ch-page { width: var(--page); margin: 0 auto; }
.ch-page [hidden] { display: none !important; }
.ch-page.page-columns, .ch-page .page-columns, #ch-explorer.page-columns { display: block !important; }
.ch-page .page-columns > * { grid-column: auto !important; }
.ch-heading { max-width: 820px; margin: 3rem 0 1.5rem; }
.ch-heading .eyebrow { color: var(--gold); margin-bottom: .7rem; }
.ch-heading h1 { color: var(--paper); font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.06; margin: 0 0 1rem; }
.ch-heading h1 em { color: var(--gold); }
.ch-heading > p:last-child { color: var(--soft); font-size: 1.05rem; max-width: 66ch; }
.ch-loading { color: var(--soft); }
.ch-page button, .ch-page input { font-family: var(--sans); }
.ch-page button:focus-visible, .ch-page input:focus-visible, .ch-col:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.ch-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin: 0 0 1.5rem; }
.ch-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 1rem 1.1rem; border: 1px solid var(--night-line); border-radius: 10px; }
.ch-stats dd { margin: 0; color: var(--gold); font-family: var(--serif); font-size: 2rem; font-weight: 650; line-height: 1.1; }
.ch-stats dt { margin-top: .3rem; color: var(--soft); font-size: .8rem; font-weight: 400; }

.ch-panel { position: relative; margin-bottom: 1.5rem; padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.ch-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: var(--radius) var(--radius) 0 0; background: var(--rainbow); }
.ch-panel .eyebrow { margin-bottom: .3rem; }
.ch-panel h2 { margin: 0 0 .5rem; padding: 0; border: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.ch-panel h3 { margin: .4rem 0 .5rem; color: var(--ink); font-size: 1.2rem; }
.ch-panel a { color: var(--pink-ink); }
.ch-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .8rem 1.5rem; margin-bottom: .6rem; }
.ch-sub { max-width: 80ch; margin: .8rem 0 0; color: var(--muted); font-size: .84rem; }

.ch-toggle { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.ch-toggle button, .ch-wide { padding: .4rem .85rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .84rem; cursor: pointer; }
.ch-toggle button[aria-pressed="true"], .ch-wide[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* The plot: UK purple circles, US orange diamonds */
.ch-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; }
.ch-key span { display: inline-flex; align-items: center; gap: .4rem; }
.ch-key-uk { width: 11px; height: 11px; border-radius: 50%; background: #6b2fa0; }
.ch-key-us { width: 10px; height: 10px; background: #d1490f; transform: rotate(45deg); }
.ch-key-hint { color: var(--muted); }
.ch-plot-wrap { position: relative; overflow-x: auto; }
.ch-plot { display: block; width: 100%; min-width: 600px; height: auto; }
.ch-grid { stroke: #e6dac4; stroke-width: 1; }
.ch-grid.is-one { stroke: #e0b43a; stroke-width: 1.5; }
.ch-yearline { stroke: #d9ccb4; stroke-dasharray: 2 3; }
.ch-axis { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.ch-axis.is-year { font-size: 10px; }
.ch-hit { fill: transparent; }
.ch-col { cursor: pointer; outline: none; }
.ch-col:hover .ch-hit, .ch-col:focus .ch-hit { fill: rgba(107, 47, 160, .07); }
.ch-link { stroke: #b9ab95; stroke-width: 2; }
.ch-uk { fill: #6b2fa0; stroke: var(--paper); stroke-width: 2; }
.ch-us { fill: #d1490f; stroke: var(--paper); stroke-width: 2; }
.ch-tip { position: absolute; z-index: 3; display: grid; gap: .15rem; max-width: 260px; padding: .55rem .7rem; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: .78rem; pointer-events: none; transform: translateY(-110%); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ch-tip.is-below { transform: none; }
.ch-tip strong { font-size: .88rem; }
.ch-tip span { color: #cfc4dc; }
.ch-tip-peaks { display: flex; gap: .7rem; }
.ch-tip-peaks b { color: var(--paper); }
.ch-tip small { color: #cfc4dc; font-size: .7rem; }

/* Tables */
.ch-search { display: grid; gap: .25rem; color: var(--muted); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.ch-search input { width: min(260px, 70vw); padding: .45rem .7rem; border: 1.5px solid var(--ink); border-radius: 8px; background: #fffdf8; color: var(--ink); font-size: .9rem; text-transform: none; letter-spacing: 0; }
.ch-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: .4rem 0 1rem; }
.ch-count { color: var(--muted); font-size: .8rem; }
.ch-table-wrap { overflow-x: auto; }
.ch-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ch-table th { padding: .4rem .5rem; border-bottom: 2px solid var(--ink); color: var(--muted); font-family: var(--mono); font-size: .66rem; font-weight: 500; text-align: left; text-transform: uppercase; white-space: nowrap; }
.ch-table td { padding: .5rem .5rem; border-bottom: 1px solid var(--paper-line); vertical-align: top; }
.ch-table tr.is-flash td { background: #fdf0cf; transition: background .4s; }
.ch-year { color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.ch-title { min-width: 14rem; }
.ch-a { font-weight: 600; }
.ch-b { margin-left: .3rem; color: var(--muted); }
.ch-detail, .ch-footnote { display: block; margin-top: .15rem; color: var(--muted); font-size: .74rem; }
.ch-footnote { font-style: italic; }
.ch-table th.ch-peak, .ch-peak { width: 3.2rem; text-align: center; white-space: nowrap; }
.ch-num { display: inline-block; min-width: 2rem; padding: .1rem .35rem; border-radius: 999px; font-family: var(--mono); font-size: .82rem; }
.ch-num.is-ten { font-weight: 700; }
.ch-num.is-one { background: var(--gold); color: var(--ink); font-weight: 700; }
.ch-none { color: var(--muted); }
.ch-mark { color: var(--pink-ink); cursor: help; }
.ch-albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }

.ch-method { max-width: 90ch; margin: 1.75rem 0; color: var(--soft); font-size: .82rem; }
.ch-method a { color: var(--gold); }
.ch-sources { padding: 1.15rem 1.5rem; border: 1px solid var(--night-line); border-radius: var(--radius); color: var(--soft); }
.ch-sources summary { cursor: pointer; font-size: .9rem; }
.ch-sources h3 { color: var(--gold); font-size: 1.2rem; margin: 1.4rem 0 .3rem; }
.ch-plain { font-size: .82rem; border-collapse: collapse; }
.ch-plain td, .ch-plain th { padding: .2rem .6rem .2rem 0; }
.ch-signoff { margin: 2rem 0; text-align: center; font-family: var(--serif); font-size: 1.2rem; }

@media (max-width: 1000px) { .ch-albums { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ch-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ch-title { min-width: 11rem; } }
@media (max-width: 560px) {
  .ch-title { min-width: 0; }
  .ch-table { font-size: .82rem; }
  .ch-table td, .ch-table th { padding-left: .3rem; padding-right: .3rem; }
  .ch-table th.ch-peak, .ch-peak { width: 2.3rem; }
  .ch-num { min-width: 1.6rem; padding: .1rem .2rem; }
  .ch-year { font-size: .7rem; }
}
