/* Platform chart pages (/site/{slug}/charts). Drawn by assets/charts.js with d3. */
.charts-page { display: grid; gap: 26px; min-width: 0; }
.ch-hero { padding-bottom: clamp(22px, 3.5vw, 36px); }
.ch-hero .back-link { margin-bottom: 18px; }
.ch-hero-head { display: flex; align-items: center; gap: 16px; }
.ch-hero-head > div { min-width: 0; }
.ch-hero .eyebrow { margin-bottom: 4px; }
.ch-hero .eyebrow a { color: inherit; }
.ch-hero h1 { margin: 0; overflow-wrap: anywhere; }
.ch-fav { flex: none; width: 56px; height: 56px; border-radius: 14px; background: #fff; padding: 6px; object-fit: contain; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.ch-hero--detail .ch-fav { width: 48px; height: 48px; }
.ch-hero .intro { margin-top: 14px; }
.ch-hero .list-stat small { font-size: .5em; color: #c9d3ea; margin-left: 2px; }
.ch-stats { margin-bottom: 0; }
.ch-closed { color: #ffcf8a; font-weight: 600; margin: 10px 0 0; }

.ch-jump { margin: 0; }
.ch-group { margin: 0; scroll-margin-top: 16px; }
.ch-group .pg-head { margin-bottom: 12px; }
.ch-group h2 { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.015em; margin: 0 0 4px; }
.ch-gico { --t: #1463ff; --tb: #e8f0ff; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--t); background: var(--tb); flex: none; }
.ch-gico svg { width: 20px; height: 20px; }
.ch-group--money .ch-gico { --t: #0a7a55; --tb: #e7f7f0; }
.ch-group--joining .ch-gico { --t: #1463ff; --tb: #e8f0ff; }
.ch-group--quality .ch-gico { --t: #a85a00; --tb: #fff4df; }
.ch-group--history .ch-gico { --t: #6d3fe0; --tb: #f1ebff; }

.ch-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.ch-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 18px 16px; border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ch-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11,21,51,.10); border-color: #cfd8ea; }
.ch-card:focus-visible { outline-offset: 3px; }
.ch-card-title { font-size: 17px; line-height: 1.25; }
.ch-take { margin: 0; font-size: 14.5px; line-height: 1.5; color: #3e4a6b; flex: 1; }
.ch-more { font-size: 14px; font-weight: 700; color: var(--accent); }
.ch-card:hover .ch-more span { display: inline-block; transform: translateX(3px); transition: transform .15s ease; }
.ch-missing { margin: 0; padding: 16px 20px; border-radius: 18px; background: #f5f7fb; border: 1px dashed #cfd8ea; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.ch-missing strong { color: var(--text); }

.ch-plot { position: relative; min-width: 0; width: 100%; }
.ch-plot--mini { min-height: 132px; pointer-events: none; }
.ch-plot--full:empty { min-height: 260px; }
.ch-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }

.ch-detail { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(14px, 3vw, 26px); min-width: 0; box-shadow: 0 24px 70px rgba(21,32,56,.08); }
.ch-controls { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
.ch-controls:empty { display: none; }
.ch-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ch-ctl-label { flex: 0 0 100%; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ch-chip { min-height: 38px; padding: 7px 13px; font-size: 13.5px; }
.ch-chip-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ch-chip[aria-pressed="false"] .ch-chip-dot { opacity: .35; }
.ch-input { font: inherit; font-size: 15px; min-height: 38px; padding: 6px 12px; border: 1px solid #d5dcea; border-radius: 12px; background: #fff; color: var(--text); width: 110px; }
.ch-input--wide { width: min(260px, 100%); }
.ch-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(20,99,255,.15); }
.ch-status { margin: 14px 0 0; font-size: 14.5px; line-height: 1.55; color: #3e4a6b; }
.ch-status:empty { display: none; }
.ch-cmp-txt { color: #6d3fe0; }
.ch-key { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 8px; }
.ch-key:first-child { margin-left: 0; }
.ch-key.is-rev { background: #1463ff; } .ch-key.is-inc { background: #0e9f6e; } .ch-key.is-neg { background: #c42b2b; }
.ch-key.is-open { background: #6ff0bc; } .ch-key.is-closed { background: #dfe5ef; }
.ch-key.is-pay { background: #0e9f6e; } .ch-key.is-people { background: #1463ff; } .ch-key.is-gross { background: #c77a00; } .ch-key.is-other { background: #94a3b8; }
.ch-fallback { margin: 0; padding: 18px; color: var(--muted); font-size: 14.5px; }

/* svg parts */
.ch-axis text { font-size: 11.5px; fill: #657086; }
.ch-axis path, .ch-axis line { stroke: #cfd8ea; }
.ch-axis--y path { display: none; }
.ch-axis--y line { stroke: #eef2f8; }
.ch-axis--x .domain { display: none; }
.ch-axis-title { font-size: 12px; fill: #657086; font-weight: 600; }
.ch-lbl { font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.ch-plot--mini .ch-lbl { font-size: 11.5px; }
.ch-lbl.is-me { fill: #1463ff; } .ch-lbl.is-cmp { fill: #6d3fe0; } .ch-lbl--median { fill: #a86400; font-weight: 600; }
.ch-dot { fill: #b9c6e3; stroke: #fff; stroke-width: 1; transition: fill .15s; }
.ch-dot.is-hover { fill: #0b1533; }
.ch-median { stroke: #c77a00; stroke-width: 1.5; stroke-dasharray: 4 4; }
.ch-mark { stroke-width: 2; }
.ch-mark.is-me { stroke: #1463ff; } .ch-mark.is-cmp { stroke: #6d3fe0; stroke-dasharray: 2 3; }
.ch-mark-dot { stroke: #fff; stroke-width: 2.5; }
.ch-mark-dot.is-me { fill: #1463ff; } .ch-mark-dot.is-cmp { fill: #6d3fe0; }
.ch-bin { fill: #c9d6f2; transition: fill .15s; }
.ch-bin.is-me { fill: #1463ff; }
.ch-bin.is-hover { fill: #0b1533; }
.ch-zero { stroke: #94a3b8; stroke-width: 1; }
.ch-hit { fill: transparent; cursor: default; }
.ch-step-bar { fill: #0b1533; }
.ch-step.is-cut .ch-step-bar { fill: #c77a00; }
.ch-step.is-fixed .ch-step-bar { fill: #e3a33b; }
.ch-step.is-keep .ch-step-bar { fill: #0e9f6e; }
.ch-step.is-cmp .ch-step-bar { fill: #6d3fe0; }
.ch-step .ch-step-bar.is-maybe { opacity: .38; }
.ch-step.is-hover .ch-step-bar { filter: brightness(1.12); }
.ch-step-val { font-size: 12.5px; font-weight: 700; fill: #0b1533; }
.ch-step-lbl { font-size: 11.5px; fill: #3e4a6b; font-weight: 600; }
.ch-conn { stroke: #94a3b8; stroke-dasharray: 3 3; }
.ch-rgrid { fill: none; stroke: #e3e8f2; }
.ch-raxis { stroke: #e3e8f2; }
.ch-rtick { font-size: 10px; fill: #94a3b8; }
.ch-rlabel { font-size: 12.5px; font-weight: 700; fill: #172033; }
.ch-plot--mini .ch-rlabel { font-size: 10.5px; font-weight: 600; fill: #3e4a6b; }
.ch-rval { font-size: 12px; font-weight: 600; fill: #1463ff; }
.ch-rshape.is-me { fill: rgba(20,99,255,.18); stroke: #1463ff; stroke-width: 2.2; stroke-linejoin: round; }
.ch-rshape.is-avg { fill: rgba(199,122,0,.06); stroke: #c77a00; stroke-width: 1.6; stroke-dasharray: 5 4; }
.ch-rshape.is-cmp { fill: rgba(109,63,224,.10); stroke: #6d3fe0; stroke-width: 2; }
.ch-rpt { fill: #1463ff; stroke: #fff; stroke-width: 2; }
.ch-rpt.is-null { fill: #fff; stroke: #94a3b8; }
.ch-col.is-rev { fill: #1463ff; } .ch-col.is-inc { fill: #0e9f6e; } .ch-col.is-neg { fill: #c42b2b; }
.ch-year.is-hover .ch-col { filter: brightness(1.15); }
.ch-col-val { font-size: 11px; font-weight: 700; fill: #3e4a6b; }
.ch-country { stroke: #fff; stroke-width: .5; transition: fill .15s; }
.ch-country.is-open { fill: #6ff0bc; } .ch-country.is-closed { fill: #dfe5ef; } .ch-country.is-unknown { fill: #eef1f6; }
.ch-country.is-hover { stroke: #0b1533; stroke-width: 1.2; }
.ch-country.is-open.is-hover { fill: #2ee59d; }
.ch-map { position: relative; width: 100%; }
.ch-map-regions { margin-top: 18px; }
.ch-lane { stroke: #e3e8f2; stroke-width: 2; }
.ch-lane-lbl { font-size: 11.5px; font-weight: 700; fill: #657086; text-transform: uppercase; letter-spacing: .05em; }
.ch-ev { stroke: #fff; stroke-width: 2; }
.ch-evg.is-hover .ch-ev { stroke: #0b1533; }
.ch-ev-n { font-size: 10.5px; font-weight: 800; fill: #fff; pointer-events: none; }

/* html bars */
.ch-hbars { display: grid; gap: 12px; }
.ch-hbars.is-mini { gap: 5px; }
.ch-hrow { display: grid; gap: 5px; min-width: 0; }
.ch-hbars.is-mini .ch-hrow { gap: 2px; }
.ch-hrow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; font-size: 14px; }
.ch-hbars.is-mini .ch-hrow-head { font-size: 12px; flex-wrap: nowrap; }
.ch-hrow-label { font-weight: 700; color: #172033; min-width: 0; overflow-wrap: anywhere; }
.ch-hbars.is-mini .ch-hrow-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hrow-right { color: #657086; font-size: 13px; font-variant-numeric: tabular-nums; }
.ch-hbars.is-mini .ch-hrow-right { font-size: 11.5px; white-space: nowrap; }
.ch-hrow-track { position: relative; height: 12px; border-radius: 999px; background: #eef2f8; }
.ch-hbars.is-mini .ch-hrow-track { height: 7px; }
.ch-hrow-fill, .ch-hrow-tie { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: #1463ff; }
.ch-hrow-tie { background: #bcd0ff; border-radius: 0 999px 999px 0; }
.ch-hrow.is-off .ch-hrow-fill { background: #c3cbdb; }
.ch-hrow.is-off .ch-hrow-label { color: #657086; }
.ch-hrow.is-tp .ch-hrow-fill { background: #0e9f6e; }
.ch-hrow-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #c77a00; }
.ch-hrow-cmp { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #6d3fe0; }
.ch-hrow-cmp-dot { position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #6d3fe0; border: 2px solid #fff; }
.ch-hrow.is-hover .ch-hrow-label { color: #1463ff; }
.ch-hbars-axis { margin: 2px 0 0; font-size: 12.5px; color: #657086; font-weight: 600; }

/* earnings figures */
.ch-figs { display: grid; gap: 20px; }
.ch-figs.is-mini { gap: 10px; }
.ch-fig-group { display: grid; gap: 14px; }
.ch-figs.is-mini .ch-fig-group { gap: 6px; }
.ch-sub { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #657086; }
.ch-figs.is-mini .ch-sub { font-size: 10.5px; }
.ch-fig { display: grid; gap: 5px; --t: #94a3b8; }
.ch-fig.is-pay { --t: #0e9f6e; } .ch-fig.is-people { --t: #1463ff; } .ch-fig.is-gross { --t: #c77a00; } .ch-fig.is-rev { --t: #475569; }
.ch-fig-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ch-fig-head strong { font-family: var(--display); font-weight: 800; font-size: 20px; color: #0b1533; }
.ch-fig-head span { font-size: 13.5px; color: #657086; }
.ch-figs.is-mini .ch-fig-head { flex-wrap: nowrap; }
.ch-figs.is-mini .ch-fig-head strong { font-size: 14.5px; white-space: nowrap; }
.ch-figs.is-mini .ch-fig-head span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-fig-track { position: relative; height: 12px; border-radius: 999px; background: #eef2f8; }
.ch-figs.is-mini .ch-fig-track { height: 7px; }
.ch-fig-bar, .ch-fig-range { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--t); }
.ch-fig-range { opacity: .4; border-radius: 0 999px 999px 0; }
.ch-fig-detail { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: #3e4a6b; }
.ch-fig-note { padding: 10px 14px; border-radius: 14px; background: #f5f7fb; border: 1px solid #e3e8f2; font-size: 14px; }
.ch-fig-note strong { font-family: var(--display); font-size: 17px; }
.ch-fig-note span { color: #657086; font-size: 13px; }
.ch-fig-note.is-mini { padding: 6px 10px; font-size: 12px; }

/* tooltip */
.ch-tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: 280px; padding: 9px 12px; border-radius: 12px; background: #0b1533; color: #e6ecf8; font-size: 13px; line-height: 1.45; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 10px 30px rgba(11,21,51,.25); }
.ch-tip strong { display: block; color: #fff; font-size: 13.5px; margin-bottom: 2px; }
.ch-tip-sub { color: #9fb0d4; font-size: 12px; }

/* detail page */
.ch-pager { display: flex; justify-content: space-between; gap: 12px; }
.ch-pager a { display: grid; gap: 2px; max-width: 48%; padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.ch-pager a:hover { border-color: var(--accent); }
.ch-pager span { font-size: 13px; font-weight: 700; color: var(--accent); }
.ch-pager strong { font-size: 15px; line-height: 1.3; }
.ch-pager-next { margin-left: auto; text-align: right; }
.ch-explain { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.ch-explain .pg-card p, .ch-explain .pg-dark p { margin: 0; font-size: 15px; line-height: 1.65; }
.ch-explain .pg-dark .pg-h2 { color: #fff; }
.ch-data { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 0; overflow: hidden; }
.ch-data summary { cursor: pointer; padding: 16px 20px; font-weight: 800; font-size: 17px; list-style-position: inside; }
.ch-data summary span { font-weight: 600; font-size: 14px; color: var(--muted); margin-left: 6px; }
.ch-data-bar { padding: 0 20px 10px; }
.ch-table-wrap { overflow-x: auto; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line); }
.ch-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ch-table caption { text-align: left; padding: 10px 20px; color: var(--muted); font-size: 13px; }
.ch-table th, .ch-table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid #eef2f8; vertical-align: top; }
.ch-table thead th { position: sticky; top: 0; background: #f5f7fb; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: #657086; }
.ch-table tbody th { font-weight: 600; }
.ch-table tbody tr:first-child th { color: var(--accent); }
.ch-sources ul, .ch-others ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.ch-sources li { font-size: 15px; overflow-wrap: anywhere; }
.ch-host { color: var(--muted); font-size: 13px; }
.ch-others-grid { display: grid; gap: 14px 22px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-top: 10px; }
.ch-others-h { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.ch-others-h .ch-gico { width: 30px; height: 30px; border-radius: 10px; }
.ch-others-h .ch-gico svg { width: 16px; height: 16px; }
.ch-others ul { list-style: none; padding: 0; }
.ch-others a { font-size: 15px; }

@media (max-width: 560px) {
  .ch-fav { width: 44px; height: 44px; border-radius: 12px; }
  .ch-hero-head { gap: 12px; }
  .ch-pager a { max-width: 100%; }
  .ch-pager { flex-direction: column; }
  .ch-pager-next { margin-left: 0; }
  .ch-detail { border-radius: 18px; }
  .ch-table th, .ch-table td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-card, .ch-card:hover { transform: none; }
}
