:root {
  --violet: #7b7fe0;
  --violet-soft: #a9acf2;
  --violet-bg: #eef0ff;
  --lime: #e4f04a;
  --lime-deep: #c9d52a;
  --ink: #1d1e3a;
  --muted: #5d6080;
  --bg: #fafbff;
  --card: #ffffff;
  --line: #e2e4f3;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29, 30, 58, .04), 0 8px 24px rgba(29, 30, 58, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: "Unbounded", "Inter", sans-serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 251, 255, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { flex-shrink: 0; white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.brand-logo {
  width: 34px; height: 38px; display: grid; place-items: center;
  background: var(--violet); color: var(--lime);
  font-family: "Unbounded", sans-serif; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}
.nav { display: flex; gap: 2px; min-width: 0; }
.nav a {
  text-decoration: none; font-size: .88rem; font-weight: 500;
  padding: 8px 11px; border-radius: 999px; color: var(--muted); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--violet-bg); color: var(--ink); }
.nav a.active { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); width: 44px; height: 44px; margin-right: -10px; }

.site-header .wrap { gap: 24px; }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 12px 20px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; box-shadow: 0 12px 24px rgba(29,30,58,.08); }
  .nav a { padding: 12px 14px; }
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--lime); color: var(--ink); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 span { color: var(--violet); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; }

section { padding: 28px 0; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-title .num { font-family: "Unbounded", sans-serif; color: var(--violet-soft); font-weight: 700; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card.violet { background: var(--violet); color: #fff; border-color: transparent; }
.card.violet h3, .card.violet h2 { color: var(--lime); }
.card.lime { background: var(--lime); border-color: transparent; }
.card.soft { background: var(--violet-bg); border-color: transparent; box-shadow: none; }

a.card { text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(29, 30, 58, .1); }
.card .arrow { font-weight: 600; color: var(--violet); margin-top: 8px; display: inline-block; }
.card.violet .arrow { color: var(--lime); }

.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--violet-bg); color: var(--violet); margin-bottom: 10px;
}
.card.violet .tag { background: rgba(255,255,255,.18); color: #fff; }
.card.lime .tag { background: rgba(29,30,58,.08); color: var(--ink); }

ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { position: relative; padding-left: 22px; margin-bottom: 10px; }
ul.list li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--lime-deep);
}
.card.lime ul.list li::before { background: var(--violet); }
ul.list li b { font-weight: 600; }

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ol.steps li {
  counter-increment: s; display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
}
ol.steps li::before {
  content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--lime); color: var(--ink);
}

/* ---------- departments ---------- */
.dept { scroll-margin-top: 84px; }
.dept-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dept-icon {
  width: 56px; height: 56px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 1.7rem; background: var(--violet-bg);
}
.dept-head h2 { margin: 0; }
.mentor { font-size: .92rem; color: var(--muted); }
.mentor b { color: var(--ink); }
.dept-areas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.area { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.area h3 { color: var(--violet); font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.area p { margin: 0; color: var(--muted); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  text-decoration: none; font-size: .88rem; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.chip:hover { border-color: var(--violet); color: var(--violet); }
.chip.muted { color: var(--muted); border-style: dashed; }

/* ---------- timeline ---------- */
.timeline { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); position: relative; }
.tl-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden; }
.tl-item .tl-num { font-family: "Unbounded", sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--violet-soft); line-height: 1; }
.tl-item .tl-dates { font-weight: 600; margin: 10px 0 6px; }
.tl-item .tl-note { font-size: .9rem; color: var(--muted); }
.tl-item .tl-note b { color: var(--violet); }
.tl-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--lime); }

/* ---------- triangle ---------- */
.triangle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .triangle { grid-template-columns: 1fr; } }

/* ---------- power branches ---------- */
.branch { border-left: 5px solid var(--violet); }
.branch.b-lime { border-left-color: var(--lime-deep); }
.branch .tag { background: var(--ink); color: #fff; }

.callout {
  background: var(--lime); border-radius: var(--radius); padding: 20px 24px; font-weight: 500;
}
.callout.soft { background: var(--violet-bg); }

/* ---------- footer ---------- */
.site-footer { margin-top: 56px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.pager a {
  text-decoration: none; padding: 14px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  font-weight: 600; flex: 1; min-width: 200px;
}
.pager a:hover { border-color: var(--violet); }
.pager a small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pager a.next { text-align: right; }

/* ---------- org chart ---------- */
.org { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.node {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  background: var(--violet); color: #fff; line-height: 1.25;
}
.node.dark { background: var(--ink); }
.node.lime { background: var(--lime); color: var(--ink); border-radius: 12px; }
.node.outline { background: transparent; color: var(--ink); border: 1.5px dashed var(--violet-soft); border-radius: 12px; }
.node small { font-weight: 400; font-size: .75rem; opacity: .75; margin-top: 2px; }
.org-top { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 2px solid var(--line); }
.org-arrow, .org-down { color: var(--violet); font-weight: 700; font-size: 1.2rem; }
.org-split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; padding-top: 22px; }
.org-branch { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.org-sub { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.org-chain { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.org-leaves { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; }
@media (max-width: 760px) { .org-split { grid-template-columns: 1fr; } .org { padding: 20px; } }

/* ---------- pyramid ---------- */
.pyramid { display: grid; gap: 10px; }
.pyr-head, .pyr-row { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 12px; align-items: stretch; }
.pyr-head span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px; }
.pyr-level {
  width: var(--w); justify-self: center; background: var(--c); color: var(--t, #fff);
  border-radius: 10px; padding: 12px 10px; text-align: center; font-size: .85rem; line-height: 1.3;
  display: flex; flex-direction: column; justify-content: center;
}
.pyr-level b { font-family: "Unbounded", sans-serif; font-size: .95rem; }
.pyr-cell { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: .93rem; display: flex; flex-direction: column; justify-content: center; }
.pyr-cell small { display: none; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); }
@media (max-width: 760px) {
  .pyr-head { display: none; }
  .pyr-row { grid-template-columns: 1fr; gap: 6px; margin-bottom: 10px; }
  .pyr-level { width: 100%; }
  .pyr-cell small { display: block; }
}

/* ---------- module colors (як таблички) ---------- */
:root { --m1: #f7aa3a; --m2: #f6a898; --m3: #f1ea52; --m4: #c6ea4e; }
.m1 { --mc: var(--m1); } .m2 { --mc: var(--m2); } .m3 { --mc: var(--m3); } .m4 { --mc: var(--m4); }

/* ---------- subnav ---------- */
.subnav { border-bottom: 1px solid var(--line); background: var(--card); }
.subnav .wrap { position: relative; display: flex; gap: 6px; align-items: center; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav-title { font-family: "Unbounded", sans-serif; font-size: .78rem; font-weight: 600; color: var(--violet); margin-right: 8px; white-space: nowrap; }
.subnav a { white-space: nowrap; text-decoration: none; font-size: .85rem; font-weight: 500; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.subnav a:hover { background: var(--violet-bg); color: var(--ink); }
.subnav a.active { background: var(--violet); color: #fff; }

/* ---------- hub ---------- */
.hub-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0 8px; }
.hub-bar span { height: 14px; border-radius: 4px; background: var(--mc); }
.now-card {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px;
  background: var(--mc); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 18px;
}
.now-card span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.now-card b { font-family: "Unbounded", sans-serif; }
.now-card a { font-weight: 600; }

/* ---------- year bar ---------- */
.year-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.yb-cell {
  background: var(--mc); border-radius: 10px; padding: 14px 4px; text-align: center; text-decoration: none;
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: .8rem; text-transform: uppercase;
  transition: transform .15s;
}
.yb-cell:hover { transform: translateY(-3px); }
.module-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.ml-item { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; text-decoration: none; }
.ml-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--mc); border: 1.5px solid var(--ink); }
@media (max-width: 600px) {
  .year-bar { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- tag cards (паперові таблички) ---------- */
.tag-card {
  position: relative; background: var(--mc); border-radius: 6px; padding: 16px 18px 12px;
  display: flex; flex-direction: column; gap: 4px; min-height: 150px;
  box-shadow: 0 2px 0 rgba(29,30,58,.08), 0 8px 18px rgba(29,30,58,.08);
}
.tag-card::before { content: ""; position: absolute; inset: 7px; border: 2px solid var(--ink); border-radius: 10px; pointer-events: none; }
.tag-card.soft { background: color-mix(in srgb, var(--mc) 55%, #fff); }
.tag-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mini-logo {
  width: 18px; height: 20px; display: grid; place-items: center; font-size: .6rem; font-weight: 700;
  border: 1.5px solid var(--ink); clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); padding-bottom: 3px;
}
.tag-kind { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: rgba(29,30,58,.1); padding: 2px 8px; border-radius: 999px; }
.tag-card-title { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1rem; text-transform: uppercase; text-align: center; line-height: 1.25; margin-top: auto; }
.tag-card-date { text-align: center; font-size: .9rem; }
.tag-card-note { text-align: center; font-size: .78rem; opacity: .8; }
.tag-card-foot { text-align: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: auto; padding-top: 10px; }

.vyshkoly { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ---------- modules & months ---------- */
.module { scroll-margin-top: 80px; }
.module-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px;
  background: var(--mc); border: 2px solid var(--ink); border-radius: 16px; padding: 18px 22px; margin-bottom: 18px;
}
.module-head h2 { margin: 0; text-transform: uppercase; }
.module-num { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.module-months { margin-left: auto; font-size: .9rem; font-weight: 500; }
.month { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 80px; }
.month:last-child { border-bottom: 0; }
.month-name { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.5rem; text-transform: uppercase; position: relative; padding-left: 18px; }
.month-name::before { content: ""; position: absolute; left: 0; top: .35em; bottom: .35em; width: 6px; border-radius: 3px; background: var(--mc); }
.month-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.month-empty { color: var(--muted); font-size: .95rem; padding: 10px 0; }
.cadence-mark {
  margin-top: 12px; display: inline-block; background: var(--violet-bg); color: var(--ink);
  border-left: 4px solid var(--violet); border-radius: 8px; padding: 8px 14px; font-size: .9rem; font-weight: 500;
}
@media (max-width: 700px) {
  .month { grid-template-columns: 1fr; gap: 10px; }
  .module-months { margin-left: 0; }
}

/* ---------- стратегічні теми ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.theme-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--violet); color: #fff; border-radius: var(--radius); padding: 22px; min-height: 170px;
  transition: transform .15s, box-shadow .15s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(123,127,224,.35); }
.theme-num { position: absolute; top: 18px; right: 20px; font-family: "Unbounded", sans-serif; font-weight: 700; opacity: .45; }
.theme-icon { font-size: 1.8rem; }
.theme-name { font-family: "Unbounded", sans-serif; font-weight: 600; color: var(--lime); text-transform: uppercase; font-size: .98rem; line-height: 1.3; }
.theme-event { margin-top: auto; font-size: .85rem; opacity: .9; }

.events-line { position: relative; display: grid; gap: 10px; }
.ev-row { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center; gap: 12px; }
.ev-theme { text-align: right; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--muted); }
.ev-theme:hover { color: var(--violet); }
.ev-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--violet); justify-self: center; box-shadow: 0 0 0 5px var(--violet-bg); }
.ev-name { background: var(--lime); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .92rem; text-decoration: none; justify-self: start; }
@media (max-width: 600px) {
  .ev-row { grid-template-columns: 14px 1fr; row-gap: 4px; }
  .ev-dot { grid-row: span 2; align-self: start; margin-top: 4px; }
  .ev-theme { text-align: left; }
}

.theme { scroll-margin-top: 80px; }
.theme-block { background: var(--violet); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px; }
.theme-block h2 { color: var(--lime); text-transform: uppercase; margin: 6px 0 10px; }
.theme-block-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.theme-block-event { font-size: .95rem; }
.theme-block-event a { color: var(--lime); font-weight: 600; }

/* ---------- «ГЕНОМ» Лідера ---------- */
:root {
  --g-d: #d8a24a; --g-g: #bcd23a; --g-r: #8bbf4e; --g-e: #a89f5c; --g-c: #93a9c9; --g-l: #9b93ac;
}
.d { --gc: var(--g-d); } .g { --gc: var(--g-g); } .r { --gc: var(--g-r); }
.e { --gc: var(--g-e); } .c { --gc: var(--g-c); } .l { --gc: var(--g-l); }

.genome-hub .arrow { color: var(--g-r); }
.genome-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gene-chip {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--gc);
  border-radius: 14px; padding: 14px 16px; transition: transform .15s, box-shadow .15s;
}
.gene-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gene-code { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--gc); line-height: 1; }
.gene-code sub { font-size: .6em; }
.gene-en { font-weight: 600; font-size: .92rem; }
.gene-key { font-size: .8rem; color: var(--muted); }

.gene { scroll-margin-top: 80px; margin-top: 8px; }
.gene-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.gene-badge {
  flex: none; width: 66px; height: 66px; border-radius: 18px; background: var(--gc); color: #fff;
  display: grid; place-items: center; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.9rem;
}
.gene-badge sub { font-size: .55em; }
.gene-head h2 { margin: 0; font-size: 1.3rem; }
.gene-desc { color: var(--muted); font-size: .95rem; }
.gene-body { border-top: 4px solid var(--gc); }
.gene-body .accent, .gene .pill.accent { background: var(--gc); color: #fff; }
.gene .steps li::before { background: var(--gc); color: #fff; }
.gene .callout { background: color-mix(in srgb, var(--gc) 22%, #fff); }

.detail-note { color: var(--muted); font-size: .92rem; margin: 14px 0 8px; }
.muted-inline { color: var(--muted); font-weight: 400; font-size: .85em; }
.flow-row, .cycle, .quad { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.pill { display: inline-block; background: var(--violet-bg); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .92rem; }
.flow-arr { color: var(--gc, var(--violet)); font-weight: 700; font-size: 1.1rem; }
.pairs { display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: minmax(120px, 260px) 1fr; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pair b { color: var(--ink); }
.pair span { color: var(--muted); font-size: .95rem; }
.formula {
  display: inline-block; font-family: "Unbounded", sans-serif; font-size: 1.3rem; font-weight: 600;
  background: var(--violet-bg); border-radius: 12px; padding: 12px 22px; margin: 6px 0;
}
.quad .pill { flex: 1; min-width: 160px; text-align: center; }
@media (max-width: 600px) {
  .pair { grid-template-columns: 1fr; gap: 2px; }
}

/* fix: індекс біля літери гена (C₁, G₂ …) — тримаємо в межах плашки */
.gene-badge, .gene-code { display: inline-flex; align-items: baseline; justify-content: center; }
.gene-badge sub, .gene-code sub {
  vertical-align: baseline; font-size: .48em; line-height: 1;
  margin-left: 1px; align-self: baseline; position: relative; top: .06em;
}

/* ---------- Дні народження ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }

.bday-hero {
  text-align: center; border-radius: var(--radius); padding: 36px 24px; color: #fff;
  background: linear-gradient(135deg, var(--violet), #9a7de0 55%, var(--lime-deep));
  box-shadow: 0 12px 40px rgba(123,127,224,.35); animation: bdayPop .6s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes bdayPop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bday-emoji { font-size: 2.6rem; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.bday-title { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: clamp(1.4rem,4vw,2rem); margin: 8px 0; }
.bday-names { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.bday-names span { background: rgba(255,255,255,.22); border-radius: 999px; padding: 8px 20px; font-weight: 600; font-size: 1.1rem; }
.bday-sub { opacity: .92; }

.upcoming { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.up-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; }
.up-card.is-today { background: var(--lime); border-color: transparent; }
.up-date { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--violet); }
.up-card.is-today .up-date { color: var(--ink); }
.up-date small { font-family: "Inter", sans-serif; font-size: .8rem; font-weight: 500; display: block; color: var(--muted); }
.up-card.is-today .up-date small { color: var(--ink); }
.up-name { font-weight: 600; margin: 6px 0 2px; }
.up-in { font-size: .82rem; color: var(--muted); }
.up-card.is-today .up-in { color: var(--ink); font-weight: 600; }

.months-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.month-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.month-card.current { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-bg); }
.month-title { font-family: "Unbounded", sans-serif; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.now-tag { font-family: "Inter", sans-serif; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--violet); color: #fff; padding: 3px 8px; border-radius: 999px; }
.bday-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bday-row:last-child { border-bottom: 0; }
.bday-day { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--violet-bg); color: var(--violet); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.bday-person { font-size: .95rem; }
.bday-row.today .bday-day { background: var(--lime); color: var(--ink); }
.bday-row.today .bday-person { font-weight: 700; }

/* дні народження в таймлайні */
.month-bdays { margin-top: 16px; background: var(--violet-bg); border-radius: 14px; padding: 14px 16px; }
.mb-head { font-size: .78rem; font-weight: 600; color: var(--violet); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.mb-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-item {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  font-size: .88rem; font-weight: 500; background: var(--card); border: 1px solid transparent;
  border-radius: 999px; padding: 4px 14px 4px 4px; transition: border-color .15s, transform .12s;
}
.mb-item:hover { border-color: var(--violet); transform: translateY(-1px); }
.mb-day { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }

/* ---------- Партнерства: потоки ---------- */
.meet-flow, .path-flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.meet-step {
  flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; font-weight: 600; font-size: .95rem; display: flex; flex-direction: column; gap: 6px;
}
.meet-time { font-family: "Unbounded", sans-serif; font-size: .8rem; color: var(--violet); }
.path-flow { align-items: center; }
.path-step {
  background: var(--violet-bg); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: .9rem;
  position: relative;
}
.path-step:not(:last-child)::after { content: "→"; margin: 0 2px 0 12px; color: var(--violet); font-weight: 700; }
.path-step.lime { background: var(--lime); }

/* ---------- Кейси: сцени ---------- */
.scenes { display: grid; gap: 14px; }
.scene {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; border-left: 5px solid var(--violet);
}
.scene-no { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--violet-soft); }
.scene h3 { margin: 4px 0 8px; }
.scene p { margin: 0; color: var(--muted); }
.scene-quote {
  margin: 12px 0 0; background: var(--violet-bg); border-radius: 12px; padding: 12px 16px;
  font-style: italic; color: var(--ink);
}
.scene-quote span {
  display: block; font-style: normal; font-weight: 700; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--violet); margin-bottom: 4px;
}
.scene-end { margin-top: 12px; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
ol.steps li small { color: var(--muted); font-weight: 400; }
