/* Биоритмы по дате рождения на редизайне. Разметку результата и график рисует /js/ezoterika/bioritmy.js,
   блок «Эта же дата» — /js/ezoterika/date-transfer.js (его style#dt-style перебивается специфичностью).
   Инлайн-цвета из JS (процент, полосы, теги) частично перебиты: процент в макете чёрный. */

/* ===== форма ===== */
.rd #bio-calc .rda-form { display: flex; flex-direction: column; gap: 28px; margin: 0; }
.rd #bio-calc .bio-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rd #bio-calc .bio-tabs { display: inline-flex; gap: 0; margin: 0; padding: 3px; border-radius: 999px; background: var(--pill); }
.rd #bio-calc .bio-tab { flex: none; width: auto; min-width: 0; margin: 0; padding: 9px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--mute); font: 400 13px/1.2 var(--f-ui); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.rd #bio-calc .bio-tab.is-active { background: var(--tile); color: var(--ink); font-weight: 500; }
.rd #bio-calc .bio-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rd #bio-calc .bio-intro-line { margin: 0; font: 400 15px/1.5 var(--f-ui); color: var(--mute); opacity: 1; }
.rd #bio-calc #bio-partner > .bio-intro-line { margin: 0 0 16px; }

.rd #bio-calc .bio-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.rd #bio-calc .bio-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.rd #bio-calc .bio-field > label { margin: 0; padding: 0; opacity: 1; font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #bio-calc .bio-sel { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 100%; height: 48px; margin: 0; padding: 0 44px 0 16px; background: var(--tile) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236B7075' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; outline: none; font: 500 16px/1 var(--f-ui); color: var(--ink); cursor: pointer; }
.rd #bio-calc input.bio-sel { padding: 0 16px; background-image: none; cursor: text; -moz-appearance: textfield; }
.rd #bio-calc input.bio-sel::-webkit-outer-spin-button, .rd #bio-calc input.bio-sel::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rd #bio-calc input[type="date"].bio-sel { padding: 0 14px 0 16px; line-height: 46px; }
.rd #bio-calc input[type="date"].bio-sel::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.rd #bio-calc .bio-sel::placeholder { color: var(--mute); opacity: .6; }
.rd #bio-calc .bio-sel:focus { border-color: var(--accent); box-shadow: none; }

/* день расчёта и сдвиг; JS ставит ряду display:block — возвращаем flex */
.rd #bio-calc .bio-target-row { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.rd #bio-calc .bio-target-row:not([style*="none"]) { display: flex !important; }
.rd #bio-calc .bio-field--target { flex: none; width: 280px; }
.rd #bio-calc .bio-shift { display: flex; flex: none; gap: 8px; }
.rd #bio-calc .bio-shift__b { flex: none; min-width: 0; height: 48px; margin: 0; padding: 0 18px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink); font: 500 14px/1 var(--f-ui); white-space: nowrap; cursor: pointer; transition: opacity .15s; }
.rd #bio-calc .bio-shift__b:hover { opacity: .85; }

/* дополнительные циклы */
.rd #bio-calc .bio-ext-toggle { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--tile); cursor: pointer; }
.rd #bio-calc .bio-ext-toggle input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.rd #bio-calc .bio-ext-box { position: relative; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; box-sizing: border-box; transition: background .15s, border-color .15s; }
.rd #bio-calc .bio-ext-toggle input:checked + .bio-ext-box { background: var(--ink); border-color: var(--ink); }
.rd #bio-calc .bio-ext-toggle input:checked + .bio-ext-box::after { content: ""; position: absolute; left: 5.5px; top: 1.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rd #bio-calc .bio-ext-toggle input:focus-visible + .bio-ext-box { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.rd #bio-calc .bio-ext-txt { display: flex; flex-direction: column; gap: 4px; font: 500 15px/1.4 var(--f-ui); color: var(--ink); }
.rd #bio-calc .bio-ext-hint { display: block; opacity: 1; font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* кнопки */
.rd #bio-calc .rda-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rd #bio-calc .rda-btn, .rd #bio-calc .bio-chip-ex { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; width: auto; height: auto; border: 1px solid transparent; border-radius: 999px; box-shadow: none; opacity: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
.rd #bio-calc .rda-btn--ink { padding: 13px 28px; background: var(--ink); color: #fff; font: 500 15px/1 var(--f-ui); }
.rd #bio-calc .rda-btn--pill { padding: 14px 24px; background: var(--pill); color: var(--ink); font: 400 13px/1 var(--f-ui); }
.rd #bio-calc .bio-chip-ex { padding: 13px 16px; background: transparent; border-color: var(--line); color: var(--mute); font: 400 13px/1 var(--f-ui); }
.rd #bio-calc .rda-btn:hover, .rd #bio-calc .bio-chip-ex:hover { opacity: .85; }
.rd #bio-calc .bio-chip-ex:hover { border-color: var(--line); color: var(--ink); }

.rd #bio-calc .bio-error { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font: 500 14px/1.45 var(--f-ui); text-align: left; }

/* ===== результат ===== */
.rd #bio-calc .rda-result { display: flex; flex-direction: column; gap: 28px; padding: 28px; border-radius: 20px; background: var(--tile); }
.rd #bio-calc .rda-result:has(> #bio-output[style*="none"]):has(> #bio-pair-output[style*="none"]) { display: none; }
.rd #bio-calc #dt-transfer-wrap:empty { display: none; }
.rd #bio-calc #bio-output > * + *, .rd #bio-calc #bio-pair-output > * + * { margin-top: 16px; }
.rd #bio-calc #bio-output > .bio-h { margin-top: 32px; }
.rd #bio-calc #bio-output > .bio-sub { margin-top: 6px; }
.rd #bio-calc #bio-output > .bio-sub + * { margin-top: 14px; }
.rd #bio-calc #bio-output > .bio-legend { margin-top: 12px; }

.rd #bio-calc .bio-h { margin: 0; padding: 0; border: 0; font: 600 20px/1.25 var(--f-ui); letter-spacing: -.2px; color: var(--ink); }
.rd #bio-calc .bio-sub { margin: 0; opacity: 1; font: 400 14px/1.5 var(--f-ui); color: var(--mute); }
.rd #bio-calc .bio-note { margin: 0; opacity: 1; font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

.rd #bio-calc .bio-banner { margin: 0; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--accent-soft); font: 400 16px/1.5 var(--f-ui); color: var(--ink); }
.rd #bio-calc .bio-banner b { font-weight: 600; }
.rd #bio-calc .bio-banner--crit { background: #FBF0C4; }

/* карточки циклов */
.rd #bio-calc .bio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.rd #bio-calc .bio-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px; border: 0; border-radius: 16px; background: var(--card); }
.rd #bio-calc .bio-card--crit { background: var(--card); box-shadow: inset 0 0 0 1.5px #F6D965; }
.rd #bio-calc .bio-card__top { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 8px 10px; }
.rd #bio-calc .bio-card__dot { width: 10px; height: 10px; border-radius: 50%; }
.rd #bio-calc .bio-card__name { font: 600 14px/1.3 var(--f-ui); color: var(--ink); }
.rd #bio-calc .bio-card__pct { grid-column: 1 / -1; font: 600 44px/1 var(--f-ui); letter-spacing: -1.5px; color: var(--ink) !important; }
.rd #bio-calc .bio-card__bar { position: relative; height: 8px; margin: 0; border-radius: 999px; background: var(--pill); overflow: hidden; }
.rd #bio-calc .bio-card__bar::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: var(--mute); opacity: .5; }
.rd #bio-calc .bio-card__bar--solo::after { display: none; }
.rd #bio-calc .bio-card__fill { position: absolute; top: 0; height: 100%; border-radius: 999px; }
.rd #bio-calc .bio-card__fill.is-plus { left: 50%; }
.rd #bio-calc .bio-card__fill.is-minus { right: 50%; }
.rd #bio-calc .bio-card__fill--solo { left: 0; right: auto; }
.rd #bio-calc .bio-card__label { margin: 0; opacity: 1; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #bio-calc .bio-card__text { margin: 0; opacity: 1; font: 400 14px/1.5 var(--f-ui); color: var(--ink); }

/* график: атрибуты SVG из JS перебиваются свойствами */
.rd #bio-calc .bio-chart-wrap { padding: 20px 20px 16px; border-radius: 16px; background: var(--card); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rd #bio-calc .bio-chart { display: block; width: 100%; min-width: 460px; height: auto; }
.rd #bio-calc .bio-chart line[stroke="#eee"], .rd #bio-calc .bio-chart line[stroke="#f0f0f0"] { stroke: var(--line); }
.rd #bio-calc .bio-chart line[stroke="#999"] { stroke: var(--mute); }
.rd #bio-calc .bio-chart line[stroke="#000"] { stroke: var(--ink); }
.rd #bio-calc .bio-chart rect[fill="#fff3cd"] { fill: #F6D965; opacity: .4; }
.rd #bio-calc .bio-chart text { fill: var(--mute); font-family: var(--f-mono); }
.rd #bio-calc .bio-chart path { stroke-width: 2.5; }
.rd #bio-calc .bio-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; opacity: 1; font: 400 12px/1.4 var(--f-ui); color: var(--mute); }
.rd #bio-calc .bio-legend__i { display: inline-flex; align-items: center; gap: 6px; }
.rd #bio-calc .bio-legend__i i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.rd #bio-calc .bio-legend__i i.bio-legend__crit { width: 12px; height: 12px !important; border-radius: 3px; background: #F6D965 !important; }

/* таблица недели */
.rd #bio-calc .bio-tbl-wrap { padding: 14px 8px; border-radius: 16px; background: var(--card); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rd #bio-calc .bio-tbl { width: 100%; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; font: 400 15px/1.3 var(--f-ui); }
.rd #bio-calc .bio-tbl th { padding: 4px 12px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; opacity: 1; font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; text-align: left; color: var(--mute); white-space: nowrap; }
.rd #bio-calc .bio-tbl td { padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--ink); white-space: nowrap; }
.rd #bio-calc .bio-tbl tbody tr:last-child td { border-bottom: 0; }
.rd #bio-calc .bio-tbl td.is-plus, .rd #bio-calc .bio-tbl td.is-minus, .rd #bio-calc .bio-tbl td.is-crit { color: var(--ink); }
.rd #bio-calc .bio-tbl td.is-crit { font-weight: 600; }
.rd #bio-calc .bio-tbl__day b { font-weight: 400; color: var(--mute); }
.rd #bio-calc .bio-tbl tr.bio-tbl__crit { background: none; }
.rd #bio-calc .bio-tbl tr.bio-tbl__crit td { background: #FBF0C4; border-bottom-color: transparent; }
.rd #bio-calc .bio-tbl tr.bio-tbl__crit td:first-child { border-radius: 10px 0 0 10px; }
.rd #bio-calc .bio-tbl tr.bio-tbl__crit td:last-child { border-radius: 0 10px 10px 0; }
.rd #bio-calc .bio-tbl__mark { opacity: 1; font-size: 14px; color: var(--mute); }
.rd #bio-calc .bio-tbl__crit .bio-tbl__mark { font-weight: 500; color: #5C4700; }

/* ближайшие критические дни */
.rd #bio-calc .bio-crit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rd #bio-calc .bio-crit-list li { display: block; margin: 0; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--card); font: 400 13px/1.45 var(--f-ui); color: var(--ink); }
.rd #bio-calc .bio-crit-list li::before { display: none; }
.rd #bio-calc .bio-crit-list b { font: 600 15px/1.3 var(--f-ui); color: var(--ink); }
.rd #bio-calc .bio-crit-list i { opacity: 1; font-style: normal; color: var(--mute); }
.rd #bio-calc .bio-crit-list__x2 { display: inline-block; margin: 6px 0 0; padding: 3px 9px; border-radius: 999px; background: #FBF0C4; color: #5C4700; font: 500 12px/1.3 var(--f-ui); }
.rd #bio-calc .bio-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 10px 0 0; }
.rd #bio-calc .bio-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid transparent !important; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); font: 500 12px/1.3 var(--f-ui); }
.rd #bio-calc .bio-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* совместимость */
.rd #bio-calc .bio-total { display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px 20px; border: 0; border-radius: 16px; background: var(--card); }
.rd #bio-calc .bio-total__val { font: 700 36px/1 var(--f-ui); letter-spacing: -1px; color: var(--accent); }
.rd #bio-calc .bio-total__txt { font: 400 14px/1.45 var(--f-ui); color: var(--ink); }

/* «Эта же дата в других расчётах» */
.rd #bio-calc .dt-transfer { margin: 0; text-align: left; }
.rd #bio-calc .dt-transfer__ttl { margin: 0 0 12px; opacity: 1; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #bio-calc .dt-transfer__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rd #bio-calc .dt-transfer__link { display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 4px 8px; min-width: 0; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow .15s; }
.rd #bio-calc .dt-transfer__link:hover { box-shadow: inset 0 0 0 1px var(--accent-mid); }
.rd #bio-calc .dt-transfer__link::after { content: ""; grid-column: 2; grid-row: 1 / 3; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234F5BD5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") no-repeat center / 16px; }
.rd #bio-calc .dt-transfer__link span { grid-column: 1; font: 600 15px/1.3 var(--f-ui); color: var(--ink); }
.rd #bio-calc .dt-transfer__link i { grid-column: 1; opacity: 1; font: 400 13px/1.35 var(--f-ui); font-style: normal; color: var(--mute); }

/* ===== статья и боковая колонка ===== */
.rd .rd-article__body .table-scroll { overflow-x: auto; }

.rd .rda-src h2.rd-label { margin: 0; padding: 0; border: 0; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); scroll-margin-top: 16px; }
.rd .rda-src__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rd .rda-src__list li { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rd .rda-src__list li:last-child { padding-bottom: 0; border-bottom: 0; }
.rd .rda-src__list li::before { display: none; }
.rd .rda-src__list b { font: 600 14px/1.35 var(--f-ui); color: var(--ink); }
.rd .rda-src__list span { font: 400 13px/1.45 var(--f-ui); color: var(--mute); }
.rd .rda-src__list a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-mid); text-underline-offset: 2px; }
.rd .rd-article__aside .ymyl-disclaimer { margin: 0; padding: 24px; border-radius: 22px; }
.rd .rd-article__aside .ymyl-disclaimer strong { display: block; margin-bottom: 10px; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink); }

/* ===== планшет ===== */
@media (max-width: 1024px) {
    .rd #bio-calc .bio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== телефон ===== */
@media (max-width: 639px) {
    .rd #bio-calc .rda-form { gap: 22px; }
    .rd #bio-calc .bio-mode { align-items: stretch; }
    .rd #bio-calc .bio-tabs { display: flex; }
    .rd #bio-calc .bio-tab { flex: 1 1 0; padding: 9px 10px; }
    .rd #bio-calc .bio-fields { grid-template-columns: 84px minmax(0, 1fr) 96px; gap: 10px; }
    .rd #bio-calc .bio-sel { padding: 0 32px 0 12px; background-position: right 10px center; font-size: 15px; }
    .rd #bio-calc input.bio-sel { padding: 0 12px; }
    .rd #bio-calc .bio-target-row:not([style*="none"]) { flex-direction: column; align-items: stretch; gap: 10px; }
    .rd #bio-calc .bio-field--target { width: auto; }
    .rd #bio-calc .bio-shift__b { flex: 1 1 0; padding: 0 10px; height: 44px; }
    .rd #bio-calc .bio-ext-toggle { padding: 14px; }
    .rd #bio-calc .rda-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .rd #bio-calc .rda-btn--ink { padding-left: 16px; padding-right: 16px; }
    .rd #bio-calc .bio-chip-ex { grid-column: 1 / -1; }

    .rd #bio-calc .rda-result { gap: 22px; padding: 16px; }
    .rd #bio-calc #bio-output > .bio-h { margin-top: 26px; }
    .rd #bio-calc .bio-h { font-size: 18px; }
    .rd #bio-calc .bio-sub { font-size: 13px; }
    .rd #bio-calc .bio-banner { padding: 12px 14px; font-size: 15px; }
    .rd #bio-calc .bio-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .rd #bio-calc .bio-card { padding: 16px; }
    .rd #bio-calc .bio-card__pct { font-size: 40px; }
    .rd #bio-calc .bio-chart-wrap { padding: 14px 12px 12px; }
    .rd #bio-calc .bio-tbl { font-size: 14px; }
    .rd #bio-calc .bio-tbl th, .rd #bio-calc .bio-tbl td { padding-left: 8px; padding-right: 8px; }
    .rd #bio-calc .bio-crit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rd #bio-calc .bio-crit-list li { padding: 12px 10px; }
    .rd #bio-calc .bio-tag { max-width: 100%; padding: 2px 7px; font-size: 11px; }
    .rd #bio-calc .bio-tag::before { display: none; }
    .rd #bio-calc .bio-total { padding: 14px 16px; }
    .rd #bio-calc .dt-transfer__row { grid-template-columns: minmax(0, 1fr); }
    .rd .rd-article__aside .ymyl-disclaimer { padding: 20px; border-radius: 20px; }
}
