/* «23 пари» · перемикач мови, посилання на джерела, порада дня та об’ємні (3D) інтерактивні елементи.
   Підключається після calendar.css і користується його змінними. */

/* ---------- Перемикач мови ---------- */
.lang { display: inline-flex; padding: 3px; border-radius: 7px; background: rgba(19, 53, 71, .1); box-shadow: inset 0 1px 2px rgba(11, 37, 50, .14); flex: none; }
.lang button { height: 30px; padding: 0 11px; border-radius: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.lang button[aria-pressed="true"] { background: linear-gradient(180deg, #fff, #EEF6FA); color: var(--navy-900); box-shadow: 0 1px 0 rgba(11, 37, 50, .22), 0 3px 6px rgba(11, 37, 50, .12); }
.lang button:not([aria-pressed="true"]):hover { color: var(--navy-900); }
.strip.t4 .brand { flex-direction: row; align-items: center; gap: 8px; }
.strip.t4 .brand img { width: 18px; object-fit: cover; object-position: left center; }
.strip.t5 .brand .ttl { display: none; }

/* ---------- Об’ємні елементи керування ---------- */
.pill, .icon-btn { box-shadow: 0 1px 0 rgba(11, 37, 50, .16), 0 3px 8px rgba(11, 37, 50, .07); }
.icon-btn { background: linear-gradient(180deg, #fff, #EEF6FA); }
.icon-btn:active { transform: translateY(1px); box-shadow: 0 0 0 rgba(11, 37, 50, .16); }
.pill.date { box-shadow: 0 2px 0 #04121A, 0 5px 12px rgba(11, 37, 50, .22); }
.pill.date.is-preview { box-shadow: 0 2px 0 #C96A2B, 0 5px 12px rgba(201, 106, 43, .2); }
.in-go, .viz-btn, .btn { background: linear-gradient(180deg, #1D4C66, #133547); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 0 #071A24, 0 6px 12px rgba(11, 37, 50, .22); }
.btn { color: #fff; }
.inside:hover .in-go, .viz-btn:hover, .btn:hover { background: linear-gradient(180deg, #2A7BA6, #1E658C); }
.viz-btn:active, .btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 #071A24; }
.flap { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(3, 14, 20, .22), 0 8px 20px rgba(2, 12, 18, .5); }
.wins:not(.pre) .win.locked .flap { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 -3px 0 rgba(3, 14, 20, .28), 0 4px 12px rgba(2, 12, 18, .35); }
.win.today .flap { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(160, 70, 10, .35), 0 0 0 3px rgba(255, 181, 117, .5), 0 10px 26px rgba(2, 12, 18, .55); }

/* ---------- Картка графіка ---------- */
.viz { position: relative; margin: 22px 0 0; padding: 20px 20px 14px; border-radius: 10px; background: linear-gradient(180deg, #FFFFFF, #F5FAFD); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(11, 37, 50, .08), 0 14px 34px rgba(11, 37, 50, .1); }
.viz::before { content: ""; position: absolute; left: 20px; top: -1px; width: 46px; height: 5px; border-radius: 0 0 3px 3px; background: var(--peach-500); }
.viz h3 { font-size: 20px; font-weight: 600; color: var(--navy-900); margin-top: 4px; }
.viz .sub { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); margin-top: 5px; }
.viz-stage { margin-top: 14px; }
.viz-stage svg { display: block; max-width: 100%; overflow: visible; }
.fx-scene { transform: perspective(900px) rotateX(calc(var(--ty, 0) * 1deg)) rotateY(calc(var(--tx, 0) * 1deg)); transform-origin: 50% 60%; transition: transform .28s ease-out; will-change: transform; }
.viz figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12px; line-height: 1.5; color: var(--muted); }
.viz-read { min-height: 2.85em; margin-top: 10px; font-family: var(--font-head); font-size: 15.5px; font-weight: 500; line-height: 1.4; color: var(--navy-900); }
.viz-note { margin-top: 10px; padding: 9px 12px; border-radius: 6px; background: var(--ice); border-left: 3px solid var(--sky-300); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.viz-note[hidden] { display: none; }
.viz-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.viz-tiles div { padding: 12px 14px; border-radius: 8px; background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line-2); box-shadow: 0 2px 0 rgba(11, 37, 50, .07); }
.viz-tiles b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.15; color: var(--navy-900); }
.viz-tiles span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.viz-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px 0 12px; border-radius: 6px; color: #fff; font-size: 13.5px; font-weight: 600; transition: background .2s, transform .1s, box-shadow .1s; }
.viz-btn .ic { width: 18px; height: 18px; display: grid; place-items: center; }
.viz-btn svg { width: 16px; height: 16px; }
.viz-btn .i-pause, .viz-btn.is-on .i-play { display: none; }
.viz-btn.is-on .i-pause { display: inline; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 5px; margin-bottom: 14px; border-radius: 8px; background: rgba(19, 53, 71, .09); box-shadow: inset 0 1px 3px rgba(11, 37, 50, .16); }
.seg3.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg3.one { display: none; }
.seg3 button { padding: 8px 6px; border-radius: 5px; text-align: center; line-height: 1.2; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s, transform .1s; }
.seg3 button b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 15px; color: inherit; }
.seg3 button small { display: block; margin-top: 2px; font-size: 11.5px; }
.seg3 button[aria-pressed="true"] { background: linear-gradient(180deg, #1D4C66, #133547); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 0 #071A24, 0 6px 12px rgba(11, 37, 50, .24); transform: translateY(-1px); }
.seg3 button:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .8); color: var(--navy-900); }
.vz-lab { font-family: var(--font-body); font-size: 11.5px; fill: var(--ink-2); }
.vz-strong { font-weight: 600; fill: var(--navy-900); }
.vz-peach { fill: #B4541A; font-weight: 600; }

/* ---------- 1. Фолат ---------- */
.fl-val { font-family: var(--font-head); font-size: 22px; font-weight: 600; fill: var(--navy-900); }
.fl-ring { fill: none; stroke: var(--link); stroke-width: 2.6; stroke-dasharray: 8 9; stroke-linecap: round; }
.fl-dist { margin-top: 14px; }
.fl-dist > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.fl-bar { display: flex; gap: 3px; height: 16px; margin-top: 7px; }
.fl-bar i { min-width: 0; border-radius: 4px; background: linear-gradient(180deg, #DDEEF6, #B4D5E5); box-shadow: 0 2px 0 rgba(11, 37, 50, .12); transition: background .3s; }
.fl-bar i.on { background: linear-gradient(180deg, #3C8DB6, #1E658C); box-shadow: 0 2px 0 #0F3D58; }
.fl-keys { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 9px; }
.fl-keys button { padding: 3px 0; font-size: 12.5px; color: var(--ink-2); }
.fl-keys button b { font-family: var(--font-head); font-weight: 700; color: var(--navy-900); }
.fl-keys button.on, .fl-keys button.on b { color: var(--link); }

/* ---------- 2а. Злиття хромосом ---------- */
.fu-rod { fill: url(#fx-tube); stroke: rgba(11, 37, 50, .28); stroke-width: 1; }
.fu-a, .fu-b { transition: transform .9s var(--ease); }
.is-human .fu-a { transform: translateX(var(--shift)); }
.is-human .fu-b { transform: translateX(calc(var(--shift) * -1)); }
.fu-tel path { fill: url(#fx-tube-peach); stroke: #B95A1B; stroke-width: 1; }
.fu-in { transform-box: fill-box; transition: transform .9s var(--ease); }
.fu-a .fu-in { transform-origin: 100% 50%; }
.fu-b .fu-in { transform-origin: 0 50%; }
.is-human .fu-in { transform: scaleX(.42); opacity: 0; transition: transform .9s var(--ease), opacity .3s .8s; }
.fu-join { opacity: 0; transition: opacity .25s; }
.is-human .fu-join { opacity: 1; transition: opacity .4s .75s; }
.fu-name, .fu-h2 { font-family: var(--font-head); font-weight: 700; font-size: 14px; fill: var(--navy-900); }
.fu-name { transition: opacity .4s; }
.is-human .fu-name { opacity: 0; }
.fu-h2 { opacity: 0; transition: opacity .5s; }
.is-human .fu-h2 { opacity: 1; transition-delay: .5s; }
.fu-smooth { opacity: 0; stroke: rgba(11, 37, 50, .6); stroke-width: 1.2; stroke-dasharray: 3 3; transition: opacity .5s; }
.is-human .fu-smooth { opacity: 1; transition-delay: .5s; }
.fu-leg { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.fu-leg li { display: flex; align-items: baseline; gap: 8px; }
.fu-leg i { flex: none; display: inline-block; width: 14px; height: 10px; border-radius: 2px; transform: translateY(1px); }
.fu-leg .k-tel { background: linear-gradient(180deg, #FFC48C, #F08A43); border-radius: 5px 2px 2px 5px; }
.fu-leg .k-scar { width: 6px; margin: 0 4px; background: linear-gradient(180deg, #FFC48C, #F08A43); }
.fu-leg .k-old { background: #6DB7D1; outline: 1.2px dashed rgba(11, 37, 50, .6); outline-offset: -1px; }
.fu-only-h { opacity: 0; transition: opacity .5s; }
.is-human .fu-only-h { opacity: 1; transition-delay: .7s; }

/* ---------- 2б. Лактаза: склянки ---------- */
.lc-panel { padding: 14px 8px 10px; border-radius: 8px; background: radial-gradient(500px 240px at 12% 0%, rgba(66, 157, 181, .32), rgba(66, 157, 181, 0) 70%), linear-gradient(160deg, #0B2532, #133547 60%, #1B4A63); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 #04121A; }
.lc-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.lc-item { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 6px; color: #fff; transition: background .2s, transform .2s; }
.lc-item:hover, .lc-item.on { background: rgba(255, 255, 255, .11); }
.lc-item.on { transform: translateY(-3px); }
.lc-item:focus-visible { outline-color: #fff; }
.lc-item svg { width: clamp(38px, 78%, 62px); height: auto; }
.lc-val { font-family: var(--font-head); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.lc-rim { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 1.5; transition: stroke .2s; }
.lc-item.on .lc-rim { stroke: var(--peach-500); }
.lc-name { min-height: 2.5em; font-size: 11px; line-height: 1.25; text-align: center; color: rgba(255, 255, 255, .88); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }

/* ---------- 3. Програма профілактики діабету ---------- */
.dp-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.dp-num { font-family: var(--font-head); font-weight: 300; font-size: 46px; line-height: 1; letter-spacing: -.03em; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.dp-read span { max-width: 22ch; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.dp-cut { margin-left: auto; padding: 5px 11px; border-radius: 5px; background: linear-gradient(180deg, #1D4C66, #133547); box-shadow: 0 2px 0 #071A24; color: #fff; font-style: normal; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dp-cut[hidden] { display: none; }
.dp-p circle, .dp-p path, .sh-b { fill: url(#fx-ball-ice); }
.dp-p.on circle, .dp-p.on path, .sh-b.on { fill: url(#fx-ball-peach); }
.dp-p.on, .sh-b.on { animation: fxPop .35s var(--ease) both; animation-delay: calc(var(--i) * 7ms); }
@keyframes fxPop { 0% { opacity: .2; } 60% { opacity: 1; } }
.dp-scale { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.dp-scale h4 { margin-bottom: 4px; font-family: var(--font-body); font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--link); }
.dp-row { margin-top: 10px; }
.dp-lab { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 500; color: var(--navy-900); }
.dp-lab b { font-family: var(--font-head); font-weight: 700; }
.dp-track { --z: 66%; position: relative; height: 22px; margin-top: 5px; border-radius: 4px; background: var(--ice); box-shadow: inset 0 1px 3px rgba(11, 37, 50, .16); }
.dp-track::after { content: ""; position: absolute; left: var(--z); top: -4px; bottom: -4px; width: 1.6px; background: var(--navy-900); }
.dp-track i { position: absolute; top: 2px; bottom: 2px; width: 0; border-radius: 3px; transition: width 1s var(--ease) .2s; }
.dp-pos { left: var(--z); background: linear-gradient(180deg, #FFD3A6, #FF9D45 45%, #D9772F); }
.dp-neg { right: calc(100% - var(--z)); background: linear-gradient(180deg, #7CC0DC, #1E658C 45%, #124A69); }
.is-in .dp-track i { width: calc(var(--w) * var(--k, 1.1) * 1%); }
.dp-axis { position: relative; height: 16px; margin-top: 5px; }
.dp-axis span { position: absolute; left: 66%; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- 4. Добовий годинник ---------- */
.ck-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ck-wrap.wide { flex-direction: row; gap: 24px; }
.ck { flex: none; margin: 6px 0 14px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ck:active { cursor: grabbing; }
.ck:focus-visible { outline: 2px solid var(--link); outline-offset: 6px; border-radius: 50%; }
.ck-h { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; fill: var(--ink-2); }
.ck-side { flex: 1 1 auto; min-width: 0; width: 100%; }
.ck-time { display: flex; align-items: baseline; gap: 10px; }
.ck-time b { font-family: var(--font-head); font-weight: 300; font-size: 44px; line-height: 1; letter-spacing: -.03em; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.ck-time span { font-size: 14px; font-weight: 600; color: var(--link); }
.ck-side .viz-read { min-height: 4.2em; margin-top: 8px; }
.ck-bars { display: grid; gap: 10px; }
.ck-bars span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.ck-bars span i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.ck-bars span em { font-style: normal; }
.ck-track { height: 10px; margin-top: 5px; border-radius: 3px; background: var(--sky-100); box-shadow: inset 0 1px 2px rgba(11, 37, 50, .18); overflow: hidden; }
.ck-track i { display: block; width: 0; height: 100%; border-radius: 3px; }
.ck-ba { background: linear-gradient(180deg, #7CC0DC, #1E658C 50%, #124A69); }
.ck-bp { background: linear-gradient(180deg, #FFD3A6, #E07B2A 50%, #B95A1B); }
.ck-play { margin-top: 14px; }

/* ---------- 5. Теломери ---------- */
.tl-body { fill: url(#fx-tube); stroke: rgba(11, 37, 50, .28); }
.is-dead .tl-body { fill: url(#fx-tube-grey); }
.tl-bead { transform-box: fill-box; transform-origin: 50% 50%; transition: opacity .3s, transform .3s; }
.tl-bead rect { fill: url(#fx-tube-peach); stroke: #B95A1B; stroke-width: .8; }
.tl-bead text { font-family: var(--font-body); font-weight: 700; fill: #5A2A08; }
.tl-bead.gone { opacity: 0; transform: scaleY(.25); }
.tl-enz { opacity: 0; transition: opacity .3s; }
.is-on .tl-enz { opacity: 1; }
.tl-enz circle { fill: url(#fx-ball); transform-box: fill-box; transform-origin: center; }
.tl-enz path { stroke: var(--link); stroke-width: 2; }
.is-on .tl-enz circle { animation: tlPulse 1.4s ease-in-out infinite; }
@keyframes tlPulse { 50% { transform: scale(1.2); } }
.tl-state { font-size: 12.5px; font-weight: 600; fill: var(--navy-900); }
.tl-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; margin-top: 4px; }
.tl-range { grid-column: 1 / -1; display: block; }
.tl-range span { font-size: 13px; color: var(--ink-2); }
.tl-range b { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.tl-range input { display: block; width: 100%; height: 26px; margin: 6px 0 0; accent-color: var(--link); }
.tl-switch { justify-self: end; display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 9px; border-radius: 6px; background: linear-gradient(180deg, #fff, #EEF6FA); box-shadow: 0 1px 0 rgba(11, 37, 50, .2), 0 3px 8px rgba(11, 37, 50, .08); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.tl-switch i { position: relative; flex: none; width: 34px; height: 20px; border-radius: 5px; background: #93AAB6; box-shadow: inset 0 1px 2px rgba(11, 37, 50, .3); transition: background .2s; }
.tl-switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #fff, #E3EEF4); box-shadow: 0 1px 2px rgba(11, 37, 50, .35); transition: transform .2s; }
.tl-switch[aria-checked="true"] i { background: var(--link); }
.tl-switch[aria-checked="true"] i::after { transform: translateX(14px); }
.viz-telomere .viz-read:empty { min-height: 0; margin: 0; }

/* ---------- Об’ємні стовпчики ---------- */
.b3 { cursor: pointer; outline: none; }
.b3 .b3-g { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.02); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 90ms); }
.is-in .b3 .b3-g { transform: scaleY(1); }
.b3 .b3-side { fill: url(#fx-cyl); }
.b3 .b3-top { fill: #BFEAF5; }
.b3.on .b3-side { fill: url(#fx-cyl-peach); }
.b3.on .b3-top { fill: #FFE2C4; }
.b3 .b3-v { font-family: var(--font-body); font-size: 16.5px; font-weight: 700; fill: var(--navy-900); text-anchor: middle; }
.b3 .b3-k { font-family: var(--font-body); font-size: 11.5px; fill: var(--ink-2); text-anchor: middle; }
.b3.on .b3-k { fill: var(--navy-900); font-weight: 600; }
.b3:focus-visible .b3-top { stroke: var(--navy-900); stroke-width: 2; }

/* ---------- Частка зі 100 ---------- */
.sh-read { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.sh-read b { font-family: var(--font-head); font-weight: 300; font-size: 46px; line-height: 1; letter-spacing: -.03em; color: var(--navy-900); }
.sh-read span { font-size: 13px; line-height: 1.3; color: var(--ink-2); }

/* ---------- Група крові: два алелі ---------- */
.pk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; }
.pk-rows { display: grid; gap: 10px; }
.pk-row > span { display: block; margin-bottom: 5px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.pk-row .seg3 { margin: 0; }
.pk-out { text-align: center; }
.pk-out small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.pk-letter { font-family: var(--font-head); font-size: 38px; font-weight: 700; fill: #fff; text-anchor: middle; }

/* ---------- Картки-перевертні ---------- */
.fc-hint { margin: -4px 0 10px; font-size: 12.5px; color: var(--muted); }
.fc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; perspective: 1100px; }
.viz-flip .viz-stage { container-type: inline-size; }
.fc { position: relative; display: grid; text-align: left; }
.fc-in { display: grid; min-height: 176px; transform-style: preserve-3d; transition: transform .7s var(--ease); }      /* обидві сторони в одній клітинці: висоту задає довший текст */
.fc[aria-pressed="true"] .fc-in { transform: rotateY(180deg); }
@media (hover: hover) {
  .fc:hover .fc-in { transform: rotateY(-12deg) translateZ(4px); }
  .fc[aria-pressed="true"]:hover .fc-in { transform: rotateY(168deg) translateZ(4px); }
}
.fc-f, .fc-b { grid-area: 1 / 1; min-width: 0; padding: 14px; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.fc-f { color: #fff; background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%), linear-gradient(160deg, #2A7BA6, #123F5C); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(3, 14, 20, .25), 0 10px 22px rgba(11, 37, 50, .28); }
.fc:nth-child(2) .fc-f { background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%), linear-gradient(160deg, #24809A, #0F4A60); }
.fc:nth-child(3) .fc-f { background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%), linear-gradient(160deg, #1D4C66, #0B2532); }
.fc-f i { font-family: var(--font-head); font-style: normal; font-weight: 300; font-size: 40px; line-height: 1; opacity: .5; }
.fc-f b { margin-top: auto; font-family: var(--font-head); font-weight: 600; font-size: 16.5px; line-height: 1.25; }
.fc-b { transform: rotateY(180deg); justify-content: center; background: linear-gradient(180deg, #fff, #EDF6FA); border: 1px solid var(--line); box-shadow: inset 0 -4px 0 rgba(11, 37, 50, .08), 0 10px 22px rgba(11, 37, 50, .18); font-size: 13.5px; line-height: 1.45; color: var(--navy-900); }

/* ---------- Посилання на джерела біля фактів ---------- */
sup.ref { font-size: .66em; line-height: 0; margin-left: 2px; vertical-align: super; }
sup.ref a { display: inline-block; min-width: 1.6em; padding: .12em .4em; border-radius: 4px; background: var(--sky-100); color: var(--link); font-family: var(--font-body); font-style: normal; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; transition: background .2s, color .2s; }
sup.ref a:hover { background: var(--link); color: #fff; }
.callout sup.ref a { background: rgba(255, 255, 255, .75); color: #7A4517; }
.callout sup.ref a:hover { background: #7A4517; color: #fff; }
.standfirst sup.ref { font-size: .58em; }
.refs { margin: 0; padding-left: 1.6em; display: grid; gap: 5px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.refs a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(30, 101, 140, .35); text-underline-offset: 2px; }
.refs a:hover { text-decoration-color: currentColor; }
.c-refs { margin-top: 24px; }

/* ---------- Порада дня за генотипом або групою ---------- */
.tip { margin-top: 22px; padding: 18px 18px 16px; border-radius: 10px; background: linear-gradient(180deg, #FFFFFF, #F5FAFD); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(11, 37, 50, .08), 0 14px 34px rgba(11, 37, 50, .1); }
.tip > h4 { margin-bottom: 2px; }
.tip-pick { margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.tip .seg3 { margin-bottom: 12px; }
.tip-t { min-height: 2.8em; font-family: var(--font-head); font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--navy-900); }
.tip .hf { background: var(--ice); }
.tip-n { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Гени з посиланням на пакет ---------- */
a.chip { text-decoration: none; box-shadow: 0 2px 0 rgba(11, 37, 50, .1); transition: border-color .2s, background .2s, transform .1s, box-shadow .1s; }
a.chip svg { flex: none; width: 10px; height: 10px; opacity: .5; transition: opacity .2s; }
a.chip:hover { border-color: var(--link); background: var(--sky-100); }
a.chip:hover svg { opacity: 1; }
a.chip:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(11, 37, 50, .1); }
.chips-note { margin: -2px 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Шрифти: Unbounded для чисел і заголовків, Manrope для тексту (резерв: Raleway та Inter) ---------- */
:root { --font-head: "Unbounded", "Raleway", "Helvetica Neue", Arial, sans-serif; --font-body: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pill b, .k-tip b, .k-tip em, .in-gene, .chip em, .geneline em, .standfirst, .viz-read, .tip-t, .fc-f b, .seg3 button b, .fl-keys button b, .dp-lab b, .tl-range b, .fu-name, .fu-h2, .about li::before, .lc-val, .gene-h em { font-family: var(--font-body); }
.in-gene, .geneline em, .chip em { font-weight: 800; }
.standfirst { font-weight: 600; font-size: 17.5px; line-height: 1.45; }
.viz-read, .tip-t { font-weight: 600; }
.seg3 button b { font-weight: 700; font-size: 14px; }
.pill b { font-weight: 800; font-size: 14px; }
.lc-val { font-weight: 800; font-size: 17px; }
.f-num { font-weight: 300; letter-spacing: -.05em; font-size: clamp(21px, 37cqmin, 104px); }
.s21 .f-num { font-size: clamp(23px, 42cqmin, 104px); }
.brand .ttl b { font-size: 15px; font-weight: 500; letter-spacing: -.02em; }
.m-day { font-size: 12.5px; font-weight: 500; }
.m-title { font-size: clamp(21px, 2.5vw, 32px); font-weight: 500; letter-spacing: -.03em; line-height: 1.22; }
.about h2 { font-size: clamp(20px, 2.7vw, 29px); font-weight: 500; letter-spacing: -.03em; line-height: 1.22; }
.viz h3 { font-size: 16.5px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.ideo .big { font-size: 76px; font-weight: 200; letter-spacing: -.06em; }
.ideo .big small { font-family: var(--font-body); letter-spacing: 0; }
.ideo .i-facts b { font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.dp-num, .sh-read b, .ck-time b { font-size: 38px; font-weight: 300; letter-spacing: -.05em; }
.fl-val { font-size: 18px; font-weight: 500; }
.viz-tiles b { font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.fc-f i { font-size: 34px; font-weight: 200; }
.pk-letter { font-size: 32px; font-weight: 600; }

/* ---------- Наочні схеми роботи білків ---------- */
.mh-n text { font-family: var(--font-body); font-size: 11px; font-weight: 800; fill: #fff; }
.viz-stage svg.mh-present { overflow: hidden; border-radius: 8px; background: linear-gradient(180deg, #F6FBFD, #EAF4F9); }
.mh-leg { list-style: none; counter-reset: mh; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.mh-leg li { counter-increment: mh; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: start; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.mh-leg li::before { content: counter(mh); width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; background: var(--navy-900); box-shadow: 0 2px 0 #04121A; color: #fff; font-size: 11.5px; font-weight: 800; }
.mh-sub { animation: mhIn 3.4s ease-in-out infinite; }
.mh-prod { animation: mhOut 3.4s ease-in-out infinite; }
@keyframes mhIn { 0% { transform: translateX(0); opacity: 1; } 42% { transform: translateX(var(--dx)); opacity: 1; } 50%, 100% { transform: translateX(var(--dx)); opacity: 0; } }
@keyframes mhOut { 0%, 46% { transform: translateX(0); opacity: 0; } 56% { transform: translateX(0); opacity: 1; } 94% { transform: translateX(var(--dx)); opacity: 1; } 100% { transform: translateX(var(--dx)); opacity: 0; } }
.mh-enz { transform-box: fill-box; transform-origin: center; animation: mhBreath 3.4s ease-in-out infinite; }
@keyframes mhBreath { 0%, 34%, 68%, 100% { transform: scale(1); } 46%, 54% { transform: scale(1.07); } }
.mh-lig { animation: mhDock 3.6s ease-in-out infinite; }
@keyframes mhDock { 0% { transform: translateY(-6px); opacity: 0; } 12% { opacity: 1; } 48%, 84% { transform: translateY(40px); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
.mh-sig circle, .mh-atp circle { opacity: 0; animation: mhSig 3.6s ease-in-out infinite; }
.mh-sig circle:nth-child(2), .mh-atp circle:nth-child(2) { animation-delay: .18s; }
.mh-sig circle:nth-child(3), .mh-atp circle:nth-child(3) { animation-delay: .36s; }
.mh-atp circle { animation-duration: 2.6s; }
@keyframes mhSig { 0%, 46% { opacity: 0; transform: translateY(-8px); } 62%, 84% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
.mh-rna { stroke-dasharray: 100; stroke-dashoffset: 100; animation: mhRna 3.6s ease-in-out infinite; }
@keyframes mhRna { 0%, 16% { stroke-dashoffset: 100; opacity: 1; } 74%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.mh-tcr { animation: mhTcr 3.6s ease-in-out infinite; }
@keyframes mhTcr { 0%, 100% { transform: translateY(-10px); } 45%, 72% { transform: translateY(8px); } }
.mh-drop { animation: mhFlow 4s linear infinite; animation-delay: calc(var(--i) * -0.8s); }
@keyframes mhFlow { 0% { transform: translateX(0); opacity: 0; } 10%, 90% { opacity: 1; } 100% { transform: translateX(var(--dx)); opacity: 0; } }
.mh-ring { transform-box: fill-box; transform-origin: center; animation: mhSpin 9s linear infinite; }
@keyframes mhSpin { to { transform: rotate(360deg); } }

/* ---------- Статті блогу ---------- */
.c-blog { margin-top: 24px; }
.blog { display: grid; gap: 8px; }
.blog-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 8px; background: linear-gradient(180deg, #fff, #F1F8FB); border: 1px solid var(--line); box-shadow: 0 2px 0 rgba(11, 37, 50, .1); color: var(--navy-900); font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: border-color .2s, background .2s, transform .1s, box-shadow .1s; }
.blog-a:hover { border-color: var(--link); background: var(--sky-100); }
.blog-a:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(11, 37, 50, .1); }
.blog-a svg { flex: none; width: 12px; height: 12px; opacity: .6; }

/* ---------- Гени хромосоми з поясненнями ---------- */
.genes { display: grid; gap: 8px; }
.gene { padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 2px 0 rgba(11, 37, 50, .06); }
.gene.hero { border-color: var(--peach-600); background: var(--peach-100); }
.gene-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.gene-h em { font-style: italic; font-weight: 800; font-size: 14.5px; color: var(--link); }
.gene-h span { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.gene .chips { margin-top: 7px; }
.genes.cut .gene:nth-child(n+7) { display: none; }
.genes-more { margin-top: 10px; }

@media (max-width: 700px) {
  .lang button { height: 26px; padding: 0 9px; font-size: 12px; }
  .viz { padding: 18px 14px 12px; }
  .viz::before { left: 14px; }
  .viz h3 { font-size: 18.5px; }
}
@media (max-width: 560px) {
  .tip .seg3 { grid-template-columns: 1fr; }
  .tip .seg3 button { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; text-align: left; }
  .tip .seg3 button small { margin-top: 0; }
  .fc-row { grid-template-columns: 1fr; }
  .fc-in { min-height: 104px; }
  .fc-f { flex-direction: row; align-items: center; gap: 12px; }
  .fc-f b { margin-top: 0; }
  .pk { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ideo .big { font-size: 58px; }
  .m-title { font-size: 22px; }
  .dp-num, .sh-read b, .ck-time b { font-size: 34px; }
}
@media (max-width: 480px) {
  .brand .ttl b { font-size: 11.5px; }
}
@media (max-width: 380px) {
  .viz-tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .is-on .tl-enz circle { animation: none; }
  .fx-scene { transform: none; }
  .mh-sub, .mh-prod, .mh-enz, .mh-lig, .mh-sig circle, .mh-atp circle, .mh-rna, .mh-tcr, .mh-drop, .mh-ring { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

/* Вузький блок (ліва панель картки на комп’ютері): картки-перевертні одна під одною */
@container (max-width: 520px) {
  .fc-row { grid-template-columns: 1fr; }
  .fc-in { min-height: 104px; }
  .fc-f { flex-direction: row; align-items: center; gap: 12px; }
  .fc-f b { margin-top: 0; }
}
