/* Распределение: the press target on Портфель and the overview sheet it opens. */
.alloc { position: relative; padding-right: 36px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.alloc.press:active { transform: scale(.98); }
.alloc-chevron { position: absolute; right: 12px; top: 50%; margin: -8px 0 0; }

:root { --al-other: #aeaeb2; }
:root[data-theme="dark"] { --al-other: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --al-other: #636366; } }

.al-sheet { gap: 14px; }
.al-probe { position: absolute; width: 0; height: 0; visibility: hidden; }

/* Ring */
.al-ring { position: relative; flex: none; width: 54%; max-width: 204px; aspect-ratio: 1; margin: 2px auto 0; container-type: inline-size; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.al-ring > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.al-track { stroke: var(--fill-strong); }
/* Own layers: the draw-in and a press on a slice repaint nothing but the ring. */
.al-art, .al-track-art { will-change: transform, opacity; }
.al-art { transition: opacity .09s ease; }
.al-ring.is-out .al-art { opacity: 0; }
.al-fade { flex: none; display: flex; flex-direction: column; gap: 14px; transition: opacity .2s ease; }
.al-fade.is-out { opacity: 0; transition-duration: .09s; }
.al-center { position: absolute; inset: 15%; display: grid; place-items: center; pointer-events: none; }
.al-c { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; max-width: 100%; }
.al-label { font-size: 13px; line-height: 17px; color: var(--hint); }
.al-value { font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; margin-top: 1px; font-size: 26px; font-size: 11.6cqw; }
.al-value[data-len="m"] { font-size: 23px; font-size: 10cqw; }
.al-value[data-len="l"] { font-size: 19px; font-size: 8.4cqw; }
.al-value[data-len="xl"] { font-size: 16px; font-size: 7cqw; }
.al-change { min-height: 17px; margin-top: 3px; }
.al-logo { display: block; margin-bottom: 5px; }
.al-chosen-share { font-family: var(--font-display); font-size: 26px; font-size: 11.6cqw; font-weight: 700; letter-spacing: -.025em; }
.al-chosen-usd { font-size: 13px; line-height: 17px; color: var(--hint); margin-top: 1px; }
.al-chosen-usd .roll-col { transition-duration: .36s; }
.al-chosen-share .roll-col { transition-duration: .36s; }

/* The icon stands in for a logo where there is no coin. */
.al-tile { flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; }
.al-tile--other { background: var(--fill-strong); color: var(--hint); }

/* Summary */
.al-stats { display: grid; grid-template-columns: auto auto minmax(0, 1fr); }
.al-stats[hidden] { display: none; }
.al-stat { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }
.al-stat + .al-stat { box-shadow: inset .5px 0 0 var(--sep); }
.al-stat > span { font-size: 12px; line-height: 16px; color: var(--hint); white-space: nowrap; }
.al-stat > b { display: flex; align-items: center; gap: 5px; min-height: 20px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-stat em { font-style: normal; }
.al-stat .is-up, .al-stat > b.is-up { color: var(--green); }
.al-stat > b.is-down { color: var(--red); }

/* Rows */
.al-row { content-visibility: auto; contain-intrinsic-size: auto 76px; --sep-left: 68px; align-items: flex-start; padding: 11px 16px 12px; transition: background-color .24s ease; }
/* The rows a rising sheet brings into view are laid out before it moves, not on the frame they appear. */
.al-row:nth-child(-n+4) { content-visibility: visible; }
.al-row.is-on { background: var(--fill); background: color-mix(in srgb, var(--c) 14%, transparent); }
.al-row-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.al-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.al-name { flex: 0 1 auto; min-width: 0; font-size: 16px; line-height: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-usd { flex: none; font-size: 15px; line-height: 21px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-sub { font-size: 13px; line-height: 17px; color: var(--hint); }
.al-amt { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.al-chg { flex: none; }
.al-barline { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.al-bar { flex: 1 1 0; min-width: 0; display: block; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.al-bar i { display: block; height: 100%; background: var(--c); transform: scaleX(0); transform-origin: left center; transition: transform .6s var(--ease-out); }
.al-share { flex: none; min-width: 42px; font-size: 12px; line-height: 14px; color: var(--hint); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .al-art, .al-fade, .al-bar i { transition: none; }
}
