.f4hxn-pa,
.f4hxn-pa * {
    box-sizing: border-box;
}

.f4hxn-pa {
    --f4hxn-blue: #298ad4;
    --f4hxn-blue-dark: #0076a5;
    --f4hxn-ink: #17324d;
    --f4hxn-muted: #62758a;
    --f4hxn-line: #dce7f1;
    --f4hxn-soft: #f3f8fc;
    width: 100%;
    max-width: 1250px;
    margin: 24px auto;
    overflow: hidden;
    color: var(--f4hxn-ink);
    background: #fff;
    border: 1px solid var(--f4hxn-line);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(24, 65, 104, .10);
    font-family: inherit;
}

.f4hxn-pa__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--f4hxn-blue-dark), var(--f4hxn-blue));
}

.f4hxn-pa__header-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    font-size: 27px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .30);
    border-radius: 14px;
}

.f4hxn-pa__header h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.f4hxn-pa__header p {
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: .98rem;
}

.f4hxn-pa__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
}

.f4hxn-pa__form,
.f4hxn-pa__results {
    padding: 28px;
}

.f4hxn-pa__results {
    background: var(--f4hxn-soft);
    border-left: 1px solid var(--f4hxn-line);
}

.f4hxn-pa fieldset {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.f4hxn-pa legend {
    width: 100%;
    margin: 0 0 14px;
    padding: 0 0 8px;
    color: var(--f4hxn-blue-dark);
    border-bottom: 2px solid #e4eef6;
    font-size: 1.04rem;
    font-weight: 800;
}

.f4hxn-pa__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.f4hxn-pa__grid[hidden] {
    display: none;
}

.f4hxn-pa__grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.f4hxn-pa__field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    color: var(--f4hxn-ink);
    font-size: .92rem;
    font-weight: 700;
}

.f4hxn-pa__field small {
    color: var(--f4hxn-muted);
    font-size: .78rem;
    font-weight: 400;
}

.f4hxn-pa__input-unit {
    display: flex;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #bdcede;
    border-radius: 9px;
    transition: border-color .2s, box-shadow .2s;
}

.f4hxn-pa__input-unit:focus-within {
    border-color: var(--f4hxn-blue);
    box-shadow: 0 0 0 3px rgba(41, 138, 212, .16);
}

.f4hxn-pa__input-unit input,
.f4hxn-pa__input-unit select {
    min-width: 0;
    height: 44px;
    margin: 0;
    color: var(--f4hxn-ink);
    background: #fff;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font: inherit;
}

.f4hxn-pa__input-unit input {
    width: 100%;
    padding: 8px 10px;
}

.f4hxn-pa__input-unit > span {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 0 10px;
    color: #435e78;
    background: #edf4fa;
    border-left: 1px solid #d5e2ed;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.f4hxn-pa__input-unit--select select {
    flex: 0 0 76px;
    width: 76px;
    padding: 0 8px;
    border-left: 1px solid #d5e2ed !important;
}

.f4hxn-pa__input-unit--wide-select select {
    width: 100%;
    padding: 0 10px;
}

.f4hxn-pa__cable-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 14px;
    padding: 9px 11px;
    color: #496279;
    background: #edf5fb;
    border: 1px solid #d9e8f3;
    border-radius: 8px;
    font-size: .82rem;
}

.f4hxn-pa__cable-info strong {
    color: var(--f4hxn-blue-dark);
    text-align: right;
}

.f4hxn-pa__choice {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    margin: 2px 0 14px;
    padding: 10px 12px;
    background: #f5f9fc;
    border: 1px solid #e0ebf3;
    border-radius: 9px;
}

.f4hxn-pa__choice label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
}

.f4hxn-pa__choice input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--f4hxn-blue);
}

.f4hxn-pa__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.f4hxn-pa__button {
    min-height: 44px;
    margin: 0;
    padding: 10px 22px;
    color: #fff;
    background: var(--f4hxn-blue);
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    font: inherit;
    font-size: .94rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.f4hxn-pa__button:hover,
.f4hxn-pa__button:focus {
    color: #fff;
    background: var(--f4hxn-blue-dark);
    transform: translateY(-1px);
}

.f4hxn-pa__button--secondary {
    color: var(--f4hxn-blue-dark);
    background: #e9f2f9;
}

.f4hxn-pa__button--secondary:hover,
.f4hxn-pa__button--secondary:focus {
    color: var(--f4hxn-blue-dark);
    background: #dcebf6;
}

.f4hxn-pa__error {
    margin: 14px 0 0;
    padding: 10px 12px;
    color: #8b1a1a;
    background: #fff1f1;
    border: 1px solid #efbaba;
    border-radius: 8px;
    font-size: .88rem;
}

.f4hxn-pa__primary-result {
    margin-bottom: 16px;
    padding: 21px;
    color: #fff;
    text-align: center;
    background: linear-gradient(145deg, var(--f4hxn-blue), var(--f4hxn-blue-dark));
    border-radius: 14px;
    box-shadow: 0 9px 22px rgba(0, 118, 165, .22);
}

.f4hxn-pa__primary-result span,
.f4hxn-pa__primary-result small {
    display: block;
    color: rgba(255, 255, 255, .88);
}

.f4hxn-pa__primary-result strong {
    display: block;
    margin: 5px 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
}

.f4hxn-pa__power-chart {
    margin: 0 0 16px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--f4hxn-line);
    border-radius: 10px;
}

.f4hxn-pa__power-bar {
    display: flex;
    width: 100%;
    height: 23px;
    overflow: hidden;
    background: #e7eef4;
    border-radius: 999px;
}

.f4hxn-pa__power-segment {
    display: block;
    width: 0;
    min-width: 0;
    height: 100%;
    transition: width .35s ease;
}

.f4hxn-pa .is-useful {
    background-color: #2ca56b;
}

.f4hxn-pa .is-cable {
    background-color: #ef9d2f;
}

.f4hxn-pa .is-reflected {
    background-color: #d94b4b;
}

.f4hxn-pa__power-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 13px;
    margin-top: 10px;
}

.f4hxn-pa__power-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--f4hxn-muted);
    font-size: .72rem;
}

.f4hxn-pa__power-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.f4hxn-pa__power-legend strong {
    color: var(--f4hxn-ink);
}

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

.f4hxn-pa__result-card {
    min-width: 0;
    margin: 0;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--f4hxn-line);
    border-radius: 10px;
}

.f4hxn-pa__result-card span,
.f4hxn-pa__result-card small {
    display: block;
    color: var(--f4hxn-muted);
    font-size: .76rem;
    line-height: 1.3;
}

.f4hxn-pa__result-card strong {
    display: block;
    margin: 4px 0;
    color: var(--f4hxn-blue-dark);
    font-size: 1.28rem;
}

.f4hxn-pa__details {
    margin: 17px 0 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--f4hxn-line);
    border-radius: 10px;
}

.f4hxn-pa__details div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 12px;
    border-bottom: 1px solid #e9f0f5;
}

.f4hxn-pa__details div:last-child {
    border-bottom: 0;
}

.f4hxn-pa__details dt,
.f4hxn-pa__details dd {
    margin: 0;
    font-size: .83rem;
}

.f4hxn-pa__details dt {
    color: var(--f4hxn-muted);
}

.f4hxn-pa__details dd {
    color: var(--f4hxn-ink);
    font-weight: 800;
    text-align: right;
}

.f4hxn-pa__status {
    margin-top: 14px;
    padding: 11px 12px;
    color: #435e78;
    background: #e8f0f6;
    border-radius: 7px;
    font-size: .84rem;
    font-weight: 700;
}

.f4hxn-pa__status.is-good {
    color: #17633d;
    background: #e9f8f0;
}

.f4hxn-pa__status.is-medium {
    color: #725811;
    background: #fff8df;
}

.f4hxn-pa__status.is-warning,
.f4hxn-pa__status.is-danger {
    color: #8b321a;
    background: #fff0e8;
}

.f4hxn-pa__status.is-danger {
    color: #8b1a1a;
    background: #fff0f0;
}

.f4hxn-pa__comparison {
    padding: 24px 28px 28px;
    border-top: 1px solid var(--f4hxn-line);
}

.f4hxn-pa__comparison-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.f4hxn-pa__comparison-heading h3 {
    margin: 0 0 3px;
    color: var(--f4hxn-blue-dark);
    font-size: 1.18rem;
}

.f4hxn-pa__comparison-heading p {
    margin: 0;
    color: var(--f4hxn-muted);
    font-size: .84rem;
}

.f4hxn-pa__comparison-heading > span {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: var(--f4hxn-blue-dark);
    background: #edf5fb;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 800;
}

.f4hxn-pa__table-wrap {
    overflow-x: auto;
    border: 1px solid var(--f4hxn-line);
    border-radius: 10px;
}

.f4hxn-pa__comparison table {
    width: 100%;
    min-width: 700px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: #fff;
    font-size: .84rem;
}

.f4hxn-pa__comparison th,
.f4hxn-pa__comparison td {
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e7eef4;
    text-align: right;
    white-space: nowrap;
}

.f4hxn-pa__comparison th:first-child,
.f4hxn-pa__comparison td:first-child {
    text-align: left;
}

.f4hxn-pa__comparison thead th {
    color: #fff;
    background: var(--f4hxn-blue-dark);
    font-size: .76rem;
}

.f4hxn-pa__comparison tbody th {
    color: var(--f4hxn-ink);
    font-weight: 800;
}

.f4hxn-pa__comparison tbody tr:last-child th,
.f4hxn-pa__comparison tbody tr:last-child td {
    border-bottom: 0;
}

.f4hxn-pa__comparison tbody tr.is-selected th,
.f4hxn-pa__comparison tbody tr.is-selected td {
    color: #0f5a37;
    background: #e8f7ef;
    font-weight: 800;
}

.f4hxn-pa__help {
    margin: 0;
    padding: 17px 28px 22px;
    border-top: 1px solid var(--f4hxn-line);
}

.f4hxn-pa__help summary {
    color: var(--f4hxn-blue-dark);
    font-weight: 800;
    cursor: pointer;
}

.f4hxn-pa__help p {
    margin: 11px 0 0;
    color: #425a71;
    font-size: .88rem;
    line-height: 1.55;
}

.f4hxn-pa__notice {
    padding: 10px 12px;
    background: #fff9e8;
    border-radius: 7px;
}

.f4hxn-pa__explain {
    padding: 22px 28px 28px;
    border-top: 1px solid var(--f4hxn-line);
}

.f4hxn-pa__explain h3 {
    margin: 0 0 6px;
    color: var(--f4hxn-blue-dark);
    font-size: 1.18rem;
}

.f4hxn-pa__explain h4 {
    margin: 20px 0 4px;
    color: var(--f4hxn-ink);
    font-size: .98rem;
    font-weight: 800;
}

.f4hxn-pa__explain p {
    margin: 8px 0 0;
    color: #425a71;
    font-size: .9rem;
    line-height: 1.6;
}

.f4hxn-pa__formula {
    margin: 9px 0 0 !important;
    padding: 10px 13px;
    color: var(--f4hxn-blue-dark) !important;
    background: var(--f4hxn-soft);
    border: 1px solid var(--f4hxn-line);
    border-radius: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .84rem;
    line-height: 1.5;
    overflow-x: auto;
}

.f4hxn-pa__formula sub,
.f4hxn-pa__formula sup {
    font-size: .72em;
}

.f4hxn-pa__explain .f4hxn-pa__notice {
    margin-top: 10px;
    color: #7a5b12;
}

@media (max-width: 860px) {
    .f4hxn-pa__layout {
        grid-template-columns: 1fr;
    }

    .f4hxn-pa__results {
        border-top: 1px solid var(--f4hxn-line);
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .f4hxn-pa {
        margin: 15px auto;
        border-radius: 12px;
    }

    .f4hxn-pa__header,
    .f4hxn-pa__form,
    .f4hxn-pa__results,
    .f4hxn-pa__help,
    .f4hxn-pa__comparison {
        padding-right: 17px;
        padding-left: 17px;
    }

    .f4hxn-pa__grid,
    .f4hxn-pa__result-grid {
        grid-template-columns: 1fr;
    }

    .f4hxn-pa__header-icon {
        display: none;
    }

    .f4hxn-pa__comparison-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .f4hxn-pa__cable-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .f4hxn-pa__cable-info strong {
        text-align: left;
    }
}
