/* Ф20: визуализация матрицы судьбы, нумерологии, квадрата Пифагора и биоритмов.
   Палитра сайта: фон #140d24/#1d1436, синий #46ABF9, розовый #EB57EA. */
.numviz { max-width: 1040px; }
.numviz__out { margin-top: 26px; }
.nv-svg { width: 100%; height: auto; display: block; overflow: visible; }
.nv-draw { animation: nv-draw 1s ease both; }
@keyframes nv-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.nv-pop { animation: nv-pop .35s ease both; }
@keyframes nv-pop { from { opacity: 0; } to { opacity: 1; } }
.nv-kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8a94a6; }
.nv-hint { color: #8a94a6; font-size: 14px; line-height: 1.5; margin: 4px 0 10px; }
.nv-h { font-size: 20px; margin: 34px 0 14px; }
.nv-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px;
  margin-right: 10px; border-radius: 50%; border: 1px solid #EB57EA; color: #fff; font-size: 14px; vertical-align: middle; }

/* --- матрица судьбы */
.nv-matrix { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.nv-matrix__chart { max-width: 500px; width: 100%; margin: 0 auto; }
.nv-l { stroke-width: 1.4; fill: none; }
.nv-l--rod { stroke: rgba(70,171,249,.45); }
.nv-l--self { stroke: rgba(235,87,234,.55); }
.nv-l--axis { stroke: rgba(235,87,234,.22); stroke-dasharray: 3 5; }
.nv-l--father, .nv-l--mother { stroke: rgba(70,171,249,.22); stroke-dasharray: 3 5; }
.nv-labels text { fill: #8a94a6; font-size: 12px; letter-spacing: .04em; }
.nv-node { cursor: pointer; outline: none; }
.nv-node circle { stroke-width: 1.6; transition: stroke-width .15s, filter .15s; }
.nv-node text { fill: #fff; font-size: 17px; font-weight: 700; pointer-events: none; }
.nv-node--self circle { stroke: #EB57EA; }
.nv-node--rod circle { stroke: #46ABF9; }
.nv-node--center circle { stroke: #f4f1fb; }
.nv-node--center text { font-size: 22px; }
.nv-node:hover circle, .nv-node:focus circle, .nv-node.is-on circle { stroke-width: 3.2; filter: drop-shadow(0 0 8px rgba(235,87,234,.55)); }
.nv-node--rod.is-on circle, .nv-node--rod:hover circle { filter: drop-shadow(0 0 8px rgba(70,171,249,.6)); }
.nv-matrix__detail { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 20px 22px; background: rgba(255,255,255,.03); min-height: 230px; }
.nv-matrix__detail h3 { margin: 4px 0 6px; font-size: 22px; }
.nv-matrix__detail p { color: #c9d1dd; font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.nv-matrix__detail a, .nv-card a, .nv-num a { color: #46ABF9; text-decoration: none; }
.nv-matrix__detail a:hover, .nv-card a:hover, .nv-num a:hover { text-decoration: underline; }

.nv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.nv-card { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px; }
.nv-card h4 { margin: 2px 0 6px; font-size: 16px; display: flex; align-items: center; }
.nv-card h4 a { color: #fff; }
.nv-card p { color: #c9d1dd; font-size: 14px; line-height: 1.5; margin: 0 0 6px; }
.nv-card .nv-badge { min-width: 26px; height: 26px; font-size: 13px; margin-right: 8px; }

.nv-purpose { display: grid; gap: 12px; }
.nv-pur { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px; }
.nv-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.nv-chip { padding: 6px 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); color: #c9d1dd; font-size: 14px; }
.nv-chip--res { border-color: #EB57EA; color: #fff; text-decoration: none; background: rgba(235,87,234,.08); }
.nv-op { color: #8a94a6; }

/* --- нумерология */
.nv-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 30px; }
.nv-num { display: flex; gap: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 16px; }
.nv-num--main { border-color: rgba(235,87,234,.45); background: rgba(235,87,234,.05); }
.nv-num__n { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 1px solid #46ABF9; display: flex;
  align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff; }
.nv-num--main .nv-num__n { border-color: #EB57EA; }
.nv-num h4 { margin: 2px 0 4px; font-size: 17px; }
.nv-num p { color: #c9d1dd; font-size: 14px; line-height: 1.5; margin: 0 0 6px; }

/* --- квадрат Пифагора */
.nv-square { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.nv-sq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(70px, .8fr); gap: 6px; }
.nv-sq__cell { aspect-ratio: 1 / 1; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.03);
  color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 6px; transition: border-color .15s, transform .15s; }
.nv-sq__cell:hover, .nv-sq__cell.is-on { border-color: #EB57EA; transform: translateY(-1px); }
.nv-sq__digits { font-size: 20px; font-weight: 700; letter-spacing: .08em; word-break: break-all; text-align: center; }
.nv-sq__title { font-size: 11px; color: #8a94a6; text-align: center; line-height: 1.2; }
.nv-lv1 { background: rgba(70,171,249,.08); }
.nv-lv2 { background: rgba(70,171,249,.16); }
.nv-lv3 { background: linear-gradient(160deg, rgba(235,87,234,.22), rgba(70,171,249,.18)); }
.nv-sq__sum { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border-radius: 10px; color: #8a94a6; font-size: 11px; line-height: 1.2; padding: 6px; min-height: 60px; }
.nv-sq__sum b { font-size: 18px; color: #fff; }
.nv-sq__detail { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px 20px; background: rgba(255,255,255,.03); }
.nv-sq__detail h3 { margin: 4px 0 8px; }
.nv-sq__detail p { color: #c9d1dd; font-size: 15px; line-height: 1.55; margin: 0 0 8px; }

/* --- биоритмы */
.nv-bio { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; align-items: start; }
.nv-grid { stroke: rgba(255,255,255,.07); }
.nv-grid--zero { stroke: rgba(255,255,255,.25); }
.nv-axis { fill: #8a94a6; font-size: 11px; }
.nv-axis--today { fill: #fff; font-weight: 700; }
.nv-weekend { fill: rgba(255,255,255,.025); }
.nv-today { stroke: rgba(255,255,255,.55); stroke-dasharray: 4 4; }
.nv-cursor { stroke: rgba(70,171,249,.6); }
.nv-curve { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.nv-dot { stroke: #140d24; stroke-width: 2; }
.nv-bio__legend { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 16px; background: rgba(255,255,255,.03); }
.nv-leg { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; color: #c9d1dd; }
.nv-leg i { width: 12px; height: 12px; border-radius: 50%; }
.nv-leg b { color: #fff; }
.nv-leg em { grid-column: 2 / 4; font-style: normal; font-size: 12px; color: #e8817a; }
.nv-summary { color: #c9d1dd; font-size: 15px; line-height: 1.6; max-width: 780px; margin-top: 18px; }

@media (max-width: 760px) {
  .nv-matrix, .nv-square, .nv-bio { grid-template-columns: 1fr; }
  .nv-matrix__detail { min-height: 0; }
  .nv-sq__digits { font-size: 16px; }
  .nv-nums { grid-template-columns: 1fr; }
}

/* --- Ба-Цзы */
.nv-h--first { margin-top: 0; }
.nv-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nv-pillar { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.nv-pillar--dm { border-color: rgba(235,87,234,.5); background: rgba(235,87,234,.05); }
.nv-pillar--empty { justify-content: center; align-items: center; text-align: center; border-style: dashed; }
.nv-glyph { border-radius: 12px; padding: 12px 8px; text-align: center; background: color-mix(in srgb, var(--el) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--el) 45%, transparent); display: flex; flex-direction: column; gap: 2px; }
.nv-glyph b { font-size: 42px; line-height: 1.1; color: var(--el); font-weight: 400; font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }
.nv-glyph span { color: #fff; font-size: 15px; font-weight: 600; }
.nv-glyph em { font-style: normal; color: #8a94a6; font-size: 12px; }
.nv-pillar .nv-hint { margin: 0; font-size: 13px; }
.nv-wx__gen { stroke: rgba(244,241,251,.35); stroke-width: 1.6; fill: none; }
.nv-wx__node text { font-size: 20px; }
.nv-node text.nv-wx__label { font-size: 13px; font-weight: 400; fill: #c9d1dd; }
.nv-wx__node:hover circle, .nv-wx__node.is-on circle, .nv-wx__node:focus circle { filter: drop-shadow(0 0 8px var(--el)); }
.nv-dm { display: flex; gap: 22px; align-items: flex-start; margin-top: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  padding: 20px 22px; background: rgba(255,255,255,.03); }
.nv-dm__glyph { flex: none; width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 50px; color: var(--el); border: 1px solid var(--el); font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }
.nv-dm h3 { margin: 2px 0 4px; font-size: 22px; }
.nv-dm p { color: #c9d1dd; font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.nv-dm a { color: #46ABF9; text-decoration: none; }
@media (max-width: 760px) {
  .nv-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nv-dm { flex-direction: column; gap: 12px; }
  .nv-dm__glyph { width: 70px; height: 70px; font-size: 38px; }
}
