/* "Import from LinkedIn" on profile-completion.html (js/profile-import.js): the button
   next to the profile shortcuts, its pop-up, the "Imported" marks it leaves on the form,
   its toast and the page-wide drop zone. */

/* ---------- The button, on top of the tab list ---------- */
.pi-nav-import {
    --pi-li: #0a66c2;
    --pi-li-deep: #004182;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 12px 12px 12px;
    overflow: hidden;
    border: 1px solid rgba(10, 102, 194, 0.22);
    border-radius: 18px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -20px rgba(10, 102, 194, 0.55);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    animation: pi-nav-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

/* LinkedIn blue sweeps in from the left on hover */
.pi-nav-import::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: linear-gradient(110deg, #0a66c2 0%, #0b72d6 55%, #378fe9 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ...followed by a quick glint */
.pi-nav-import::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    z-index: -1;
    width: 40%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.32) 50%, transparent 100%);
    opacity: 0;
    transform: skewX(-18deg);
    pointer-events: none;
}

.pi-nav-import svg {
    display: block;
    flex-shrink: 0;
}

.pi-nav-import-logo {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--pi-li);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(10, 102, 194, 0.65);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pi-nav-import-logo svg {
    width: 21px;
    height: 21px;
}

.pi-nav-import-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.pi-nav-import-title {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.pi-nav-import-sub {
    margin-top: 1px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.pi-nav-import-arrow {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(10, 102, 194, 0.08);
    color: var(--pi-li);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-nav-import-arrow svg {
    width: 16px;
    height: 16px;
}

@media (hover: hover) {
    /* The fill is clipped inside the border, so the border takes the fill's colour
       (a transparent one would let the white background show through as a hairline) */
    .pi-nav-import:hover {
        border-color: var(--pi-li);
        box-shadow: 0 16px 32px -14px rgba(10, 102, 194, 0.6);
        transform: translateY(-2px);
    }

    .pi-nav-import:hover::before {
        transform: scaleX(1);
    }

    .pi-nav-import:hover::after {
        animation: pi-nav-glint 0.8s ease-out 0.3s;
    }

    .pi-nav-import:hover .pi-nav-import-logo {
        background: #fff;
        color: var(--pi-li);
        box-shadow: 0 6px 14px -6px rgba(0, 32, 80, 0.45);
        transform: rotate(-8deg) scale(1.06);
    }

    .pi-nav-import:hover .pi-nav-import-arrow {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        transform: translateX(3px);
    }

    .pi-nav-import:hover :is(.pi-nav-import-title, .pi-nav-import-sub) {
        color: #fff;
    }

    .pi-nav-import:hover .pi-nav-import-sub {
        color: rgba(255, 255, 255, 0.85);
    }
}

/* Pressed (and the tap feedback on touch screens): LinkedIn's darker blue */
.pi-nav-import:active {
    border-color: var(--pi-li-deep);
    transform: translateY(0) scale(0.99);
    transition-duration: 0.15s;
}

.pi-nav-import:active::before {
    background: var(--pi-li-deep);
    transform: scaleX(1);
    transition-duration: 0.15s;
}

.pi-nav-import:active :is(.pi-nav-import-title, .pi-nav-import-sub) {
    color: #fff;
}

.pi-nav-import:active .pi-nav-import-logo {
    background: #fff;
    color: var(--pi-li-deep);
}

.pi-nav-import:active .pi-nav-import-arrow {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.pi-nav-import:focus-visible {
    outline: 2px solid var(--pi-li);
    outline-offset: 3px;
}

@keyframes pi-nav-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes pi-nav-glint {
    0% { opacity: 1; transform: translateX(0) skewX(-18deg); }
    100% { opacity: 0; transform: translateX(380%) skewX(-18deg); }
}

/* Profile complete, or an import already saved: one slim line */
.pi-nav-import.is-compact {
    gap: 10px;
    padding: 8px 10px 8px 8px;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pi-nav-import.is-compact .pi-nav-import-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    box-shadow: none;
}

.pi-nav-import.is-compact .pi-nav-import-logo svg {
    width: 16px;
    height: 16px;
}

.pi-nav-import.is-compact .pi-nav-import-title {
    font-size: 0.88rem;
}

.pi-nav-import.is-compact .pi-nav-import-sub {
    display: none;
}

.pi-nav-import.is-compact .pi-nav-import-arrow {
    width: 26px;
    height: 26px;
    background: transparent;
}

@media screen and (min-width: 1080px) {
    .pi-nav-import {
        border-radius: 20px;
    }
}

@media screen and (max-width: 768px) {
    .pi-nav-import {
        gap: 11px;
        margin-bottom: 10px;
        padding: 10px 10px 10px 10px;
        border-radius: 16px;
    }

    .pi-nav-import-logo {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .pi-nav-import-logo svg {
        width: 19px;
        height: 19px;
    }
}

/* ---------- The pop-up ---------- */
.pi-modal {
    --pi-teal: #11a191;
    --pi-teal-deep: #0b7a6e;
    --pi-teal-soft: rgba(17, 161, 145, 0.1);
    --pi-ink: #0f172a;
    --pi-text: #334155;
    --pi-muted: #64748b;
    --pi-line: rgba(15, 23, 42, 0.08);
    position: fixed;
    inset: 0;
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    color: var(--pi-text);
    font-family: inherit;
    transition: background-color 0.26s ease, -webkit-backdrop-filter 0.26s ease, backdrop-filter 0.26s ease;
}

.pi-modal[hidden] {
    display: none;
}

.pi-modal.is-open {
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.pi-modal *,
.pi-modal *::before,
.pi-modal *::after {
    box-sizing: border-box;
}

.pi-modal [hidden] {
    display: none !important;
}

.pi-modal svg {
    display: block;
    flex-shrink: 0;
}

.pi-modal .pi-file {
    display: none;
}

.pi-dialog {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 32px 80px -24px rgba(15, 23, 42, 0.45);
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* A slim, rounded scrollbar that floats inside the card and clears its rounded corners */
.pi-dialog::-webkit-scrollbar {
    width: 14px;
}

.pi-dialog::-webkit-scrollbar-track {
    margin: 22px 0;
    background: transparent;
}

.pi-dialog::-webkit-scrollbar-thumb {
    min-height: 48px;
    border: 4px solid transparent;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16) padding-box;
}

.pi-dialog::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 161, 145, 0.55) padding-box;
}

.pi-dialog::-webkit-scrollbar-thumb:active {
    background: rgba(11, 122, 110, 0.7) padding-box;
}

.pi-dialog::-webkit-scrollbar-corner,
.pi-dialog::-webkit-scrollbar-button {
    display: none;
    background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
    .pi-dialog {
        scrollbar-width: thin;
        scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
    }
}

.pi-modal.is-open .pi-dialog {
    opacity: 1;
    transform: none;
}

.pi-dialog.is-resizing {
    overflow: hidden;
    transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* A soft wash of colour behind the picture at the top */
.pi-dialog::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 168px;
    pointer-events: none;
    background:
        radial-gradient(260px 150px at 18% 0%, rgba(17, 161, 145, 0.16), transparent 72%),
        radial-gradient(260px 160px at 88% 10%, rgba(167, 139, 250, 0.16), transparent 72%),
        linear-gradient(180deg, #f3fbf9 0%, rgba(255, 255, 255, 0) 100%);
}

.pi-dialog::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 150px;
    pointer-events: none;
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    opacity: 0.55;
}

.pi-grabber {
    display: none;
}

.pi-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    color: #64748b;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pi-close svg {
    width: 14px;
    height: 14px;
}

.pi-close:hover {
    background: #fff;
    color: var(--pi-ink);
    transform: rotate(90deg);
}

.pi-close:focus-visible,
.pi-btn:focus-visible,
.pi-link:focus-visible,
.pi-drop:focus-visible,
.pi-howto-toggle:focus-visible,
.pi-chip:focus-visible,
.pi-photo-pill:focus-visible,
.pi-toast button:focus-visible {
    outline: 2px solid var(--pi-teal, #11a191);
    outline-offset: 2px;
}

/* ---------- Views ---------- */
.pi-views {
    position: relative;
    z-index: 1;
}

.pi-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 32px 28px;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-view.is-entering {
    opacity: 0;
    transform: translateY(8px);
}

.pi-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 20px 0 0;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: var(--pi-teal-soft);
    color: var(--pi-teal-deep);
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.pi-eyebrow svg {
    width: 13px;
    height: 13px;
    color: #f59e0b;
}

.pi-title {
    margin: 18px 0 6px;
    color: var(--pi-ink);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.pi-eyebrow + .pi-title {
    margin-top: 10px;
}

.pi-title:focus {
    outline: none;
}

.pi-text {
    max-width: 370px;
    text-wrap: pretty;
    margin: 0;
    color: var(--pi-muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.pi-text strong {
    color: var(--pi-text);
    font-weight: 650;
}

/* ---------- Buttons ---------- */
.pi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease, color 0.18s ease;
}

.pi-btn:active {
    transform: translateY(1px) scale(0.99);
}

.pi-btn svg {
    width: 18px;
    height: 18px;
}

.pi-btn-primary {
    background: linear-gradient(180deg, #14b09f 0%, #0f9a8b 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 18px -8px rgba(17, 161, 145, 0.7);
}

.pi-btn-primary:hover {
    background: linear-gradient(180deg, #11a191 0%, #0b7a6e 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 22px -8px rgba(17, 161, 145, 0.8);
}

.pi-btn-ghost {
    background: rgba(255, 255, 255, 0.9);
    border-color: #dfe5ea;
    color: var(--pi-ink);
}

.pi-btn-ghost:hover {
    border-color: rgba(17, 161, 145, 0.5);
    background: #fff;
    color: var(--pi-teal-deep);
}

.pi-btn-ghost[aria-expanded="true"] {
    border-color: rgba(17, 161, 145, 0.55);
    background: #f2fbf9;
}

.pi-btn-wide {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    font-size: 0.96rem;
}

.pi-btn-sm {
    height: 40px;
    padding: 0 16px;
    font-size: 0.88rem;
}

.pi-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: var(--pi-teal-deep);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(11, 122, 110, 0.3);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.pi-link:hover {
    color: #075e55;
    text-decoration-color: currentColor;
}

.pi-link-muted {
    color: var(--pi-muted);
    text-decoration-color: rgba(100, 116, 139, 0.35);
}

.pi-link-muted:hover {
    color: var(--pi-ink);
}

/* ---------- Idle: illustration ---------- */
.pi-art {
    position: relative;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
}

.pi-art::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(140deg, #ffffff 0%, #e7f8f5 100%);
    box-shadow: 0 1px 0 #fff inset, 0 10px 24px -12px rgba(11, 122, 110, 0.55), 0 0 0 1px rgba(17, 161, 145, 0.14);
}

.pi-art-doc {
    position: absolute;
    left: 23px;
    top: 15px;
    width: 38px;
    color: var(--pi-teal);
    transform: rotate(-6deg);
    filter: drop-shadow(0 4px 6px rgba(11, 122, 110, 0.18));
}

.pi-art-doc svg,
.pi-scan-doc svg {
    width: 100%;
    height: auto;
}

.pi-art-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 32px;
    height: 32px;
    padding: 3px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 14px -6px rgba(15, 23, 42, 0.35);
}

.pi-art-badge svg {
    width: 100%;
    height: 100%;
}

.pi-art-spark {
    position: absolute;
    top: -7px;
    right: -5px;
    width: 22px;
    height: 22px;
    color: #f59e0b;
    animation: pi-twinkle 2.6s ease-in-out infinite;
}

.pi-art-spark svg {
    width: 100%;
    height: 100%;
}

@keyframes pi-twinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(0.78) rotate(18deg); opacity: 0.7; }
}

/* ---------- Idle: drop zone ---------- */
.pi-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 164px;
    margin-top: 24px;
    padding: 20px;
    border: 2px dashed rgba(17, 161, 145, 0.35);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(240, 251, 249, 0.6) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: var(--pi-muted);
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pi-drop.is-dragging {
    border-color: var(--pi-teal);
    background: rgba(236, 251, 248, 0.95);
    box-shadow: 0 14px 30px -20px rgba(11, 122, 110, 0.65);
}

@media (hover: hover) {
    .pi-drop:hover {
        border-color: var(--pi-teal);
        background: rgba(236, 251, 248, 0.95);
        box-shadow: 0 14px 30px -20px rgba(11, 122, 110, 0.65);
    }

    .pi-drop:hover .pi-drop-icon {
        transform: translateY(-3px);
    }
}

.pi-drop:active {
    background: rgba(236, 251, 248, 0.95);
}

.pi-drop.is-dragging {
    transform: scale(1.01);
}

.pi-drop-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
    border-radius: 17px;
    background: #fff;
    color: var(--pi-teal);
    box-shadow: 0 0 0 1px rgba(17, 161, 145, 0.14), 0 8px 18px -10px rgba(11, 122, 110, 0.55);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-drop-icon svg {
    width: 30px;
    height: 30px;
}

.pi-drop.is-dragging .pi-drop-icon {
    transform: translateY(-3px);
}

.pi-drop-title {
    color: var(--pi-ink);
    font-size: 1rem;
    font-weight: 650;
}

.pi-drop-sub {
    font-size: 0.8rem;
    line-height: 1.4;
}

.pi-drop-sub u {
    color: var(--pi-teal-deep);
    font-weight: 600;
    text-decoration-color: rgba(11, 122, 110, 0.35);
    text-underline-offset: 2px;
}

/* ---------- Idle: how-to ---------- */
.pi-howto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--pi-teal-deep);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.pi-howto-toggle:hover {
    background: var(--pi-teal-soft);
}

.pi-howto-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

.pi-howto-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.pi-reveal {
    width: 100%;
    margin-top: 8px;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-reveal.is-entering {
    opacity: 0;
    transform: translateY(-4px);
}

.pi-hint {
    margin: 0;
    color: var(--pi-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.pi-hint a,
.pi-steps a {
    color: var(--pi-teal-deep);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(11, 122, 110, 0.3);
    text-underline-offset: 2px;
}

.pi-howto {
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 18px 16px 16px;
    border: 1px solid var(--pi-line);
    border-radius: 18px;
    background: #f8fafc;
    text-align: left;
}

.pi-steps {
    display: grid;
    justify-self: stretch;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--pi-text);
    font-size: 0.86rem;
    line-height: 1.45;
}

.pi-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.pi-steps strong {
    color: var(--pi-ink);
    font-weight: 650;
}

.pi-step {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pi-teal-soft);
    color: var(--pi-teal-deep);
    font-size: 0.74rem;
    font-weight: 700;
}

/* A tiny LinkedIn profile in a browser window: the cursor clicks Resources, then Save
   to PDF. It is drawn at 208 x 146 and zoomed, so the animation's coordinates stay put. */
.pi-demo-window {
    --pi-demo-zoom: 1.68;
    justify-self: center;
    overflow: hidden;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 36px -18px rgba(15, 23, 42, 0.38);
}

.pi-demo-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border-bottom: 1px solid #e8edf2;
    background: #f5f7fa;
}

.pi-demo-bar i {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ff5f57;
}

.pi-demo-bar i:nth-child(2) {
    background: #febc2e;
}

.pi-demo-bar i:nth-child(3) {
    background: #28c840;
}

.pi-demo-bar span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: 19px;
    margin: 0 auto;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.pi-modal .pi-demo-bar svg {
    width: 10px;
    height: 10px;
    color: #94a3b8;
}

.pi-demo {
    position: relative;
    width: 208px;
    height: 146px;
    overflow: hidden;
    background: #fff;
    font-size: 7.5px;
    font-weight: 600;
    line-height: 1;
    zoom: var(--pi-demo-zoom);
}

/* A soft ring where the cursor clicks */
.pi-demo-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(10, 102, 194, 0.28);
    box-shadow: 0 0 0 1px rgba(10, 102, 194, 0.35);
    opacity: 0;
    pointer-events: none;
    animation: pi-demo-ripple 5s ease-out infinite;
}

@keyframes pi-demo-ripple {
    0%, 22% { opacity: 0; transform: translate(145px, 81px) scale(0.3); }
    25% { opacity: 1; transform: translate(145px, 81px) scale(0.6); }
    34% { opacity: 0; transform: translate(145px, 81px) scale(1.6); }
    35%, 50% { opacity: 0; transform: translate(135px, 111px) scale(0.3); }
    53% { opacity: 1; transform: translate(135px, 111px) scale(0.6); }
    62%, 100% { opacity: 0; transform: translate(135px, 111px) scale(1.6); }
}

.pi-demo-cover {
    height: 36px;
    background: linear-gradient(120deg, #bfdbfe 0%, #c7d2fe 50%, #a5f3fc 100%);
}

.pi-demo-avatar {
    position: absolute;
    top: 18px;
    left: 12px;
    width: 36px;
    height: 36px;
    border: 2.5px solid #fff;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 38%, #e2e8f0 0 28%, transparent 29%), radial-gradient(circle at 50% 100%, #e2e8f0 0 42%, transparent 43%), #cbd5e1;
}

.pi-demo-lines {
    position: absolute;
    top: 60px;
    left: 12px;
    display: grid;
    gap: 5px;
}

.pi-demo-lines i {
    display: block;
    width: 84px;
    height: 6px;
    border-radius: 3px;
    background: #334155;
}

.pi-demo-lines i + i {
    width: 120px;
    height: 4px;
    background: #cbd5e1;
}

.pi-demo-buttons {
    position: absolute;
    top: 82px;
    left: 12px;
    display: flex;
    gap: 4px;
}

.pi-demo-buttons b {
    padding: 4px 6px;
    border: 1px solid #94a3b8;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
}

.pi-demo-buttons b.is-blue {
    border-color: #0a66c2;
    background: #0a66c2;
    color: #fff;
}

.pi-demo-target {
    animation: pi-demo-target 5s ease-in-out infinite;
}

.pi-demo-menu {
    position: absolute;
    top: 99px;
    left: 112px;
    display: grid;
    gap: 1px;
    padding: 3px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
    color: #475569;
    opacity: 0;
    transform: translateY(-3px);
    animation: pi-demo-menu 5s ease-in-out infinite;
}

.pi-demo-menu span {
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.pi-demo-save {
    animation: pi-demo-save 5s ease-in-out infinite;
}

.pi-demo-cursor {
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    animation: pi-demo-cursor 5s cubic-bezier(0.45, 0, 0.3, 1) infinite;
}

.pi-demo-cursor svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.35));
}

@keyframes pi-demo-cursor {
    0% { transform: translate(176px, 116px); }
    22% { transform: translate(150px, 87px); }
    26% { transform: translate(150px, 87px) scale(0.82); }
    30% { transform: translate(150px, 87px); }
    50% { transform: translate(140px, 117px); }
    54% { transform: translate(140px, 117px) scale(0.82); }
    58%, 82% { transform: translate(140px, 117px); }
    100% { transform: translate(176px, 116px); }
}

@keyframes pi-demo-target {
    0%, 24%, 84%, 100% { background: transparent; }
    27%, 80% { background: #e2e8f0; }
}

@keyframes pi-demo-menu {
    0%, 26% { opacity: 0; transform: translateY(-3px); }
    31%, 80% { opacity: 1; transform: translateY(0); }
    86%, 100% { opacity: 0; transform: translateY(-3px); }
}

@keyframes pi-demo-save {
    0%, 52% { background: transparent; color: #475569; }
    55%, 80% { background: #e7f8f5; color: #0b7a6e; }
    100% { background: transparent; color: #475569; }
}

/* ---------- Idle: errors and privacy ---------- */
.pi-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #fde2c3;
    border-radius: 12px;
    background: #fff8ef;
    color: #8a4b0f;
    font-size: 0.86rem;
    line-height: 1.45;
    text-align: left;
}

.pi-error svg {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    color: #d97706;
}

.pi-error.is-shaking {
    animation: pi-nudge 0.4s ease;
}

@keyframes pi-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}

.pi-privacy {
    max-width: 360px;
    margin: 18px 0 0;
    color: #8592a3;
    font-size: 0.78rem;
    line-height: 1.5;
    text-wrap: balance;
}

.pi-modal .pi-privacy svg {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin: 0 4px 0 0;
    vertical-align: -2px;
}

.pi-view[data-view="loading"] {
    padding-bottom: 24px;
}

/* ---------- Loading ---------- */
.pi-scan {
    position: relative;
    width: 84px;
    height: 84px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(140deg, #ffffff 0%, #e7f8f5 100%);
    box-shadow: 0 1px 0 #fff inset, 0 10px 24px -12px rgba(11, 122, 110, 0.55), 0 0 0 1px rgba(17, 161, 145, 0.14);
}

.pi-scan-doc {
    position: absolute;
    left: 23px;
    top: 15px;
    width: 38px;
    color: var(--pi-teal);
}

.pi-scan-beam {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 18px;
    border-bottom: 2px solid rgba(17, 161, 145, 0.85);
    background: linear-gradient(180deg, rgba(17, 161, 145, 0) 0%, rgba(17, 161, 145, 0.22) 100%);
    animation: pi-beam 1.6s ease-in-out infinite alternate;
}

@keyframes pi-beam {
    from { transform: translateY(2px); }
    to { transform: translateY(62px); }
}

.pi-dot-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pi-teal);
}

.pi-dot-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--pi-teal);
    animation: pi-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pi-ping {
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

.pi-view[data-view="loading"] .pi-eyebrow span:last-child {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pi-stage {
    min-height: 1.5em;
}

.pi-stage.is-in {
    animation: pi-stage-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pi-stage-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.pi-progress {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 6px;
    margin: 18px 0 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(17, 161, 145, 0.12);
}

.pi-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    overflow: hidden;
    border-radius: inherit;
    background: linear-gradient(90deg, #5eead4 0%, #11a191 70%, #0b7a6e 100%);
    transition: width 0.35s ease-out;
}

.pi-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: pi-shimmer 1.3s ease-in-out infinite;
}

@keyframes pi-shimmer {
    to { transform: translateX(100%); }
}

/* ---------- Done ---------- */
.pi-done-badge {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 6px 0 0;
    border-radius: 50%;
    background: linear-gradient(140deg, #19c0ad 0%, #0b7a6e 100%);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(17, 161, 145, 0.12), 0 12px 24px -10px rgba(11, 122, 110, 0.7);
}

.pi-done-badge svg {
    width: 30px;
    height: 30px;
}

.pi-view[data-view="done"]:not([hidden]) .pi-done-badge {
    animation: pi-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.pi-view[data-view="done"]:not([hidden]) .pi-done-badge path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: pi-draw 0.45s 0.2s ease-out forwards;
}

@keyframes pi-pop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pi-draw {
    to { stroke-dashoffset: 0; }
}

.pi-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid rgba(17, 161, 145, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, #ecfbf8, #f5f3ff);
    color: var(--pi-teal-deep);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.5;
    vertical-align: 1px;
    white-space: nowrap;
}

.pi-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.pi-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px 0 9px;
    border: 1px solid rgba(17, 161, 145, 0.28);
    border-radius: 999px;
    background: #fff;
    color: var(--pi-ink);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    animation: pi-chip-in 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both;
    animation-delay: calc(var(--i, 0) * 55ms + 120ms);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pi-chip svg {
    width: 15px;
    height: 15px;
    color: var(--pi-teal);
}

.pi-chip:hover {
    border-color: var(--pi-teal);
    background: #f2fbf9;
    box-shadow: 0 6px 14px -10px rgba(11, 122, 110, 0.7);
    transform: translateY(-1px);
}

@keyframes pi-chip-in {
    from { opacity: 0; transform: translateY(6px) scale(0.92); }
    to { opacity: 1; transform: none; }
}

.pi-kept {
    width: 100%;
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.9);
    color: var(--pi-text);
    font-size: 0.86rem;
    line-height: 1.5;
}

.pi-kept .pi-link {
    padding: 0;
    font-size: inherit;
}

.pi-view[data-view="done"] .pi-btn-wide {
    margin-top: 24px;
}

.pi-done-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 14px;
    margin-top: 12px;
}

.pi-done-links .pi-link svg {
    width: 15px;
    height: 15px;
}

.pi-done-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* ---------- Photo suggestion ---------- */
.pi-photo {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px;
    margin: 0 24px 24px;
    padding: 14px 16px;
    border: 1px solid var(--pi-line);
    border-radius: 16px;
    background: linear-gradient(120deg, #f8fafc 0%, #f4fbf9 100%);
    text-align: left;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-photo.is-entering {
    opacity: 0;
    transform: translateY(6px);
}

.pi-photo-frame {
    position: relative;
    width: 46px;
    height: 46px;
}

.pi-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #e2e8f0;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 8px 16px -8px rgba(15, 23, 42, 0.45);
    transition: box-shadow 0.3s ease;
}

.pi-photo-source {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 20px;
    height: 20px;
    padding: 2px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.pi-photo-source svg {
    width: 100%;
    height: 100%;
}

.pi-photo-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pi-photo-copy strong {
    color: var(--pi-ink);
    font-size: 0.92rem;
    font-weight: 650;
}

.pi-photo-copy span {
    overflow: hidden;
    color: var(--pi-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.pi-photo-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pi-photo-actions .pi-btn-sm {
    height: 36px;
    padding: 0 16px;
}

.pi-photo.is-done .pi-photo-img {
    box-shadow: 0 0 0 2px var(--pi-teal), 0 8px 16px -8px rgba(15, 23, 42, 0.45);
}

.pi-photo.is-done .pi-photo-copy strong {
    color: var(--pi-teal-deep);
}

/* "Photo from LinkedIn · Change" under the name */
.pi-photo-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    height: 28px;
    margin-top: 6px;
    padding: 0 12px 0 5px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, opacity 0.3s ease, transform 0.3s ease;
}

.pi-photo-pill.is-entering {
    opacity: 0;
    transform: translateY(4px);
}

.pi-photo-pill:hover {
    border-color: rgba(17, 161, 145, 0.5);
    color: #334155;
}

.pi-photo-pill-icon {
    width: 18px;
    height: 18px;
}

.pi-photo-pill-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.pi-photo-pill-sep {
    color: #cbd5e1;
}

.pi-photo-pill-action {
    color: #0b7a6e;
}

/* ---------- Marks on the form ---------- */
.form-group.pi-imported {
    --pc-field: #f3fcfa;
    --pc-field-line: rgba(17, 161, 145, 0.42);
    --cselect-bg: #f3fcfa;
    --cselect-border: rgba(17, 161, 145, 0.42);
}

.profile-form .form-group.pi-imported :is(input, textarea):not(:focus) {
    border-color: rgba(17, 161, 145, 0.42);
    background-color: #f3fcfa;
}

.profile-form .form-group.pi-filling :is(input, textarea) {
    border-color: #11a191 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(17, 161, 145, 0.14) !important;
}

.profile-form .form-group.pi-flash :is(input, textarea, .cselect-trigger) {
    animation: pi-flash 1.2s ease-out;
}

@keyframes pi-flash {
    0% { box-shadow: 0 0 0 0 rgba(17, 161, 145, 0.5); }
    100% { box-shadow: 0 0 0 12px rgba(17, 161, 145, 0); }
}

.pi-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 1px 7px 1px 5px;
    border: 1px solid rgba(17, 161, 145, 0.26);
    border-radius: 999px;
    background: linear-gradient(135deg, #ecfbf8 0%, #f3f0ff 100%);
    color: #0b7a6e;
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.5;
    text-transform: none;
    vertical-align: 1px;
    white-space: nowrap;
    animation: pi-pop 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pi-tag svg {
    display: block;
    width: 11px;
    height: 11px;
    color: #f59e0b;
}

.pi-tag.is-leaving,
.pi-tab-dot.is-leaving {
    opacity: 0;
    transform: scale(0.6);
}

.interest-head .pi-tag {
    margin-left: 0;
    align-self: center;
}

.tab-button[data-pi-has-imported] {
    position: relative;
}

.pi-tab-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #11a191;
    box-shadow: 0 0 0 0 rgba(17, 161, 145, 0.5);
    animation: pi-dot 1.8s ease-out 3;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-sizing: content-box;
}

.tab-icon:has(> .pi-tab-dot) {
    position: relative;
    overflow: visible;
}

.tab-icon > .pi-tab-dot {
    top: -4px;
    right: -4px;
}

@keyframes pi-dot {
    0% { box-shadow: 0 0 0 0 rgba(17, 161, 145, 0.5); }
    100% { box-shadow: 0 0 0 8px rgba(17, 161, 145, 0); }
}

/* ---------- Toast ---------- */
.pi-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100030;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: min(660px, calc(100vw - 24px));
    padding: 8px 8px 8px 14px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    font-size: 0.88rem;
    line-height: 1.4;
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
}

.pi-toast.is-open {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pi-toast svg {
    display: block;
}

.pi-toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #fbbf24;
}

.pi-toast-icon svg {
    width: 100%;
    height: 100%;
}

.pi-toast-text {
    min-width: 0;
}

.pi-toast-undo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    flex-shrink: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(94, 234, 212, 0.12);
    color: #5eead4;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.pi-toast-undo:hover {
    background: rgba(94, 234, 212, 0.22);
}

.pi-toast-undo svg {
    width: 15px;
    height: 15px;
}

.pi-toast-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.pi-toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pi-toast-close svg {
    width: 12px;
    height: 12px;
}

/* ---------- Drop anywhere ---------- */
.pi-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.32);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pi-drop-overlay[hidden] {
    display: none;
}

.pi-drop-overlay.is-open {
    opacity: 1;
}

.pi-drop-panel {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    width: min(440px, 100%);
    padding: 40px 36px 36px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 80px -24px rgba(15, 23, 42, 0.5);
    color: #64748b;
    font-size: 0.92rem;
    text-align: center;
    transform: scale(0.96);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pi-drop-overlay.is-open .pi-drop-panel {
    transform: scale(1);
}

.pi-drop-panel::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px dashed rgba(17, 161, 145, 0.4);
    border-radius: 20px;
    pointer-events: none;
}

.pi-drop-panel strong {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
}

.pi-drop-panel-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 8px;
    border-radius: 22px;
    background: rgba(17, 161, 145, 0.1);
    color: #11a191;
    animation: pi-bob 1.4s ease-in-out infinite;
}

.pi-drop-panel-icon svg {
    display: block;
    width: 40px;
    height: 40px;
}

@keyframes pi-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ---------- Phones and touch screens ---------- */
.pi-phone-only {
    display: none;
}

@media (hover: none), (max-width: 768px) {
    .pi-desktop-only {
        display: none;
    }

    .pi-phone-only {
        display: inline;
    }

    p.pi-phone-only {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .pi-tab-dot {
        top: 4px;
        right: 4px;
    }

    .pi-photo-pill {
        align-self: center;
        margin-top: 8px;
    }

    .pi-toast {
        bottom: calc(124px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 24px);
        padding-left: 12px;
        font-size: 0.84rem;
    }

    .pi-drop-overlay {
        display: none !important;
    }
}

/* A sheet that slides up from the bottom */
@media screen and (max-width: 560px) {
    .pi-modal {
        align-items: flex-end;
        padding: 0;
    }

    .pi-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 24px 24px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateY(100%);
        opacity: 1;
        transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .pi-dialog.is-resizing {
        transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .pi-grabber {
        position: absolute;
        top: 8px;
        left: 50%;
        z-index: 2;
        display: block;
        width: 38px;
        height: 4px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.16);
        transform: translateX(-50%);
    }

    .pi-close {
        top: 12px;
        right: 12px;
    }

    .pi-view {
        padding: 34px 20px 22px;
    }

    .pi-art,
    .pi-scan {
        width: 72px;
        height: 72px;
    }

    .pi-art::before,
    .pi-scan {
        border-radius: 21px;
    }

    .pi-art-doc,
    .pi-scan-doc {
        left: 20px;
        top: 13px;
        width: 32px;
    }

    @keyframes pi-beam {
        from { transform: translateY(2px); }
        to { transform: translateY(52px); }
    }

    .pi-title {
        margin-top: 14px;
        font-size: 1.2rem;
    }

    .pi-text {
        font-size: 0.9rem;
    }

    .pi-demo-window {
        --pi-demo-zoom: 1.4;
    }

    .pi-drop {
        min-height: 0;
        margin-top: 20px;
        padding: 18px 16px;
    }

    .pi-drop-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 6px;
    }

    .pi-drop-icon svg {
        width: 26px;
        height: 26px;
    }

    .pi-view[data-view="loading"] .pi-eyebrow span:last-child {
        max-width: 220px;
    }

    .pi-photo {
        margin: 0 16px 16px;
    }
}

@media screen and (max-width: 360px) {
    .pi-demo-window {
        --pi-demo-zoom: 1.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pi-modal,
    .pi-modal *,
    .pi-nav-import,
    .pi-nav-import::before,
    .pi-nav-import::after,
    .pi-nav-import *,
    .pi-tag,
    .pi-tab-dot,
    .pi-toast,
    .pi-photo-pill,
    .pi-drop-overlay,
    .pi-drop-panel,
    .pi-drop-panel-icon {
        animation: none !important;
        transition: none !important;
    }

    .pi-dialog {
        transform: none !important;
    }

    .pi-demo-menu {
        opacity: 1;
        transform: none;
    }

    .pi-demo-save {
        background: #e7f8f5;
        color: #0b7a6e;
    }

    .pi-demo-cursor {
        transform: translate(140px, 117px);
    }

    .pi-demo-ripple {
        display: none;
    }

    .pi-view[data-view="done"] .pi-done-badge path {
        stroke-dashoffset: 0;
    }

    .pi-progress-fill::after {
        display: none;
    }
}
