/* Article "Russian IPOs since 2020: the results" (/articles/russia-ipo-results/), on top of style.css and
   articles.css. Classes start with .rp-. The charts are plain HTML bars and one SVG drawn when the site is
   built; the two live tables are TradingView's widget (js/tv-widgets.js). */

.rp .art-sec ul { margin: 0 0 16px; padding-left: 22px; }
.rp .art-sec li { margin: 0 0 9px; text-wrap: pretty; }
.rp .art-sec h3 { margin-top: 26px; }
.art > .rp-more { margin-top: 18px; }
.art > .rp-foot, .rp-live .rp-foot { max-width: var(--wide); margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.rp-notes li { font-size: 16px; }
.rp-src { font-size: 14.5px; padding-left: 22px; columns: 2 320px; column-gap: 32px; }
.rp-src li { margin: 0 0 4px; break-inside: avoid; }

/* tables */
.rp-table td, .rp-table thead th { text-align: left; vertical-align: top; }
.rp-table td.num, .rp-table td:nth-child(2) { white-space: nowrap; }
.rp-table th[scope="row"] { min-width: 150px; white-space: normal; }
.rp-table th small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.rp-table sup { color: var(--muted); }
.rp-yr th { background: var(--surface-2); font: 650 14.5px/1.2 var(--mono); color: var(--ink); }
.rp-total th, .rp-total td { font-weight: 650; color: var(--ink); }
.rp-names { font-size: 14.5px; color: var(--ink-2); min-width: 260px; }
.rp-srcs { font-size: 13.5px; min-width: 130px; }
.rp-how { min-width: 220px; font-size: 14.5px; }
.rp-band { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13.5px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.rp-b-top { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--ink); }
.rp-b-low { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--ink); }

/* offerings a year: two small column charts side by side */
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.rp-cap { margin: 0 0 6px; font: 600 14.5px/1.3 var(--font); color: var(--ink-2); }
.rp-years { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 220px; }
.rp-y { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.rp-y b { font: 650 14.5px/1.2 var(--mono); color: var(--ink); padding-bottom: 5px; white-space: nowrap; }
.rp-y i { display: block; flex: none; width: 72%; max-width: 60px; height: calc((100% - 50px) * var(--h)); min-height: 2px; border-radius: 6px 6px 0 0; }
.rp-y span { font: 500 13.5px/1.2 var(--font); color: var(--muted); padding-top: 6px; white-space: nowrap; }
.rp-n { background: var(--spx); } .rp-sum { background: var(--home); }

/* the timeline of offerings */
.rp-bub { overflow-x: auto; }
.rp-bub-svg { display: block; width: 100%; min-width: 620px; height: auto; }
.rp-grid { stroke: var(--line); stroke-width: 1; }
.rp-ax { font: 500 13px var(--font); fill: var(--muted); }
.rp-lab { font: 650 11px var(--mono); fill: var(--surface); pointer-events: none; }
.rp-bub-svg circle { stroke: var(--surface); stroke-width: 1; fill-opacity: 0.9; }
circle.rp-m-in { fill: var(--spx); } circle.rp-m-out { fill: var(--gold); } circle.rp-m-mix { fill: var(--home); } circle.rp-m-na { fill: var(--muted); }
.sw-sq.rp-m-in { background: var(--spx); } .sw-sq.rp-m-out { background: var(--gold); } .sw-sq.rp-m-mix { background: var(--home); } .sw-sq.rp-m-na { background: var(--muted); }
.rp-legend { margin: 2px 0 12px; }

/* how much of an order was filled */
.rp-rows { display: grid; gap: 8px; }
.rp-row { display: grid; grid-template-columns: minmax(130px, 230px) minmax(60px, 1fr) 96px; gap: 12px; align-items: center; }
.rp-rl { font: 500 15px/1.25 var(--font); color: var(--ink-2); }
.rp-rl small { color: var(--muted); }
.rp-bar { display: block; height: 22px; background: var(--track); border-radius: 6px; overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 6px; min-width: 4px; }
.rp-f-one { background: var(--spx); }
.rp-f-rng { background: repeating-linear-gradient(45deg, var(--spx) 0 4px, color-mix(in srgb, var(--spx) 45%, transparent) 4px 8px); }
.rp-row b { font: 650 15px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }

/* the Bank of Russia's table as bars from zero */
.art > .rp-narrow { max-width: var(--col); }
.rp-cbt td, .rp-cbt thead th:not(:first-child) { text-align: right; }
.rp-cb { display: grid; gap: 6px; }
.rp-crow { display: grid; grid-template-columns: minmax(120px, 250px) minmax(80px, 1fr) 64px 64px; gap: 12px; align-items: center; }
.rp-chead b, .rp-chead .rp-idx { font: 600 12.5px/1.2 var(--font); color: var(--muted); text-align: right; white-space: normal; }
.rp-div { position: relative; display: block; height: 20px; background: linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat, var(--track); border-radius: 6px; }
.rp-div i { position: absolute; top: 0; bottom: 0; min-width: 2px; }
.rp-div i.rp-neg { border-radius: 6px 0 0 6px; } .rp-div i.rp-pos { border-radius: 0 6px 6px 0; }
.rp-neg { background: var(--bad); } .rp-pos { background: var(--good); }
.rp-div u { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }
.rp-tick { display: inline-block; width: 3px; height: 14px; background: var(--ink); border-radius: 2px; margin-right: 7px; vertical-align: -2px; }
.rp-crow b { font: 650 15px/1.2 var(--mono); text-align: right; white-space: nowrap; }
.rp-crow b.rp-dn { color: var(--bad); } .rp-crow b.rp-up { color: var(--good); }
.rp-crow .rp-idx { font: 500 14px/1.2 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }

/* the live tables: TradingView's widget, as tall as its rows (--rows, set by js/tv-widgets.js) */
.art > .rp-live { margin-top: 22px; }
.rp-live h3 { margin: 0 0 10px; }
.rp-seg { margin: 0 0 10px; flex-wrap: wrap; }
.rp-tv { height: calc(98px + var(--rows, 8) * 37px); max-width: 620px; padding: 0; overflow: hidden; }
.rp-tv .tradingview-widget-container, .rp-tv .tradingview-widget-container__widget { height: 100%; }
.rp-tv iframe { color-scheme: normal; }

@media (max-width: 720px) {
  .rp-two { grid-template-columns: 1fr; gap: 18px; }
  .rp-years { height: 180px; gap: 4px; }
  .rp-row { grid-template-columns: minmax(96px, 130px) minmax(40px, 1fr) 84px; gap: 8px; }
  .rp-rl { font-size: 14px; }
  .rp-crow { grid-template-columns: minmax(84px, 120px) minmax(50px, 1fr) 48px 44px; gap: 6px; }
  .rp-crow b { font-size: 14px; } .rp-crow .rp-idx { font-size: 13px; }
}
