/* =========================
   Фізичні калькулятори
   у єдиному стилі з калькулятором відсотків (все всередині .ph)
========================= */

.ph,
.ph * {
    box-sizing: border-box;
}

.ph {
    --e-card: #fff;
    --e-text: #222;
    --e-muted: #6b7280;
    --e-brand: #283b69;
    --e-brand2: #1f2f55;
    --e-border: #e6e8ef;
    --e-shadow: 0 1px 3px rgba(31, 47, 85, .06), 0 10px 30px rgba(40, 59, 105, .14);
    --e-radius: 20px;
    font-family: var(--font-sans);
    color: var(--e-text);
}

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

.ph__titlebar {
    background: var(--header-grad-solid, linear-gradient(180deg, #2c3b5f 0%, #40527e 55%, #566a9e 100%));
    color: #fff;
    border-radius: var(--e-radius);
    padding: 16px;
    box-shadow: var(--e-shadow);
    margin-bottom: 14px;
}

.ph__h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.ph__p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    line-height: 1.55;
}

.ph__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 14px;
    align-items: start;
}

@media (max-width: 980px) {
    .ph__grid {
        grid-template-columns: 1fr;
    }
}

.ph__card {
    background: var(--e-card);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius);
    box-shadow: var(--e-shadow);
    padding: 14px;
    min-width: 0;
    scroll-margin-top: 90px;
}

.ph__sectionTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--e-border);
}

.ph__h2 {
    font-size: 15px;
    margin: 0;
    font-weight: 800;
    color: var(--e-brand2);
}

.ph__badge {
    font-size: 12px;
    color: #fff;
    background: rgba(40, 59, 105, .9);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.ph__auto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    color: #2b3a55;
    cursor: pointer;
}

.ph__auto input {
    width: 16px;
    height: 16px;
    accent-color: #283b69;
}

.ph__mt12 {
    margin-top: 12px;
}

/* ===== Поля ===== */
.ph__rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 520px) {
    .ph__rows {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ph__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ph__label {
    font-weight: 900;
    font-size: 13px;
    color: #2b3a55;
}

.ph__hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--e-muted);
    line-height: 1.4;
}

.ph__req {
    margin-left: 2px;
    font-weight: 900;
    color: #d64545;
    cursor: help;
}

.ph input.ph__input {
    height: 36px;
    width: 100%;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    outline: none;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph input.ph__input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.ph select.ph__input {
    height: 36px;
    width: 100%;
    padding: 0 10px;
    border: .8px solid #b9cdee;
    border-radius: 10px;
    background-color: #eaf1fc;
    color: #1f2f55;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

.ph input.ph__input:focus {
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .14), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph select.ph__input:focus {
    border-color: #8fa8d6;
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .14);
}

/* вибір валюти: кнопка з прапорцем і випадний список (як у калькуляторах пального та TCO) */
.ph__dd {
    position: relative;
    align-self: flex-start;
}

.ph__ddBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #b9cdee;
    border-radius: 10px;
    background: #eaf1fc;
    color: #1f2f55;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ph__ddBtn:hover {
    background: #e0eafa;
    border-color: #8fa8d6;
}

.ph__ddBtn:focus-visible {
    outline: none;
    border-color: #283b69;
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .14);
}

.ph__ddFlag {
    display: block;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(31, 47, 85, .15);
}

.ph__caret {
    width: 7px;
    height: 7px;
    margin: 0 2px 3px 2px;
    border-right: 2px solid #1f2f55;
    border-bottom: 2px solid #1f2f55;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

.ph__ddBtn[aria-expanded="true"] .ph__caret {
    transform: rotate(-135deg);
    margin-bottom: 0;
}

.ph__ddList {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 250px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(31, 47, 85, .08), 0 14px 32px rgba(40, 59, 105, .20);
}

.ph__ddList[hidden] {
    display: none;
}

.ph__ddList li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: #1f2937;
    cursor: pointer;
}

.ph__ddList li:hover,
.ph__ddList li:focus {
    background: #eaf1fc;
    outline: none;
}

.ph__ddList li[aria-selected="true"] {
    background: #dfeafb;
    font-weight: 700;
}

.ph__ddCode {
    flex: 0 0 38px;
    font-weight: 700;
    color: #1f2f55;
}

.ph__ddName {
    color: #5b6b8c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 520px) {
    .ph__ddList {
        min-width: 230px;
    }
}

/* блоки всередині картки */
.ph__block {
    background: #f6f7fb;
    border: 1px solid var(--e-border);
    border-radius: 14px;
    padding: 12px;
}

.ph__miniTitle {
    font-weight: 800;
    color: var(--e-brand2);
    font-size: 13px;
    margin-bottom: 10px;
}

.ph__block .ph__rows {
    margin-top: 0;
}

/* згорнутий блок */
.ph__details {
    border: 1px solid var(--e-border);
    border-radius: 14px;
    background: #f6f7fb;
    padding: 0 14px;
}

.ph__details[open] {
    padding-bottom: 14px;
}

.ph__details > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 900;
    font-size: 13px;
    color: #1f2f55;
    padding: 12px 0;
}

.ph__details > summary::-webkit-details-marker {
    display: none;
}

.ph__details > summary::after {
    content: "▾";
    float: right;
    transition: transform .15s ease;
}

.ph__details[open] > summary::after {
    transform: rotate(180deg);
}

/* ===== Режим: чіпи зі значками ===== */
.ph__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ph__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #dfe5f2;
    border-radius: 12px;
    background: #fff;
    color: #1f2f55;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .06), 0 4px 10px rgba(40, 59, 105, .08);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ph__chip .ph__ico {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #5b78b8;
}

.ph__chip:hover {
    transform: translateY(-1px);
    border-color: #b9cdee;
    background: #f6f9ff;
    box-shadow: 0 2px 4px rgba(31, 47, 85, .08), 0 8px 16px rgba(40, 59, 105, .14);
}

.ph__chip.is-active {
    border-color: #8fa8d6;
    background: #eaf1fc;
    transform: none;
    box-shadow: 0 6px 14px rgba(60, 99, 196, .22);
}

.ph__chip.is-active .ph__ico {
    color: #283b69;
}


/* ===== Кнопки ===== */
.ph__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ph__btn {
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #1f2f55 0%, #2c4070 55%, #3c538f 100%);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 14px rgba(40, 59, 105, .35);
    transition: filter .15s ease, transform .15s ease;
}

.ph__btn:hover {
    filter: brightness(1.12);
}

.ph__btn:active {
    transform: translateY(1px);
}

#exampleBtn {
    background: #eaf1fc;
    color: #1f2f55;
    box-shadow: inset 0 0 0 1px #b9cdee;
}

#exampleBtn:hover {
    background: #dfe9fa;
    filter: none;
}

.ph__btn--wide {
    min-width: 150px;
    padding: 0 22px;
}

.ph__toast {
    margin-top: 10px;
    font-size: 12px;
    color: var(--e-muted);
    min-height: 16px;
}

/* ===== Результат ===== */
.ph__result {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.ph__hintbox {
    background: #fff4d6;
    border: 1px solid #f0d48a;
    color: #8a5a00;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.ph__head {
    font-size: 12px;
    font-weight: 700;
    color: #5b6b8c;
    margin-bottom: 10px;
}

.ph__kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ph__kpi {
    background: #fff;
    border: 1px solid #dfe5f2;
    border-radius: 14px;
    padding: 11px 12px;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .05), 0 6px 14px rgba(40, 59, 105, .09);
    min-width: 0;
}

.ph__kpi--main {
    background: linear-gradient(135deg, #eef4fd 0%, #dfe9fa 100%);
    border-color: #c5d6f1;
}

.ph__kpiT {
    font-size: 12px;
    font-weight: 700;
    color: #5b6b8c;
}

.ph__kpiV {
    margin-top: 3px;
    font-size: 20px;
    font-weight: 900;
    color: #1f2f55;
    line-height: 1.2;
}

.ph__kpiM {
    margin-top: 3px;
    font-size: 12px;
    color: var(--e-muted);
    line-height: 1.35;
}

.ph__sub {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #1f2f55;
}

.ph__note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--e-muted);
    line-height: 1.45;
}

/* порівняння: дешевший — м'яко-зелений, дорожчий — м'яко-червоний */
.ph__kpi.is-win {
    background: #eaf6ee;
    border-color: #bfe3cb;
}

.ph__kpi.is-lose {
    background: #fdeeee;
    border-color: #f1c4c4;
}

.ph__verdict {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2f55;
    background: #eaf1fc;
    border: 1px solid #c5d6f1;
}

.ph__verdict.is-home,
.ph__verdict.is-station {
    background: #eaf6ee;
    border-color: #bfe3cb;
}

.ph__colHead {
    grid-column: 1 / -1;
    margin: 6px 0 -2px;
    font-size: 12px;
    font-weight: 900;
    color: #283b69;
}

.ph-mini {
    font-size: 12px;
    color: var(--e-muted);
}

@media (max-width: 420px) {
    .ph__kpiV {
        font-size: 18px;
    }
}

/* ===== Споріднені калькулятори ===== */
.cc-related {
    max-width: 900px;
    margin: 28px auto 0;
    padding: 0 16px;
}

.cc-related h2 {
    color: #283b69;
    font-size: 22px;
    margin-bottom: 16px;
    text-align: center;
}

.cc-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cc-related-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: #444;
    box-shadow: 0 6px 20px rgba(40, 59, 105, .12);
    transition: transform .15s ease, box-shadow .15s ease;
}

.cc-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(40, 59, 105, .2);
}

.cc-related-card b {
    color: #283b69;
    font-size: 15px;
}

.cc-related-card span {
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .cc-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SEO / FAQ ===== */
.cc-divider {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border-top: 2px dashed rgba(40, 59, 105, .35);
}

.cc-seo,
.cc-faq {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 16px;
}

.cc-seo h2,
.cc-faq h2 {
    font-size: 22px;
    color: #283b69;
    margin-bottom: 14px;
}

.cc-seo p {
    margin-bottom: 14px;
    line-height: 1.6;
    font-size: 15px;
}

.cc-seo a {
    color: #283b69;
    font-weight: 700;
}

.cc-faq-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(40, 59, 105, .09);
}

.cc-faq-item h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #283b69;
}

.cc-faq-item p {
    font-size: 14px;
    color: #444;
    line-height: 1.55;
}

/* довгі списки (розетка, потужність станції) — на всю ширину рядка */
.ph__field--full {
    grid-column: 1 / -1;
}

/* ===== запас ходу: додаткові елементи ===== */
.ph__kpi--wide {
    grid-column: 1 / -1;
}

.ph__kpi--main .ph__kpiV {
    font-size: 26px;
}

.ph__link {
    color: #283b69;
    font-weight: 700;
    text-decoration: underline;
}

.ph__verdict.is-ok {
    background: #eaf6ee;
    border-color: #bfe3cb;
}

.ph__verdict.is-bad {
    background: #fdeeee;
    border-color: #f1c4c4;
}

/* кнопки результату — однакової ширини на всю ширину блоку */
#shareBtn,
#exampleBtn,
#resetBtn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
}

/* ===== власне авто чи таксі: додаткові елементи ===== */
.ph__mt10 {
    margin-top: 10px;
}

.ph__block + .ph__block {
    margin-top: 12px;
}

.ph__rows[hidden] {
    display: none;
}

.ph__rows--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ph__chips + .ph__rows {
    margin-top: 12px;
}

.ph__details .ph__rows {
    margin-top: 0;
}

.ph__verdict.is-ok {
    background: #eaf6ee;
    border-color: #bfe3cb;
}

.ph__verdict.is-warn {
    background: #eaf6f6;
    border-color: #b9dfe0;
}

.ph__tbl {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.ph__tbl th,
.ph__tbl td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--e-border);
    color: #1f2f55;
}

.ph__tbl th {
    text-align: left;
    font-weight: 700;
    color: #5b6b8c;
}

.ph__tbl td {
    text-align: right;
}

.ph__tbl thead th {
    font-size: 12px;
    font-weight: 800;
}

.ph__tbl thead th:last-child {
    text-align: right;
}

.ph__tbl tr.ph__total th,
.ph__tbl tr.ph__total td {
    border-bottom: 0;
    font-weight: 900;
    color: #1f2f55;
}

.ph__chart {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 6px;
}

.ph__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--e-muted);
}

.ph__legend i {
    display: inline-block;
    width: 18px;
    height: 4px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: middle;
}

/* вирівнювання полів: підписи різної довжини не зсувають поля, рядки підсітки спільні для обох колонок */
@supports (grid-template-rows: subgrid) {
    .ph__rows > .ph__field {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 3;
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0;
        align-content: start;
    }

    .ph__rows > .ph__field > :nth-child(2),
    .ph__rows > .ph__field > :nth-child(3) {
        margin-top: 6px;
    }
}

.ph__tbl--cmp thead th:not(:first-child) {
    text-align: right;
}

.ph__qrow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph__qchip {
    height: 30px;
    padding: 0 12px;
    border: 1px solid #b9cdee;
    border-radius: 999px;
    background: #eaf1fc;
    color: #1f2f55;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.ph__qchip:hover {
    background: #dfe9fa;
    border-color: #8fa8d6;
}

.ph__qchip.is-on {
    background: #283b69;
    border-color: #283b69;
    color: #fff;
}

.ph__chips {
    margin-bottom: 12px;
}

.ph__chip {
    padding: 8px 12px;
}

@media (max-width: 520px) {
    .ph__chips .ph__chip {
        flex: 1 1 100%;
    }
}

.ph__cur {
    display: flex;
    gap: 6px;
}

.ph__cur .ph__chip {
    padding: 6px 12px;
}

.ph__titleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.ph__donut {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.ph__donutSvg {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
}

.ph__dl {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ph__dl li {
    display: grid;
    grid-template-columns: 10px 1fr;
    column-gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--e-muted);
    line-height: 1.3;
}

.ph__dl li i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.ph__dl li b {
    grid-column: 2;
    font-size: 13px;
    color: #1f2f55;
}

.ph__sectionTitle .ph__ddList {
    min-width: 250px;
}

.ph__link {
    display: inline-block;
    margin-top: 8px;
    color: #283b69;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
}

.ph__chipsRow {
    grid-column: 1 / -1;
}

.ph__schedule {
    margin-top: 14px;
}

.ph__schedHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.ph__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph__tableWrap {
    max-height: 460px;
    overflow: auto;
    border: 1px solid var(--e-border);
    border-radius: 12px;
}

.ph__tbl--sch {
    margin-top: 0;
    min-width: 440px;
}

.ph__tbl--sch th,
.ph__tbl--sch td {
    text-align: right;
    white-space: nowrap;
}

.ph__tbl--sch thead th {
    position: sticky;
    top: 0;
    background: #eaf1fc;
    z-index: 1;
}

.ph__tbl--sch th:first-child,
.ph__tbl--sch td:first-child {
    text-align: left;
    font-weight: 700;
    color: #5b6b8c;
}

.ph__tbl--sch tbody tr:nth-child(even) td {
    background: #f6f7fb;
}

.ph__tbl--sch tr.ph__total td {
    position: sticky;
    bottom: 0;
    background: #eaf1fc;
    font-weight: 900;
    color: #1f2f55;
    border-bottom: 0;
}

.ph__qchip--tool {
    height: 32px;
}

/* таблиця в SEO-тексті */
.cc-seo table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 14px;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(40, 59, 105, .09);
}

.cc-seo th,
.cc-seo td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid #e6e8ef;
}

.cc-seo th {
    background: #eaf1fc;
    color: #1f2f55;
}

.cc-seo tr:last-child td {
    border-bottom: 0;
}

.cc-seo .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
    .cc-seo th,
    .cc-seo td {
        padding: 8px 6px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .cc-seo table {
        display: block;
        overflow-x: auto;
    }
}

.ph__inwrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ph__inwrap .ph__input {
    flex: 1 1 auto;
    min-width: 0;
}

.ph__seg {
    flex: 0 0 auto;
    display: inline-flex;
    border: 1px solid #b9cdee;
    border-radius: 10px;
    overflow: hidden;
    background: #eaf1fc;
}

.ph__seg button {
    height: 34px;
    min-width: 44px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #1f2f55;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ph__seg button.is-on {
    background: #283b69;
    color: #fff;
}

.ph .ph__input[type="date"] {
    min-height: 36px;
    font-family: inherit;
}

/* сценарій: власний випадний список */
.ph__sel {
    position: relative;
}

.ph__selBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 12px 0 10px;
    border: .8px solid #b9cdee;
    border-radius: 10px;
    background: #eaf1fc;
    color: #1f2f55;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ph__selBtn:hover {
    background: #e0eafa;
    border-color: #8fa8d6;
}

.ph__selBtn:focus-visible,
.ph__selBtn[aria-expanded="true"] {
    outline: none;
    border-color: #283b69;
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .14);
}

.ph__selBtn[aria-expanded="true"] .ph__caret {
    transform: rotate(-135deg);
    margin-bottom: 0;
}

.ph__selList {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 30;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(31, 47, 85, .08), 0 14px 32px rgba(40, 59, 105, .20);
}

.ph__selList[hidden] {
    display: none;
}

.ph__selList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ph__selList li:hover,
.ph__selList li:focus {
    background: #eaf1fc;
    outline: none;
}

.ph__selList li[aria-selected="true"] {
    background: #dfeafb;
    color: #1f2f55;
    font-weight: 800;
}

.ph__selList li[aria-selected="true"]::after {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 11px;
    margin: 0 4px 3px 0;
    border-right: 2px solid #283b69;
    border-bottom: 2px solid #283b69;
    transform: rotate(45deg);
}


.ph__field[hidden] {
    display: none;
}

.ph__block .ph__mt12 {
    margin-top: 12px;
}

.ph__link {
    margin-right: 14px;
}

.ph__hint .ph__link {
    margin-right: 0;
    display: inline;
    font-size: inherit;
}

.ph__miniTitle {
    margin: 4px 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #1f2f55;
}

.ph__stages {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #8fa8d6;
    border-radius: 14px;
    background: #f6f9ff;
}

.ph__stages[hidden] {
    display: none;
}

.ph__wsum {
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 800;
}

.ph__wsum.is-ok {
    color: #0f7a3a;
}

.ph__wsum.is-bad {
    color: #b45309;
}

/* результат */
.ph__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #c5d6f1;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef4fd 0%, #dfe9fa 100%);
}

.ph__big {
    margin-top: 2px;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
    color: #1f2f55;
    overflow-wrap: anywhere;
}

.ph__eq {
    margin-top: 4px;
    font-size: 12px;
    color: #5b6b8c;
}

.ph__per {
    text-align: right;
}

.ph__perV {
    margin-top: 2px;
    font-size: 20px;
    font-weight: 900;
    color: #1f2f55;
}

.ph__bar {
    display: flex;
    height: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6e8ef;
}

.ph__bar > div {
    min-width: 2px;
}

.ph__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 12px;
    color: #5b6b8c;
}

.ph__legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 3px;
    vertical-align: -1px;
}

.ph__kpis--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.ph__result {
    container-type: inline-size;
}

.ph__kpis--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

@container (min-width: 500px) {
    .ph__kpis--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ph__kpiV {
    overflow-wrap: anywhere;
}

@media (max-width: 420px) {
    .ph__block .ph__rows {
        grid-template-columns: minmax(0, 1fr);
    }

    .ph__kpis--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ph__kpi .ph__kpiV--s {
        font-size: 14px;
    }
}

.ph__tbl--sch {
    min-width: 520px;
}

.ph__tbl--sch th,
.ph__tbl--sch td {
    text-align: right;
}

.ph__tbl--sch th:first-child,
.ph__tbl--sch td:first-child {
    text-align: left;
}

/* підписи полів, що переносяться на 2 рядки: притиснуті до поля, зірочка не відривається */
@supports (grid-template-rows: subgrid) {
    .ph__rows > .ph__field > .ph__label {
        align-self: end;
    }
}

.ph__req {
    white-space: nowrap;
}

/* вибір режиму: картки з підписом */
.ph__mcards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ph__mcard {
    min-width: 0;
    padding: 10px;
    border: 1px solid #c5d6f1;
    border-radius: 14px;
    background: #fff;
    color: #1f2f55;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.ph__mcard b {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.ph__mcard span {
    display: block;
    margin-top: 4px;
    color: #5b6b8c;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
}

.ph__mcard:hover {
    border-color: #8fa8d6;
}

.ph__mcard.is-active {
    border-color: #283b69;
    background: #eaf1fc;
    box-shadow: 0 0 0 1px #283b69;
}

@media (max-width: 560px) {
    .ph__mcards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 340px) {
    .ph__mcards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ціни етапів: акцентний блок */
.ph__rates {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #8fa8d6;
    border-radius: 14px;
    background: #f6f9ff;
}

.ph__rates[hidden],
[data-panel][hidden] {
    display: none;
}

.ph__hint--mb {
    margin-bottom: 8px;
}

.ph__lists {
    margin-top: 10px;
    color: #3d4d73;
    font-size: 12.5px;
    line-height: 1.5;
}

.ph__perV--s {
    font-size: 15px;
}

.ph__mt6 {
    margin-top: 6px;
}

/* підказка з орієнтиром ціни: на всю ширину, без підсітки */
.ph__rows > .ph__field--hintrow {
    display: block;
    grid-row: auto;
    grid-column: 1 / -1;
    margin-top: -4px;
}

.ph__hint--tip {
    padding: 8px 10px;
    border-radius: 10px;
    background: #eef4ff;
    color: #3d4d73;
}

/* чотири кнопки під результатом: не стискаємо, а переносимо на новий рядок */
#shareBtn,
#exampleBtn,
#resetBtn,
#copyBtn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

/* акцентний блок «додаткові параметри» */
.ph__details {
    padding: 0;
    border: 1px solid #8fa8d6;
    background: #f6f9ff;
}

.ph__details[open] {
    padding-bottom: 14px;
}

.ph__details > summary {
    border-radius: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #eef4ff, #dbe8fb);
    color: #1f2f55;
    font-size: 13.5px;
    transition: background .15s ease;
}

.ph__details[open] > summary {
    border-radius: 13px 13px 0 0;
}

.ph__details > summary:hover {
    background: linear-gradient(180deg, #e6efff, #d0e0fa);
}

.ph__details > summary::before {
    content: "+";
    display: grid;
    flex: 0 0 22px;
    place-items: center;
    height: 22px;
    border-radius: 50%;
    background: #283b69;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.ph__details[open] > summary::before {
    content: "−";
}

.ph__details > summary::after {
    float: none;
    margin-left: auto;
}

.ph__details > :not(summary) {
    margin-right: 14px;
    margin-left: 14px;
}

.ph__details > .ph__rows {
    margin-top: 12px;
}


/* елементи конструкції */
.ph__el {
    margin-bottom: 8px;
    padding: 10px 12px 12px;
    border: 1px solid #c5d6f1;
    border-radius: 14px;
    background: #f6f9ff;
}

.ph__el[hidden] {
    display: none;
}

.ph__elHead {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #1f2f55;
    font-size: 13px;
    font-weight: 800;
}

.ph__elVol {
    margin-left: auto;
    color: #0f7a3a;
    font-size: 12.5px;
    font-weight: 800;
}

.ph__elRm {
    width: 26px;
    height: 26px;
    border: 1px solid #c5d6f1;
    border-radius: 8px;
    background: #fff;
    color: #5b6b8c;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ph__elRm:hover {
    border-color: #8fa8d6;
    color: #283b69;
}

.ph__elRm[hidden] {
    display: none;
}

.ph__add {
    margin: 0 0 4px;
    padding: 9px 14px;
    border: 1px dashed #8fa8d6;
    border-radius: 12px;
    background: transparent;
    color: #283b69;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.ph__add:hover {
    background: #eaf1fc;
}

.ph__add[hidden] {
    display: none;
}

.ph__mt2 {
    margin-top: 2px;
}

.ph__rows .ph__rows {
    margin: 0;
}

.ph__field[hidden] {
    display: none;
}

/* цегла на 1 м²: позначка біля головного числа */
.ph__chipWrap {
    margin-top: 6px;
}

.ph__chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #0f7a3a;
    font-size: 12px;
    font-weight: 800;
}

/* шапка результату: вартість справа, зліва текст переноситься; на вузьких екранах вартість під текстом */
.ph__head > div:first-child {
    flex: 1 1 0;
    min-width: 0;
}

.ph__per {
    flex: none;
}

@media (max-width: 480px) {
    .ph__head > div:first-child {
        flex: 1 1 100%;
    }

    .ph__per {
        text-align: left;
    }
}

/* схема розкрою рулону */
.ph__diag {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #dbe3f2;
    border-radius: 12px;
    background: #fff;
}

/* вага по позиціях: таблиця в результаті, кольорові точки */
.ph__dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
}

.ph__prof {
    display: flex;
    justify-content: center;
    margin: 2px 0 8px;
}

.ph__profSvg {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
}

.ph__tbl--res {
    margin-top: 0;
}

.ph__tbl--res th,
.ph__tbl--res td {
    text-align: right;
}

.ph__tbl--res th:first-child,
.ph__tbl--res td:first-child,
.ph__tbl--sch th:first-child,
.ph__tbl--sch td:first-child {
    text-align: left;
}

.ph__tbl--res td:first-child {
    line-height: 1.25;
}

.ph__sz {
    display: block;
    margin-left: 15px;
    font-size: 12px;
    font-weight: 600;
    color: #5b6b8c;
}

.ph__tbl--res td:nth-child(2) {
    white-space: nowrap;
}

/* ===== стиль калькулятора відсотків ===== */
/* =========================
   Percent Calculator (scoped)
   only inside .ph / .ccalc
========================= */

.ph,
.ph * {
    box-sizing: border-box;
}

.ph {
    --cc-card: #fff;
    --cc-text: #222;
    --cc-muted: #6b7280;
    --cc-brand: #283b69;
    --cc-brand2: #1f2f55;
    --cc-border: #e6e8ef;
    --cc-shadow: 0 1px 3px rgba(31, 47, 85, .06), 0 10px 30px rgba(40, 59, 105, .14);
    --cc-radius: 20px;

    font-family: var(--font-sans);
    color: var(--cc-text);
}

/* Wrap */
.ph .ph__wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 0 40px;
}

/* Titlebar */
.ph .ph__titlebar {
    background: var(--header-grad-solid, linear-gradient(180deg, #2c3b5f 0%, #40527e 55%, #566a9e 100%));
    color: #fff;
    border-radius: var(--cc-radius);
    padding: 16px;
    box-shadow: var(--cc-shadow);
    margin-bottom: 14px;
}

.ph .ph__h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.ph .ph__p {
    margin: 6px 0 0;
    opacity: .92;
    font-size: 13px;
}

/* ===== Layout fix: Введи дані зліва, Результат справа ===== */

/* grid layout */
.ph .ph__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

/* Topline (checkbox) - зліва зверху */
.ph .ph__grid>.evc-topline {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    /* прибираємо зайві відступи */
    padding: 0 2px 6px;
}

/* Card "Введи дані" - зліва під чекбоксом */
.ph .ph__grid>.ph__card:first-of-type {
    grid-column: 1;
    grid-row: 2;
}

/* Card "Результат" - справа, по висоті займає 2 рядки */
.ph .ph__grid>.ph__card:last-of-type {
    grid-column: 2;
    grid-row: 1 / span 2;
}

/* Трошки “симетрії” по висоті і відчуття балансу */
.ph .ph__grid>.ph__card {
    display: flex;
    flex-direction: column;
}


/* Mobile: все в одну колонку */
@media (max-width: 980px) {
    .ph .ph__grid {
        grid-template-columns: 1fr;
    }

    .ph .ph__grid>.evc-topline,
    .ph .ph__grid>.ph__card:first-of-type,
    .ph .ph__grid>.ph__card:last-of-type {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Card */
.ph .ph__card {
    background: var(--cc-card);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 14px;
    min-width: 0;
}

/* Section title */
.ph .ph__sectionTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--cc-border);
}

.ph .ph__h2 {
    font-size: 15px;
    margin: 0;
    font-weight: 800;
    color: var(--cc-brand2);
}

.ph .ph__badge {
    font-size: 12px;
    color: #fff;
    background: rgba(40, 59, 105, 0.9);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Tabs */
.ph__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 720px) {
    .ph__tabs {
        grid-template-columns: 1fr 1fr;
    }
}

.ph__tab {
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f2f4fa;
    font-weight: 900;
    font-size: 12px;
    color: #2b3a55;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.ph__tab:hover {
    transform: translateY(-1px);
    background: #eaeef8;
    box-shadow: 0 2px 5px rgba(31, 47, 85, .06), 0 6px 14px rgba(40, 59, 105, .12);
}

.ph__tab.is-active {
    background: rgba(40, 59, 105, .12);
    color: var(--cc-brand2);
    box-shadow: 0 1px 2px rgba(31, 47, 85, .05), 0 4px 12px rgba(40, 59, 105, .2);
}

/* Panels */


/* Fields */
.ph .ph__rows {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

@media (max-width: 680px) {
    .ph .ph__rows {
        grid-template-columns: 1fr;
    }
}

.ph .ph__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ph__field--full {
    grid-column: 1 / -1;
}

.ph .ph__label {
    font-weight: 900;
    color: #2b3a55;
    font-size: 13px;
}

.ph .ph__input {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
    transition: box-shadow .15s ease;
}

.ph .ph__input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.ph .ph__input:focus {
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .18), 0 3px 8px rgba(40, 59, 105, .08);
    color: #111827;
}

/* Radio */
.ph__radio {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph__radio label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: #1f2f55;
    font-size: 13px;
    user-select: none;
}

.ph__radio input {
    accent-color: #283b69;
}

/* Actions */
.ph .ph__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ph .ph__btn {
    height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 12px;
    background: #f2f4fa;
    cursor: pointer;
    font-weight: 900;
    color: #1f2f55;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease, filter .15s ease;
}

.ph .ph__btn:hover {
    background: #eaeef8;
    box-shadow: 0 2px 5px rgba(31, 47, 85, .06), 0 6px 14px rgba(40, 59, 105, .12);
    transform: translateY(-1px);
}

.ph .ph__btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 2px 6px rgba(40, 59, 105, .1);
}

/* "Розрахувати" — та сама синя кнопка, що "=" на науковому калькуляторі */
.ph .ph__btn--primary {
    background: var(--brand-grad, linear-gradient(180deg, #1f2f55, #3c538f));
    color: #fff;
    box-shadow: var(--btn-inset, inset 0 1px 0 rgba(255, 255, 255, .14)), 0 4px 14px rgba(40, 59, 105, .35);
}

/* .ph__btn:hover задає свій background (#eaeef8) з такою самою специфічністю —
   без повторення тут градієнт кнопки ставав би білим (і текст невидимим) при наведенні */
.ph .ph__btn--primary:hover {
    background: var(--brand-grad, linear-gradient(180deg, #1f2f55, #3c538f));
    filter: brightness(1.08);
    box-shadow: var(--btn-inset, inset 0 1px 0 rgba(255, 255, 255, .14)), 0 6px 18px rgba(40, 59, 105, .42);
}

.ph .ph__btn--primary:active {
    background: var(--brand-grad, linear-gradient(180deg, #1f2f55, #3c538f));
    filter: none;
    box-shadow: var(--btn-inset, inset 0 1px 0 rgba(255, 255, 255, .14)), 0 2px 8px rgba(40, 59, 105, .3);
}

/* Utilities */
.ph .ph__mt10 {
    margin-top: 10px;
}

/* Result box */

.ph__details {
    margin-top: 12px;
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    color: #374151;
    font-size: 13px;
}

.ph__details:empty {
    display: none;
}

/* Toast */
.ph .ph__toast {
    margin-top: 10px;
    font-size: 12px;
    color: var(--cc-muted);
    min-height: 16px;
}
/* ===== Auto-calc checkbox (як на скріні) ===== */
.evc-topline {
    margin: 10px 0 10px;
}

.evc-autocalc {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #111827;
    font-size: 14px;
    user-select: none;
    white-space: nowrap;
}

.evc-autocalc input {
    width: 16px;
    height: 16px;
    accent-color: #283b69;
    /* твій brand */
}
/* Вирівнюємо "Результат" по горизонталі з блоком "Введи дані" */

/* Блок результату — той самий нейтральний стиль дисплея, що й на науковому калькуляторі */

/* Коли результат з'являється — легкий "живий" ефект */

@keyframes resultGlow {
    0% {
        transform: scale(0.98);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* рядки сітки: чекбокс завжди по контенту, весь запас висоти іде під картку «Введи дані» */
@media (min-width: 981px) {
    .ph .ph__grid {
        grid-template-rows: auto minmax(0, 1fr);
    }
}

/* підписи полів завжди ліворуч */
.ph .ph__field > .ph__label {
    align-self: flex-start;
}

/* вирівнюємо «Результат» по горизонталі з карткою «Введи дані» (висота чекбокса) */
.ph .ph__grid>.ph__card:last-of-type {
    margin-top: 46px;
}

@media (max-width: 980px) {
    .ph .ph__grid>.ph__card:last-of-type {
        margin-top: 0;
    }
}

/* блок із полями без окремої підкладки, як у калькуляторі відсотків */
.ph__block {
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

/* режими: сітка м'яких кнопок із прикладом (вигляд як у калькуляторі відсотків) */
.ph__tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .ph__tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ph__tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    height: auto;
    min-height: 58px;
    padding: 9px 10px;
    text-align: left;
}

.ph__tabT {
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}

.ph__ex {
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 6px;
    background: #fff;
    color: #4a64a5;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .06);
    overflow-wrap: anywhere;
}

.ph__panel[hidden] {
    display: none;
}

/* випадні списки у стилі полів вводу */
.ph .ph__selBtn {
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph .ph__selList {
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(40, 59, 105, .16);
}


/* поля коефіцієнтів і попередній перегляд рівняння */
.ph__rows3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 520px) {
    .ph__rows3 {
        grid-template-columns: 1fr;
    }
}

.ph__eqPrev {
    min-height: 22px;
    margin: 4px 0 10px;
    color: #1f2f55;
    font-size: 17px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ph__eqPrev:empty {
    display: none;
}

.ph__panel[hidden],
.ph__rowsX[hidden] {
    display: none;
}

.ph__rowsX {
    margin-top: 10px;
}

/* корені й плитки */
.ph__rt {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: 100%;
}

.ph__rt .ph__fn {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .ph .ph__forms {
        font-size: 20px;
    }

    .ph .ph__dec {
        font-size: 16px;
    }
}

.ph__rt small {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.ph__nm {
    color: #6b7280;
}

.ph__line {
    color: #1f2f55;
    font-size: 16px;
    font-weight: 900;
}

.ph__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

@media (max-width: 520px) {
    .ph__tiles {
        grid-template-columns: 1fr;
    }
}

.ph__tile {
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph__tile small {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.ph__tile b {
    display: block;
    color: #1f2f55;
    font-size: 15px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ph__tile span {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* графік */
.ph__graph {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e6e8ef;
    border-radius: 14px;
    background: #fff;
}

.ph__svg {
    display: block;
    width: 100%;
    height: auto;
}

.ph__leg {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 6px 2px;
    color: #4b5563;
    font-size: 12.5px;
    font-weight: 600;
}

.ph__legI {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ph__legD {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #dfe3ec;
}

.ph__legD--root {
    background: #283b69;
}

.ph__legD--vert {
    background: #d85a30;
}

.ph__legD--y {
    background: #6b7280;
}

.ph__legL {
    display: inline-block;
    width: 20px;
    height: 0;
    border-top: 2px dashed rgba(216, 90, 48, .6);
}

/* результат: м'яка панель «дисплея» і білі картки розв'язання */
.ph__rhead {
    padding: 14px 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(180deg, #f6f7fb, #eef0f7);
    box-shadow: 0 1px 2px rgba(31, 47, 85, .05), 0 4px 12px rgba(40, 59, 105, .1);
    animation: resultGlow .35s ease;
}

.ph__expr {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ph__forms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: #1f2f55;
    font-size: 24px;
    font-weight: 900;
}

.ph__f {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    line-height: 1.1;
}

.ph__fn {
    padding: 0 4px 3px;
    border-bottom: 2px solid currentColor;
    overflow-wrap: anywhere;
    text-align: center;
}

.ph__fd {
    padding: 3px 4px 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.ph__int {
    overflow-wrap: anywhere;
}

.ph__mx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ph__eq {
    color: #8a96b0;
    font-weight: 700;
}

.ph__dec {
    font-size: 22px;
    overflow-wrap: anywhere;
}

.ph__forms--chain {
    font-size: 20px;
}

.ph__ci {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08);
}

.ph__ci b {
    color: #6b7280;
    font-size: 13px;
}

.ph__step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e6e8ef;
    border-radius: 14px;
    background: #fff;
}

.ph__stepN {
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    height: 24px;
    margin-top: 1px;
    border-radius: 50%;
    background: #283b69;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.ph__stepT {
    display: block;
    color: #1f2f55;
    font-size: 13px;
}

.ph__math {
    margin: 3px 0 0;
    color: #374151;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ph__stepNote {
    margin: 3px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

/* панелі режимів */
.ph__panel {
    margin-top: 12px;
}

.ph .ph__panel > .ph__rows2 + .ph__rows2,
.ph .ph__panel > .ph__field + .ph__field,
.ph .ph__panel > .ph__field + .ph__rows2,
.ph .ph__panel > .ph__rows2 + .ph__field {
    margin-top: 12px;
}

.ph__rows2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 420px) {
    .ph__rows3,
    .ph__rows2--keep3 {
        grid-template-columns: 1fr;
    }
}

.ph__pt {
    margin: 12px 0 6px;
    color: #1f2f55;
    font-size: 13px;
    font-weight: 900;
}

.ph__pt:first-child {
    margin-top: 0;
}

.ph__row[hidden] {
    display: none;
}

/* блок «Налаштування»: одиниця й знаки після коми */
.ph__setbox {
    margin-top: 12px;
    padding: 10px 12px 12px;
    border: 1px solid #cfd9ee;
    border-radius: 14px;
    background: #eef2fb;
}

.ph__cap {
    margin: 0 0 8px;
    color: #6b7a99;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.ph__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ph .ph__cols .ph__field--full {
    grid-column: auto;
    min-width: 0;
}

@media (max-width: 480px) {
    .ph__cols {
        grid-template-columns: 1fr;
    }
}

/* результат: велике значення площі */
.ph__big {
    color: #1f2f55;
    font-size: 28px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ph__forms .ph__rt {
    gap: 2px 10px;
}

.ph__sub2 {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}


/* поля величин з одиницями */
.ph__vars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; }
@media (max-width: 560px) { .ph__vars { grid-template-columns: minmax(0, 1fr); } }
.ph__var { min-width: 0; }
.ph__var[hidden] { display: none; }
.ph__sym { color: #4a64a5; font-weight: 900; }
.ph__inl { display: flex; gap: 6px; }
.ph .ph__inl .ph__input { flex: 1 1 auto; min-width: 0; }
.ph select.ph__unit { flex: 0 0 auto; max-width: 46%; height: 36px; padding: 0 8px; border: .8px solid #c5cee3; border-radius: 10px; background-color: #eaf1fc; color: #1f2f55; font-size: 13px; font-weight: 700; cursor: pointer; outline: none; }
.ph .ph__unit--wide { max-width: 100%; width: 100%; }
.ph select.ph__unit:focus { border-color: #8c9bbd; box-shadow: 0 0 0 3px rgba(40, 59, 105, .14); }
.ph__findRow { display: flex; gap: 8px; align-items: flex-start; }
.ph__findRow .ph__sel { flex: 1 1 auto; min-width: 0; }
.ph .ph__findRow .ph__unit { flex: 0 0 auto; max-width: 42%; min-width: 84px; }
.ph .ph__findRow .ph__selBtn { height: 36px; border-radius: 10px; }
.ph .ph__findRow .ph__unit[hidden] { display: none; }
.ph__fnActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ph__mini { height: 34px; padding: 0 14px; border: none; border-radius: 10px; background: #eef2fb; color: #1f2f55; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 1px 2px rgba(31, 47, 85, .06); }
.ph__mini:hover:not(:disabled) { background: #e1e8f8; }
.ph__mini:disabled { opacity: .5; cursor: default; }
.ph__sgm { margin-top: 12px; padding: 10px 12px 12px; border: 1px solid #cfd9ee; border-radius: 14px; background: #eef2fb; }
.ph__sgmHead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ph__sgmHead .ph__unit--wide { flex: 1 1 160px; }
.ph__sgm .ph__vars { margin-top: 8px; }
.ph__stepB { min-width: 0; flex: 1; }
.ph__field[hidden], .ph__row[hidden], .ph__mini[hidden] { display: none; }
.ph__tblWrap { margin-top: 8px; overflow: auto; border: 1px solid var(--e-border, #e3e8f4); border-radius: 12px; background: #fff; }
.ph .ph__selBtn#fd_btn { background: #eef3fd; color: #1f2f55; font-weight: 800; box-shadow: inset 0 0 0 1.5px #d9e4f8, 0 3px 8px rgba(40, 59, 105, .08); }
/* хімічні калькулятори: поля й довгі результати */
.ph__vars { align-items: end; }
.ph__vars--one { grid-template-columns: minmax(0, 1fr); }
.ph__var--full { grid-column: 1 / -1; }
.ph .ph__inl .ph__input.ph__input--sym { flex: 0 0 76px; width: 76px; text-align: center; font-weight: 800; }
.ph .ph__big--sm { font-size: 20px; line-height: 1.25; }
.ph__tblWrap { overflow-x: auto; }
.ph__tbl th, .ph__tbl td { white-space: nowrap; }
.ph__tbl tr.ph__total th, .ph__tbl tr.ph__total td { background: #eef3fd; }
.ph__tbl thead th:not(:first-child) { text-align: right; }
/* вступ: поля з двома-трьома значеннями в рядку, розкривна таблиця */
.ph__inl2, .ph__inl3 { display: flex; gap: 8px; }
.ph .ph__inl2 .ph__input, .ph .ph__inl3 .ph__input { flex: 1 1 0; min-width: 0; width: auto; }
.ph .ph__inl3 .ph__input:first-child { flex: 1.6 1 0; }
.ph__det { margin-top: 12px; }
.ph__det > summary { cursor: pointer; padding: 10px 12px; border-radius: 12px; background: #eef2fb; color: #1f2f55; font-size: 13px; font-weight: 800; list-style: none; }
.ph__det > summary::-webkit-details-marker { display: none; }
.ph__det[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ph__det .ph__tblWrap { margin-top: 0; max-height: 360px; overflow: auto; border-top-left-radius: 0; border-top-right-radius: 0; }
/* статистика: багаторядкове поле чисел */
.ph textarea.ph__input.ph__ta { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; font-family: inherit; line-height: 1.45; white-space: pre-wrap; }
.ph__chart { margin-top: 6px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(31, 47, 85, .06); }
/* GPA: рядки курсів */
.ph__crows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ph__crow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #cfd9ee; border-radius: 12px; background: #eef2fb; }
.ph__crowN { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #283b69; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ph .ph__crow .ph__crowName { flex: 1 1 150px; width: auto; min-width: 0; }
.ph__crowG { flex: 0 0 108px; min-width: 0; }
.ph .ph__crow .ph__crowC { flex: 0 0 86px; width: 86px; }
.ph__crowT { flex: 0 0 140px; min-width: 0; }
.ph__crowX { flex: 0 0 32px; height: 32px; border: none; border-radius: 8px; background: #fff; color: #6b7a99; font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px rgba(31, 47, 85, .08); }
.ph__crowX:hover { background: #fbe4e4; color: #b3261e; }
@media (max-width: 560px) { .ph__crowN { display: none; } .ph .ph__crow .ph__crowName { flex-basis: 100%; } .ph__crowG { flex: 1 1 100px; } .ph__crowT { flex: 1 1 130px; } }
/* згортаємий блок «Налаштування» */
.ph details.ph__setbox { padding: 0; }
.ph details.ph__setbox > summary { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 10px 12px; list-style: none; cursor: pointer; user-select: none; }
.ph details.ph__setbox > summary::-webkit-details-marker { display: none; }
.ph details.ph__setbox > summary:focus-visible { outline: 2px solid #4f6fb8; outline-offset: -2px; border-radius: 14px; }
.ph details.ph__setbox > summary .ph__caret { border-color: #6b7a99; }
.ph details.ph__setbox[open] > summary .ph__caret { transform: rotate(-135deg); margin-bottom: 0; }
.ph details.ph__setbox[open] > summary { padding-bottom: 8px; }
.ph details.ph__setbox > .ph__cols, .ph details.ph__setbox > .ph__hint { margin-left: 12px; margin-right: 12px; }
.ph details.ph__setbox > .ph__hint { margin-bottom: 12px; }
.ph details.ph__setbox .ph__field[hidden], .ph details.ph__setbox .ph__hint[hidden] { display: none; }
/* власний список одиниць замість рідного select */
.ph select.ph__unit.is-enh { display: none; }
.ph .ph__usel { position: relative; flex: 0 0 auto; max-width: 46%; }
.ph .ph__usel[hidden] { display: none; }
.ph .ph__usel--wide { max-width: 100%; width: 100%; flex: 1 1 160px; }
.ph .ph__findRow .ph__usel { max-width: 42%; min-width: 84px; }
.ph .ph__uselBtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 66px; height: 36px; padding: 0 10px; border: .8px solid #c5cee3; border-radius: 10px; background: #eaf1fc; color: #1f2f55; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.ph .ph__uselBtn:hover { background: #e0eafa; border-color: #8c9bbd; }
.ph .ph__uselBtn:focus-visible, .ph .ph__uselBtn[aria-expanded="true"] { outline: none; border-color: #283b69; box-shadow: 0 0 0 3px rgba(40, 59, 105, .14); }
.ph .ph__uselBtn[aria-expanded="true"] .ph__caret { transform: rotate(-135deg); margin-bottom: 0; }
.ph .ph__uselBtn span:first-child { overflow: hidden; text-overflow: ellipsis; }
.ph .ph__uselList { position: absolute; top: calc(100% + 6px); right: 0; left: auto; z-index: 40; min-width: 100%; width: max-content; max-width: 260px; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid #e6e8ef; border-radius: 12px; box-shadow: 0 2px 6px rgba(31, 47, 85, .08), 0 14px 32px rgba(40, 59, 105, .20); }
.ph .ph__usel--wide .ph__uselList { left: 0; width: auto; max-width: none; }
.ph .ph__uselList[hidden] { display: none; }
.ph .ph__uselList li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; color: #1f2937; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ph .ph__uselList li:hover, .ph .ph__uselList li:focus { background: #eaf1fc; outline: none; }
.ph .ph__uselList li[aria-selected="true"] { background: #e4e9f3; color: #1f2f55; font-weight: 800; }
/* заголовки груп (регіони) у списку: підкреслені, не вибираються */
.ph .ph__uselList li.ph__uselGroup { display: block; margin: 10px 4px 4px; padding: 6px 8px 6px; border-radius: 0; border-bottom: 2px solid #8fa3d6; background: none; color: #283b69; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: default; pointer-events: none; }
.ph .ph__uselList li.ph__uselGroup:first-child { margin-top: 0; }
/* кнопка в основному стилі поруч із полем (наприклад «Зараз» біля часу) */
.ph .ph__inl > .ph__btn--sm { flex: 0 0 auto; width: auto; min-width: 0; align-self: center; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
/* кнопка «+ Додати місто» у вільній клітинці сітки */
.ph .ph__addCity { align-self: end; }
.ph .ph__addCity[hidden] { display: none; }
.ph .ph__addBtn { box-sizing: border-box; width: 100%; height: 36px; border: 1.5px dashed #8fa3d6; border-radius: 10px; background: transparent; color: #283b69; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.ph .ph__addBtn:hover { background: #eaf1fc; border-color: #283b69; }
.ph .ph__addBtn:focus-visible { outline: none; border-color: #283b69; box-shadow: 0 0 0 3px rgba(40, 59, 105, .14); }
/* блок робочих годин: одна панель з акцентною смужкою, відрізняється від полів міст */
.ph .ph__var.ph__hours { padding: 10px 12px 12px; border-radius: 14px; border-left: 4px solid #283b69; background: linear-gradient(180deg, #eef2fb, #e6ecf8); box-shadow: inset 0 0 0 1px #d3dcf0; }
.ph .ph__hours .ph__label { margin-bottom: 8px; color: #283b69; letter-spacing: .02em; }
.ph .ph__hoursRow { display: flex; align-items: center; gap: 10px; }
.ph .ph__hoursRow .ph__hSep { flex: 0 0 auto; color: #4a64a5; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ph .ph__hoursRow .ph__usel { flex: 1 1 0; min-width: 0; width: auto; max-width: none; }
.ph .ph__hoursRow .ph__uselBtn { background: #fff; }
/* пошук у довгих списках */
.ph .ph__uselList li[hidden] { display: none; }
.ph .ph__uselList li.ph__uselSearchRow { position: sticky; top: -6px; z-index: 2; display: block; margin: -6px -6px 4px; padding: 8px 8px 8px; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 1px 0 #e6e8ef; cursor: default; }
.ph .ph__uselList li.ph__uselSearchRow:hover, .ph .ph__uselList li.ph__uselSearchRow:focus { background: #fff; }
.ph .ph__uselSearch { box-sizing: border-box; width: 100%; height: 34px; padding: 0 10px; border: .8px solid #c5cee3; border-radius: 9px; background: #f6f8fd; color: #1f2937; font: inherit; font-size: 13px; font-weight: 600; }
.ph .ph__uselSearch::placeholder { color: #8793b1; font-weight: 500; }
.ph .ph__uselSearch:focus { outline: none; border-color: #283b69; box-shadow: 0 0 0 3px rgba(40, 59, 105, .14); background: #fff; }
.ph .ph__uselList li.ph__uselNone { display: block; padding: 12px; color: #8793b1; font-weight: 500; cursor: default; }
.ph .ph__uselList li[aria-selected="true"]::after { content: ""; flex: 0 0 auto; width: 5px; height: 10px; margin: 0 2px 3px 0; border-right: 2px solid #283b69; border-bottom: 2px solid #283b69; transform: rotate(45deg); }
/* текстові й хронологічні калькулятори */
.ph textarea.ph__out { background: #f6f8fd; font-weight: 600; min-height: 120px; }
.ph__togGrp { margin-top: 14px; }
.ph__togTitle { margin-bottom: 6px; color: #5b6b8c; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ph__togs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ph__tog { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1.5px solid #cfd9ee; border-radius: 12px; background: #fff; color: #1f2f55; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.ph__tog:hover { border-color: #8fa8dd; background: #f3f7ff; }
.ph__tog:focus-visible { outline: 2px solid #4b7bdc; outline-offset: 2px; }
.ph__togBox { position: relative; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid #9fb1d6; border-radius: 6px; background: #fff; transition: background .15s, border-color .15s; }
.ph__tog[aria-pressed="true"] { border-color: #566a9e; background: #e6eaf4; box-shadow: 0 1px 3px rgba(40, 59, 105, .15); }
.ph__tog[aria-pressed="true"] .ph__togBox { border-color: #283b69; background: #283b69; }
.ph__tog[aria-pressed="true"] .ph__togBox::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ph .ph__tbl--txt th, .ph .ph__tbl--txt td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.ph .ph__tbl--txt td { text-align: left; }
/* свята за юліанським календарем */
.ph__fsts { container: fsts / inline-size; margin-top: 8px; border: 1px solid #dfe5f2; border-radius: 14px; background: #fff; overflow: hidden; }
.ph__fstHead, .ph__fst { display: grid; grid-template-columns: minmax(0, 1fr) 104px 128px 96px; gap: 10px; align-items: center; padding: 10px 14px; }
.ph__fstHead { background: #283b69; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.ph__fst { border-top: 1px solid #e8edf7; font-size: 13px; color: #1f2f55; }
.ph__fst:nth-child(even) { background: #f6f8fd; }
.ph__fst.is-main { background: #e6eaf4; box-shadow: inset 4px 0 0 #283b69; }
.ph__fstN { font-weight: 700; line-height: 1.3; }
.ph__fstJ { color: #5b6b8c; font-variant-numeric: tabular-nums; }
.ph__fstG b { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #e4e9f3; color: #283b69; font-weight: 800; white-space: nowrap; }
.ph__fst.is-main .ph__fstG b { background: #283b69; color: #fff; }
.ph__fstW { color: #5b6b8c; }
@container fsts (min-width: 561px) {
  .ph__fsts--n .ph__fstHead, .ph__fsts--n .ph__fst { grid-template-columns: minmax(0, 1fr) 150px 100px; }
}
@container fsts (max-width: 560px) {
  .ph__fstHead { display: none; }
  .ph__fst { grid-template-columns: 1fr auto; grid-template-areas: "n g" "j w"; gap: 4px 10px; padding: 10px 12px; }
  .ph__fstN { grid-area: n; }
  .ph__fstJ { grid-area: j; }
  .ph__fstJ::before { content: attr(data-l) ": "; color: #8a97b4; font-size: 11px; }
  .ph__fstG { grid-area: g; justify-self: end; align-self: start; }
  .ph__fstW { grid-area: w; justify-self: end; font-size: 12px; }
}
.ph__tabs[hidden] { display: none !important; }
/* плитки режимів (спорт) */
.ph__tabs.ph__tabs--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph__tabs--tiles .ph__tab { position: relative; top: 0; flex-direction: row; align-items: center; gap: 12px; min-height: 70px; padding: 12px 14px; overflow: hidden; border: 1px solid #dfe5f2; border-radius: 16px; background: linear-gradient(180deg, #fff, #f6f7fb); box-shadow: 0 1px 2px rgba(31, 47, 85, .06), 0 6px 16px rgba(40, 59, 105, .1); color: #1f2f55; transform: none; transition: top .45s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .6s ease, background .65s ease, color .65s ease; }
.ph__tabs--tiles .ph__tab::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform 1.5s ease; pointer-events: none; }
.ph__tabs--tiles .ph__tab:hover { top: -3px; transform: none; border-color: #a9b6d3; background: linear-gradient(180deg, #fff, #eceff7); box-shadow: 0 2px 4px rgba(31, 47, 85, .08), 0 14px 28px rgba(40, 59, 105, .18); }
.ph__tabs--tiles .ph__tab:hover::before { transform: translateX(120%); }
.ph__tabs--tiles .ph__tab:active { top: -1px; transform: none; }
.ph__tabs--tiles .ph__tab:focus-visible { outline: 2px solid #4b7bdc; outline-offset: 3px; }
.ph__tabs--tiles .ph__tab.is-active { border-color: #283b69; background: linear-gradient(180deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.07) 49%, rgba(255, 255, 255, 0) 50%), linear-gradient(135deg, #38497a 0%, #4f649a 55%, #6a80b8 100%); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(15, 25, 50, .25), 0 2px 4px rgba(40, 59, 105, .25), 0 14px 30px rgba(44, 59, 95, .38); animation: ph-pop .9s cubic-bezier(.2, 1.2, .3, 1); }
.ph__tabs--tiles .ph__tab.is-active::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22); }
.ph__tileIc { box-sizing: border-box; flex: 0 0 42px; width: 42px; height: 42px; padding: 10px; border-radius: 13px; background: linear-gradient(135deg, #e8ecf5, #d3daea); color: #40527e; box-shadow: inset 0 0 0 1px rgba(44, 59, 95, .12); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), background .65s ease, color .65s ease; }
.ph__tabs--tiles .ph__tab:hover .ph__tileIc { transform: rotate(-8deg) scale(1.1); }
.ph__tab.is-active .ph__tileIc { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ph__tileTx { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 10px; text-align: left; }
.ph__tabs--tiles .ph__tabT { font-size: 14px; font-weight: 800; line-height: 1.25; color: inherit; }
.ph__tabs--tiles .ph__ex { padding: 0; border-radius: 0; background: none; box-shadow: none; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.35; color: #5b6b8c; transition: color .65s ease; }
.ph__tabs--tiles .ph__tab.is-active .ph__ex { color: rgba(255, 255, 255, .85); }
@keyframes ph-pop { 0% { opacity: .5; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ph__tabs--tiles .ph__tab, .ph__tileIc, .ph__tabs--tiles .ph__tab::before { transition: none; animation: none !important; } .ph__tabs--tiles .ph__tab:hover { transform: none; } }
@media (max-width: 420px) { .ph__tabs.ph__tabs--tiles { grid-template-columns: minmax(0, 1fr); } }
/* сучасні кнопки й блок результату (сторінки з плитками) */
.ph-modern .ph__actions { gap: 10px; }
.ph-modern .ph__actions .ph__btn { flex: 1 1 140px; }
.ph-modern #calcBtn { flex: 0 0 auto; min-width: 190px; padding: 0 28px; }
.ph-modern .ph__btn { position: relative; top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; overflow: hidden; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.07) 49%, rgba(255, 255, 255, 0) 50%), linear-gradient(135deg, #38497a 0%, #4f649a 55%, #6a80b8 100%); color: #fff; font-size: 14px; font-weight: 800; filter: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(15, 25, 50, .25), 0 2px 4px rgba(40, 59, 105, .22), 0 8px 18px rgba(44, 59, 95, .32); transition: top .45s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, background .65s ease, color .65s ease; }
.ph-modern .ph__btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 1.5s ease; pointer-events: none; }
.ph-modern .ph__btn:hover { top: -2px; transform: none; filter: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(15, 25, 50, .25), 0 3px 6px rgba(40, 59, 105, .25), 0 14px 28px rgba(44, 59, 95, .42); }
.ph-modern .ph__btn:hover::before { transform: translateX(120%); }
.ph-modern .ph__btn:active { top: 0; transform: none; box-shadow: 0 1px 2px rgba(40, 59, 105, .25); }
.ph-modern .ph__btn:focus-visible { outline: 2px solid #4b7bdc; outline-offset: 3px; }
.ph-modern #exampleBtn { background: linear-gradient(180deg, #fff, #eceff7); color: #283b69; box-shadow: inset 0 0 0 1.5px #c5cee3, 0 6px 14px rgba(40, 59, 105, .12); }
.ph-modern #exampleBtn:hover { background: linear-gradient(180deg, #fff, #dfe4f0); box-shadow: inset 0 0 0 1.5px #566a9e, 0 12px 24px rgba(44, 59, 95, .22); }
.ph-modern #resetBtn { background: #fff; color: #1f2f55; box-shadow: inset 0 0 0 1.5px #cfd9ee, 0 4px 10px rgba(40, 59, 105, .1); }
.ph-modern #resetBtn:hover { color: #b3261e; background: #fff6f5; box-shadow: inset 0 0 0 1.5px #e7a6a1, 0 10px 22px rgba(179, 38, 30, .16); }
.ph__btnIc { flex: 0 0 18px; width: 18px; height: 18px; transition: transform .75s cubic-bezier(.3, 1.6, .5, 1); }
.ph-modern .ph__btn:hover .ph__btnIc { transform: rotate(-10deg) scale(1.15); }
.ph-modern #resetBtn:hover .ph__btnIc { transform: rotate(-200deg); }
.ph-modern .ph__rhead { animation: ph-pop .6s ease; position: relative; overflow: hidden; padding: 18px 20px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.06) 49%, rgba(255, 255, 255, 0) 50%), linear-gradient(135deg, #38497a 0%, #4f649a 55%, #6a80b8 100%); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(15, 25, 50, .25), 0 2px 4px rgba(40, 59, 105, .25), 0 16px 34px rgba(44, 59, 95, .38); }
.ph-modern .ph__rhead::after { content: ""; position: absolute; top: -60px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%); pointer-events: none; }
.ph-modern .ph__expr { color: rgba(255, 255, 255, .94); }
.ph-modern .ph__forms, .ph-modern .ph__rt small { color: rgba(255, 255, 255, .96); }
.ph-modern .ph__big { color: #fff; font-size: 34px; text-shadow: 0 1px 2px rgba(15, 25, 50, .35); }
.ph-modern .ph__big--sm { font-size: 22px; }
.ph-modern .ph__sub2 { color: #fff; }
.ph-modern .ph__tile { position: relative; top: 0; padding: 12px 14px; border: 1px solid #dfe5f2; border-radius: 16px; background: linear-gradient(180deg, #fff, #f6f7fb); box-shadow: 0 1px 2px rgba(31, 47, 85, .06), 0 6px 16px rgba(40, 59, 105, .1); transition: top .45s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease; animation: ph-fade .8s ease both; }
.ph-modern .ph__tile:hover { top: -2px; box-shadow: 0 2px 4px rgba(31, 47, 85, .08), 0 12px 24px rgba(40, 59, 105, .16); }
.ph-modern .ph__tile small { color: #5b6b8c; font-weight: 700; }
.ph-modern .ph__tile b { font-size: 17px; font-weight: 800; color: #1f2f55; }
.ph-modern .ph__lst { border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 47, 85, .06), 0 6px 16px rgba(40, 59, 105, .08); }
.ph-modern .ph__lstHead { background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 49%, rgba(255, 255, 255, 0) 50%), linear-gradient(135deg, #38497a 0%, #4f649a 55%, #6a80b8 100%); }
.ph-modern .ph__lstRow { transition: background .2s ease; }
.ph-modern .ph__lstRow:hover { background: #eef3ff; }
@keyframes ph-fade { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ph-modern .ph__btn, .ph-modern .ph__tile, .ph__btnIc, .ph-modern .ph__btn::before { transition: none; animation: none !important; } .ph-modern .ph__btn:hover, .ph-modern .ph__tile:hover { transform: none; } }
/* багаторядкове поле (список свят) */
.ph textarea.ph__textarea { display: block; width: 100%; min-height: 84px; padding: 9px 10px; border: 0; border-radius: 10px; background: #fff; color: #1f2937; font: inherit; font-size: 13px; line-height: 1.45; outline: none; resize: vertical; box-shadow: 0 1px 2px rgba(31, 47, 85, .04), 0 3px 8px rgba(40, 59, 105, .08); }
.ph textarea.ph__textarea::placeholder { color: #9ca3af; }
.ph textarea.ph__textarea:focus { box-shadow: 0 0 0 3px rgba(40, 59, 105, .18), 0 3px 8px rgba(40, 59, 105, .08); }
/* вимкнена кнопка: без підйому, блиску й вказівника */
.ph .ph__btn:disabled { background: #e6eaf4; color: #8793b1; opacity: 1; cursor: default; filter: none; box-shadow: inset 0 0 0 1px #d6ddee; text-shadow: none; }
.ph .ph__btn:disabled:hover { top: 0; box-shadow: none; }
.ph .ph__btn:disabled:hover::before { transform: translateX(-120%); }
/* живий відлік: чотири плитки в ряд */
.ph .ph__tiles#ctLive { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ph .ph__tiles#ctLive .ph__tile { padding: 12px 4px; text-align: center; }
.ph .ph__tiles#ctLive .ph__tile b { font-size: 24px; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .ph .ph__tiles#ctLive .ph__tile b { font-size: 19px; } .ph .ph__tiles#ctLive .ph__tile small { font-size: 11px; } }
/* згортана таблиця в результаті */
.ph__fold { margin-top: 14px; }
.ph__fold .ph__foldBody { padding: 12px 12px 0; }
/* зірочка обов'язкових полів */
.ph__star { color: #d92d20; font-weight: 800; }
.ph__reqnote { font-size: 12px; }
/* список-таблиця (PhysUI.list) */
.ph__lst { container: lst / inline-size; margin-top: 8px; border: 1px solid #dfe5f2; border-radius: 14px; background: #fff; overflow: hidden; }
.ph__lstHead, .ph__lstRow { display: grid; grid-template-columns: var(--cols); gap: 10px; align-items: center; padding: 10px 14px; }
.ph__lstHead { background: #283b69; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.ph__lstRow { border-top: 1px solid #e8edf7; font-size: 13px; color: #1f2f55; }
.ph__lst > .ph__lstRow:first-child, .ph__lstHead + .ph__lstRow { border-top: 0; }
.ph__lstHead ~ .ph__lstRow:nth-child(odd), .ph__lst--kv .ph__lstRow:nth-child(even) { background: #f6f8fd; }
.ph__lstRow.is-main { background: #e6eaf4 !important; box-shadow: inset 4px 0 0 #283b69; }
.ph__lstC { min-width: 0; overflow-wrap: anywhere; }
.ph__lstC.is-first { font-weight: 700; line-height: 1.3; }
.ph__lstC.muted { color: #5b6b8c; }
.ph__lstC.chip { justify-self: start; padding: 4px 10px; border-radius: 999px; background: #e4e9f3; color: #283b69; font-weight: 800; white-space: nowrap; overflow-wrap: normal; }
.ph__lstC.chip.ok { background: #d9f3e3; color: #12683a; }
.ph__lstC.chip.bad { background: #fde3e3; color: #a12626; }
.ph__lstC.strong { font-weight: 800; }
.ph__lst--kv .ph__lstRow { grid-template-columns: minmax(0, 1fr) auto; }
.ph__lst--kv .ph__lstC.is-first { color: #5b6b8c; font-weight: 700; }
.ph__lst--kv .ph__lstC:nth-child(2) { justify-self: end; text-align: right; font-weight: 800; }
.ph__bar { display: inline-block; height: 8px; margin-right: 6px; border-radius: 4px; background: #6f8fd6; vertical-align: middle; }
.ph__lstTitle { margin: 14px 0 0; color: #5b6b8c; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
@container lst (max-width: 560px) {
  .ph__lstHead { display: none; }
  .ph__lst:not(.ph__lst--kv) .ph__lstRow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 12px; }
  .ph__lst:not(.ph__lst--kv) .ph__lstC.is-first { flex: 1 0 100%; }
  .ph__lst:not(.ph__lst--kv) .ph__lstC[data-l]:not(.is-first)::before { content: attr(data-l) ": "; color: #8a97b4; font-size: 11px; font-weight: 700; }
  .ph__lst:not(.ph__lst--kv) .ph__lstC.chip:not(.is-first)::before { color: inherit; opacity: .7; }
}
.ph__pre { padding: 10px 12px; border-radius: 12px; background: #f6f8fd; color: #1f2f55; }
.ph__chips { display: flex; flex-wrap: wrap; gap: 8px; }
