/* Ribonanza post. Everything shared with the IceCube post comes from ../icecube/ice.css; only the two figures that are new live here. */
#rna-hero .ice-h-stage canvas { cursor: crosshair; }
#rna-hero .ice-h-side .note { height: 4.7em; overflow: hidden; }
/* nothing in the panel may change height while the figure plays, or the canvas beside it would move */
#rna-hero .rna-h { align-items: start; }
#rna-hero .ice-h-side .kind { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rna-hero .rna-ex { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rna-hero .ice-h-ttl { min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rna-hero .ice-h-side .stats dd { white-space: nowrap; }
@media (max-width: 860px) { #rna-hero .ice-h-side .note { height: 6.3em; } }
/* four numbers in a row; on a small phone the base counts take a row of their own, so nothing runs past the column */
#rna-hero .ice-h-side .stats { grid-template-columns: repeat(4, auto); }
@media (max-width: 360px) { #rna-hero .ice-h-side .stats { grid-template-columns: repeat(3, auto); } }

/* the opening P keeps its place before dropcap.js draws it, so the first paragraph does not reflow; it sits at the same left edge on every screen */
.cap.rna-cap { float: left; width: 104px; height: 126px; margin: 2px 10px 0 -14px; -webkit-tap-highlight-color: transparent; }
.cap.rna-cap:not(.on) { font: 700 112px/126px var(--fig); color: var(--fig-ink-3); text-align: center; }

/* on a phone a long column name in the first table may break after an underscore (the empty .rna-wb spans), and only there */
@media (max-width: 620px) { .rna-wb::after { content: "\200B"; } }

/* the pairing matrix beside its readout */
.rna-mix { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: center; }
.rna-mat canvas { display: block; width: 100%; cursor: crosshair; touch-action: pan-y; border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent); -webkit-tap-highlight-color: transparent; }
.rna-say { min-height: 236px; }
.rna-say .k { font: 500 10.5px/1.3 var(--mono) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px !important; }
.rna-say .kind { font: 500 21px/1.2 var(--mono); color: var(--ink); margin: 0 0 8px; }
.rna-say .note { font: 400 12px/1.55 var(--mono) !important; color: var(--ink-2); margin: 0 0 14px !important; }
.rna-w { position: relative; display: grid; grid-template-columns: 3.2em 1em 1fr; gap: 6px; align-items: baseline; padding: 7px 0 9px; border-top: 1px solid var(--line); font: 400 12.5px/1.3 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rna-w b { color: var(--ink); font-weight: 500; }
.rna-w em, .rna-w i { font-style: normal; }
.rna-w u { position: absolute; left: 0; bottom: 3px; height: 2px; background: var(--ink); text-decoration: none; transition: width .35s cubic-bezier(.22,1,.36,1); }
@media (max-width: 620px) { .rna-mix { grid-template-columns: 1fr; gap: 18px; } .rna-mat { max-width: 340px; } }
/* on a phone the readout sits under the matrix, so it keeps the height of its longest row (four partners) and the caption below never jumps */
@media (max-width: 620px) { #rna-mix .rna-say { min-height: 264px; } }
@media (max-width: 374px) { #rna-mix .rna-say { min-height: 282px; } }
@media (prefers-reduced-motion: reduce) { .rna-w u { transition: none; } }

/* diagram type: two sizes only. Labels are 11px, notes are 9.5px, and every diagram is drawn at the same scale (see sizeCss in rna.js). */
.ice-dia svg { min-width: 0; }
.ice-dia .d-in, .ice-dia .d-title, .ice-dia .d-mult, .ice-dia .d-name, .ice-dia .d-math { font-size: 11px; font-weight: 500; letter-spacing: .12em; }
.ice-dia .d-title, .ice-dia .d-mult { font-weight: 600; }
.ice-dia .d-subin, .ice-dia .d-sub { font-size: 9.5px; font-weight: 400; letter-spacing: .1em; }
.ice-dia .d-new { font-size: 8.5px; font-weight: 600; letter-spacing: .14em; }
.ice-dia .d-math { fill: var(--ink-2); font-style: italic; letter-spacing: .04em; text-transform: none; }
/* drawn at full size on a phone (ice.css sets the small labels to 10.5px there); the notes inside cards stay at 10px so they fit their cards */
.ice-dia.ice-dia-px .d-subin { font-size: 10px; }

/* the bars of a reactivity profile rise one after another, each time the flow reaches that card and when it is hovered */
.ice-dia .d-bar { transform-box: fill-box; transform-origin: 50% 100%; }
.ice-dia .d-it.act .d-bar, .ice-dia .d-it.is .d-bar { animation: d-bar .75s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes d-bar { 0% { transform: scaleY(.04); filter: brightness(1); } 55% { filter: brightness(1.9); } 100% { transform: scaleY(1); filter: brightness(1); } }
@media (prefers-reduced-motion: reduce) { .ice-dia .d-it.act .d-bar, .ice-dia .d-it.is .d-bar { animation: none; } }
