/* cyrillic-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-21.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-19.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-15.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-18.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-16.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-20.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-17.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-02.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-06.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-01.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-05.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-04.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-03.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-07.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-09.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-14.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-08.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-13.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-11.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-10.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-12.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-25.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-24.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-26.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-23.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-27.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-28.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-22.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ——— «Родня» ——— */
:root {
  --bg: #0e0c0a;
  --ink: #efe6d6;
  --dim: rgba(239, 230, 214, .58);
  --faint: rgba(239, 230, 214, .24);
  --hair: rgba(239, 230, 214, .08);
  --gold: #e3b36a;
  --proto: #cfae76;
  --cool: #8fb3c7;
  --font: "Gentium Book Plus", "Iowan Old Style", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 28px; }

header.top { padding: 64px 0 8px; display: flex; align-items: baseline; gap: 10px 30px; flex-wrap: wrap; }
h1 { font-size: clamp(72px, 9vw, 128px); font-weight: 400; margin: 0; line-height: .9; letter-spacing: -.015em; }
.sub { font-size: clamp(18px, 1.6vw, 24px); color: var(--dim); margin: 0; font-style: italic; }

.why-link { margin: 18px 0 0; font-size: 17px; }

nav.words { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 40px 0 0; font-size: 22px; }
nav.words .group { display: inline-flex; flex-wrap: wrap; gap: 2px 18px; align-items: baseline; }
nav.words .gname { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
nav.words button {
  background: none; border: 0; padding: 2px 0; margin: 0; color: var(--dim); font: inherit;
  cursor: pointer; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
nav.words button:hover { color: var(--ink); }
nav.words button.active { color: var(--gold); border-bottom-color: var(--gold); }
nav.words button:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

.head { margin: 48px 0 0; display: flex; align-items: baseline; gap: 10px 28px; flex-wrap: wrap; }
.head .word { font-size: clamp(60px, 7.4vw, 108px); line-height: 1; letter-spacing: -.01em; }
.head .gloss { font-size: clamp(18px, 1.5vw, 23px); color: var(--gold); font-style: italic; }
.head .hint { flex-basis: 100%; color: var(--dim); font-size: 16px; font-style: italic; margin-top: 8px; }

.stage { position: relative; margin: 4px 0 0; transition: opacity .22s ease; overflow-x: auto; overflow-y: hidden; }
.stage.swap { opacity: 0; }
svg.tree { width: 100%; min-width: 1150px; height: auto; display: block; overflow: visible; font-family: var(--font); }

.guide { stroke: var(--ink); stroke-opacity: .07; }
.t-axis { font-size: 11px; fill: var(--dim); font-style: italic; }
.root-dot { fill: var(--gold); }
.t-root { font-size: 30px; font-style: italic; fill: var(--gold); }
.t-rootlabel, .t-fam { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; fill: var(--dim); }
.lane.empty .t-fam { fill-opacity: .4; }

.stem {
  fill: none; stroke: var(--ink); stroke-opacity: .22; stroke-width: 1.1; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.4, 0, .2, 1) forwards;
  transition: stroke .25s, stroke-opacity .25s;
}
.stem.taboo { stroke: var(--cool); stroke-opacity: .55; stroke-dasharray: 4 6; stroke-dashoffset: 0; animation: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.lane { transition: opacity .25s; }
svg.dim .lane:not(.hot) { opacity: .34; }
.lane.hot .stem { stroke: var(--gold); stroke-opacity: .9; }
.lane.hot .t-fam { fill: var(--gold); fill-opacity: 1; }

.node { opacity: 0; animation: appear .5s ease forwards; outline: none; }
@keyframes appear { to { opacity: 1; } }
.dot { fill: var(--ink); fill-opacity: .8; }
.node.proto .dot { fill: var(--proto); }
.node.taboo .dot { fill: var(--cool); }
.t-form { font-size: 16.5px; fill: var(--ink); }
.node.proto .t-form { font-style: italic; fill: var(--proto); }
.node.taboo .t-form { fill: var(--cool); }
.t-native { font-size: 13px; fill: var(--dim); }
.t-lang { font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; fill: var(--dim); }
.t-other { font-size: 12px; font-style: italic; fill: var(--dim); fill-opacity: .8; }
.hit { fill: transparent; }
.node.audio .hit, .other .hit { cursor: pointer; }
.node.audio .t-form { text-decoration: underline dotted; text-decoration-color: rgba(239, 230, 214, .28); text-underline-offset: 4px; }
.node.hot .t-form, .node:focus-visible .t-form { fill: var(--gold); }
.node.hot .dot, .node:focus-visible .dot { fill: var(--gold); fill-opacity: 1; }

.tooltip {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5;
  background: rgba(22, 19, 16, .97); border: 1px solid rgba(239, 230, 214, .14);
  padding: 12px 15px 13px; border-radius: 6px; max-width: 320px; min-width: 180px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font-size: 15px; line-height: 1.35;
}
.tooltip[hidden] { display: none; }
.tip-form { font-size: 26px; line-height: 1.1; }
.tip-native { font-size: 20px; color: var(--dim); margin-top: 2px; }
.tip-lang { margin-top: 8px; color: var(--ink); }
.tip-era { color: var(--dim); font-style: italic; }
.tip-m { margin-top: 8px; }
.tip-q { margin-top: 8px; color: var(--cool); font-style: italic; }
.tip-audio { margin-top: 8px; color: var(--gold); }

.story { max-width: 760px; font-size: 21px; line-height: 1.45; margin: 36px 0 72px; }
.story p { margin: 0 0 14px; }

footer { border-top: 1px solid var(--hair); padding: 26px 0 96px; color: var(--dim); font-size: 16px; max-width: 820px; }
footer p { margin: 0 0 10px; }
footer .sep { margin: 0 6px; }
button.link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--gold); cursor: pointer; border-bottom: 1px solid rgba(227, 179, 106, .5); }
/* окно «Зачем это» */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8, 7, 6, .8); display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay[hidden] { display: none; }
.panel {
  position: relative; background: #161311; border: 1px solid rgba(239, 230, 214, .14); border-radius: 10px;
  max-width: 720px; width: 100%; max-height: 100%; overflow: auto; padding: 34px 40px 30px;
  font-size: 19px; line-height: 1.5; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.panel h2 { font-weight: 400; font-size: 36px; margin: 0 0 18px; line-height: 1; }
.panel p { margin: 0 0 14px; }
.panel .sig { color: var(--gold); font-style: italic; margin: 22px 0 0; }
.panel .close { position: absolute; top: 10px; right: 16px; background: none; border: 0; padding: 4px 8px; color: var(--dim); font: inherit; font-size: 32px; line-height: 1; cursor: pointer; }
.panel .close:hover { color: var(--ink); }
.panel .go { margin: 26px 0 0; }
.gobtn { background: var(--gold); color: #1a1510; border: 0; border-radius: 6px; padding: 12px 26px; font: inherit; font-size: 19px; cursor: pointer; }
.gobtn:hover { background: #f0c57d; }
.gobtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.panel:focus { outline: none; }
.overlay { background: rgba(8, 7, 6, .86); }
body.locked { overflow: hidden; }

/* полоски у краёв: из них iOS Safari берёт цвет своих панелей */
.edge { display: none; }

/* список для узкого экрана: одна ветвь за другой, как линии на схеме */
.list { display: none; }
.list .rootline { position: relative; color: var(--gold); font-style: italic; font-size: 26px; margin: 6px 0 4px; padding-left: 26px; }
.list .rootline::before { content: ""; position: absolute; left: 1px; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px 3px rgba(227, 179, 106, .45); }
.list .rootlabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding-left: 26px; margin-bottom: 10px; }
.list .fam { position: relative; padding-left: 26px; margin-top: 22px; }
.list .fam::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 6px; width: 1px; background: rgba(239, 230, 214, .22); }
.list .fam.taboo::before { background: repeating-linear-gradient(to bottom, var(--cool) 0 4px, transparent 4px 10px); opacity: .7; }
.list h3 { position: relative; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0 0 2px; font-weight: 400; }
.list h3::before { content: ""; position: absolute; left: -23px; top: 5px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(239, 230, 214, .5); background: var(--bg); }
.list h3 small { text-transform: none; letter-spacing: 0; font-style: italic; margin-left: 8px; }
.list .row { position: relative; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0 12px; padding: 9px 0 8px; }
.list .row::before { content: ""; position: absolute; left: -23px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: rgba(239, 230, 214, .85); }
.list .row.proto::before { background: var(--proto); }
.list .row.taboo::before { background: var(--cool); }
.list .row .f { font-size: 21px; }
.list .row .f .n { color: var(--dim); font-size: 16px; margin-left: 8px; }
.list .row .f .q { color: var(--cool); }
.list .row.proto .f { font-style: italic; color: var(--proto); }
.list .row.taboo .f { color: var(--cool); }
.list .row .l { color: var(--dim); font-size: 13px; text-align: right; flex-shrink: 0; }
.list .row .l .play { color: var(--gold); margin-right: 5px; font-size: 11px; }
.list .row.audio { cursor: pointer; }
.list .row.audio:active .f { color: var(--gold); }
.list .row .m { flex-basis: 100%; color: var(--dim); font-size: 15px; font-style: italic; margin-top: -2px; }
.list .other { color: var(--dim); font-style: italic; padding: 6px 0; font-size: 15px; }

@media (max-width: 820px) {
  .wrap { padding: 0 18px; }
  .edge { display: block; position: fixed; left: 0; right: 0; height: 22px; background: var(--bg); z-index: 40; pointer-events: none; }
  .edge-top { top: 0; } .edge-bottom { bottom: 0; }
  header.top { padding: 44px 0 0; }
  .why-link { margin-top: 14px; font-size: 16px; }
  nav.words { flex-wrap: nowrap; overflow-x: auto; gap: 0 26px; margin: 30px -18px 0; padding: 4px 18px 10px; font-size: 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.words::-webkit-scrollbar { display: none; }
  nav.words .group { flex-wrap: nowrap; gap: 0 16px; }
  nav.words button { white-space: nowrap; }
  .head { margin-top: 26px; gap: 6px 18px; }
  .head .hint { font-size: 15px; }
  svg.tree { display: none; }
  .tooltip { display: none !important; }
  .stage { overflow: visible; }
  .list { display: block; }
  .story { font-size: 19px; margin: 30px 0 44px; }
  .panel { padding: 26px 20px 24px; max-height: calc(100% - 20px); font-size: 18px; border-radius: 12px; }
  .panel h2 { font-size: 30px; }
  .overlay { padding: 10px; align-items: flex-end; }
  footer { padding-bottom: 60px; }
}
