.pf {
    --pf-ink: #0b1b36;
    --pf-text: #43506a;
    --pf-navy: #0f2d63;
    --pf-navy-dark: #0a2149;
    --pf-red: #d6322d;
    --pf-err: #b42318;
    --pf-line: #cfd6e2;
    width: min(660px, calc(100vw - 1.5rem));
    max-width: none;
    max-height: calc(100dvh - 1.5rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    color: var(--pf-text);
    box-shadow: 0 40px 90px -30px rgba(11, 27, 54, 0.55);
}
.pf *,
.pf *::before,
.pf *::after {
    box-sizing: border-box;
}
.pf [hidden] {
    display: none !important;
}
.pf::backdrop {
    background: rgba(11, 27, 54, 0.55);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.pf[open] {
    animation: pf-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pf[open]::backdrop {
    animation: pf-fade 0.3s ease;
}
@keyframes pf-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
}
@keyframes pf-fade {
    from {
        opacity: 0;
    }
}
html:has(.pf[open]) {
    overflow: hidden;
}

.pf-box {
    position: relative;
    max-height: calc(100dvh - 1.5rem);
    overflow: auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    outline: 0;
}

/* header */
.pf-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 2.5rem;
}
.pf-badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: #fff;
    background: var(--pf-navy);
    border-radius: 14px;
}
.pf-badge svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pf-title {
    margin: 0;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--pf-ink);
}
.pf-sub {
    margin: 1rem 0 1.5rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--pf-text);
}
.pf-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}
.pf-close:hover {
    background: #eef1f6;
}
.pf-close svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

/* fields */
.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1.25rem;
}
.pf-full {
    grid-column: 1 / -1;
}
.pf-field {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}
.pf-label {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pf-ink);
}
.pf-input {
    display: block;
    width: 100%;
    height: 3rem;
    margin: 0;
    padding: 0 0.9rem;
    font: inherit;
    font-size: 1rem;
    color: var(--pf-ink);
    background: #fff;
    border: 1.5px solid var(--pf-line);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pf-input::placeholder {
    color: #8a97ad;
    opacity: 1;
}
.pf-input:hover {
    border-color: #a9b5c9;
}
.pf-input:focus {
    outline: 0;
    border-color: var(--pf-navy);
    box-shadow: 0 0 0 4px rgba(15, 45, 99, 0.12);
}
.pf-input[aria-invalid="true"] {
    border-color: var(--pf-red);
    box-shadow: 0 0 0 4px rgba(214, 50, 45, 0.1);
}
.pf-error {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--pf-err);
}

/* partnership type: radio cards */
.pf-types {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.pf-types legend {
    margin-bottom: 0.5rem;
}
.pf-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.pf-opt {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}
.pf-opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.pf-opt span {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 3rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--pf-ink);
    background: #fff;
    border: 1.5px solid var(--pf-line);
    border-radius: 10px;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.pf-opt span::before {
    content: "";
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #9aa7bd;
    border-radius: 50%;
    transition: border-color 0.2s, background 0.2s;
}
.pf-opt:hover span {
    border-color: #a9b5c9;
}
.pf-opt input:checked + span {
    color: var(--pf-navy);
    background: #eef3fb;
    border-color: var(--pf-navy);
}
.pf-opt input:checked + span::before {
    border-color: var(--pf-navy);
    background: radial-gradient(circle, var(--pf-navy) 0 42%, transparent 48%);
}
.pf-opt input:focus-visible + span {
    outline: 3px solid var(--pf-navy);
    outline-offset: 2px;
}
.pf-types[aria-invalid="true"] .pf-opt span {
    border-color: var(--pf-red);
}

/* submit */
.pf-alert {
    margin: 1.25rem 0 0;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--pf-err);
    background: #fdecea;
    border-radius: 10px;
}
.pf-alert a {
    color: var(--pf-err);
    font-weight: 600;
    text-decoration: underline;
}
.pf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    height: 3.25rem;
    margin-top: 1.5rem;
    padding: 0 1.75rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--pf-navy);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pf-submit:hover {
    background: var(--pf-navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 24px -14px rgba(15, 45, 99, 0.85);
}
.pf-submit:active {
    transform: translateY(0);
}
.pf-submit:focus-visible,
.pf-close:focus-visible {
    outline: 3px solid var(--pf-navy);
    outline-offset: 3px;
}
.pf-submit.is-busy {
    pointer-events: none;
    opacity: 0.85;
}
.pf-spin {
    display: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pf-rot 0.7s linear infinite;
}
.pf-submit.is-busy .pf-spin {
    display: inline-block;
}
@keyframes pf-rot {
    to {
        transform: rotate(360deg);
    }
}
.pf-fine {
    margin: 0.9rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: center;
    color: #6b7890;
}
.pf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* success */
.pf-done {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    padding: 1rem 0 0.5rem;
    text-align: center;
}
.pf-done p {
    max-width: 26em;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--pf-text);
}
.pf-done .pf-submit {
    width: auto;
    min-width: 10rem;
    margin-top: 0.75rem;
}
.pf-check {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
}
.pf-check svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--pf-navy);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pf-check circle {
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: pf-draw 0.6s ease forwards;
}
.pf-check path {
    stroke: var(--pf-red);
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: pf-draw 0.4s 0.45s ease forwards;
}
@keyframes pf-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 560px) {
    .pf-grid,
    .pf-opts {
        grid-template-columns: 1fr;
    }
    .pf-head {
        padding-right: 2rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .pf[open],
    .pf[open]::backdrop,
    .pf-spin,
    .pf-check circle,
    .pf-check path {
        animation: none;
    }
    .pf-check circle,
    .pf-check path {
        stroke-dashoffset: 0;
    }
    .pf-submit,
    .pf-input,
    .pf-opt span {
        transition: none;
    }
}
