.tpj-wrap {
    --tpj-surface: var(--wp--preset--color--base, transparent);
    --tpj-line: currentColor;
    --tpj-subtle: inherit;
    background: var(--tpj-surface);
    border: 1px solid color-mix(in srgb, var(--tpj-line) 18%, transparent);
    border-radius: 12px;
    padding: 1.25rem;
    color: inherit;
    font: inherit;
}

.tpj-notice {
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

.tpj-notice-success {
    background: color-mix(in srgb, currentColor 6%, transparent);
}

.tpj-notice-error {
    background: color-mix(in srgb, currentColor 9%, transparent);
}

.tpj-filters {
    background: transparent;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 12px;
    padding: 1rem;
}

.tpj-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.tpj-search-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.tpj-field-search {
    margin: 0;
}

.tpj-field-search input {
    width: 100%;
}

.tpj-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: inherit;
}

.tpj-field span {
    font-size: 0.9rem;
    color: var(--tpj-subtle);
    opacity: 0.8;
}

.tpj-field input,
.tpj-field select {
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 9px;
    min-height: 42px;
    padding: 0.45rem 0.6rem;
    font-size: 0.98rem;
    background: transparent;
    color: inherit;
}

.tpj-field input:focus,
.tpj-field select:focus {
    outline: 2px solid color-mix(in srgb, currentColor 35%, transparent);
    outline-offset: 1px;
}

.tpj-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.tpj-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 0.45rem 1rem;
    border-radius: 9px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    cursor: pointer;
}

.tpj-btn:hover,
.tpj-btn:focus {
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.tpj-reset {
    color: inherit;
    opacity: 0.8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tpj-list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.tpj-card {
    background: transparent;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 12px;
    padding: 1rem;
}

.tpj-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.tpj-title a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.tpj-title a:hover,
.tpj-title a:focus {
    text-decoration-thickness: 2px;
}

.tpj-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.tpj-meta span {
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 8%, transparent);
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
}

.tpj-excerpt {
    margin: 0.85rem 0 0;
    opacity: 0.85;
}

.tpj-content {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tpj-content p {
    margin: 0 0 0.65rem;
}

.tpj-cta-row {
    margin-top: 1rem;
}

.tpj-apply-box {
    margin-top: 0.85rem;
    border-top: 1px dashed color-mix(in srgb, currentColor 20%, transparent);
    padding-top: 0.6rem;
}

.tpj-apply-box summary {
    cursor: pointer;
    font-weight: 700;
}

.tpj-apply-form {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.tpj-apply-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.tpj-apply-form input,
.tpj-apply-form textarea {
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    color: inherit;
    background: transparent;
}

.tpj-apply-form textarea,
.tpj-apply-form label:nth-of-type(4),
.tpj-apply-form label:nth-of-type(5),
.tpj-apply-form .tpj-checkbox,
.tpj-apply-form button {
    grid-column: 1 / -1;
}

.tpj-checkbox {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.tpj-pagination ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.4rem;
    padding: 0;
    margin: 1rem 0 0;
}

.tpj-pagination a,
.tpj-pagination span {
    display: inline-block;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    text-decoration: none;
    color: inherit;
}

.tpj-pagination .current {
    background: color-mix(in srgb, currentColor 15%, transparent);
    border-color: currentColor;
}

.tpj-empty {
    margin-top: 1rem;
    background: transparent;
    border: 1px dashed color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 10px;
    padding: 1rem;
}

.tpj-single {
    max-width: 960px;
    margin: 0 auto;
}

.tpj-single-card {
    display: grid;
    gap: 1rem;
}

.tpj-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 1rem;
    align-items: start;
}

.tpj-single-main {
    min-width: 0;
}

.tpj-single-sidebar {
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 10px;
    padding: 0.85rem;
    background: color-mix(in srgb, currentColor 3%, transparent);
    font-size: 0.92rem;
}

.tpj-single-sidebar h2 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
}

.tpj-single-sidebar p {
    margin: 0 0 0.5rem;
}

.tpj-content h2 {
    margin: 1rem 0 0.6rem;
    font-size: 1.12rem;
}

.tpj-content ul,
.tpj-content ol {
    margin: 0.35rem 0 0.85rem;
    padding-left: 1.2rem;
}

.tpj-content li {
    margin: 0.2rem 0;
}

.tpj-panel {
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.tpj-manage-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.tpj-manage-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tpj-form-section {
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 10px;
    padding: 0.85rem;
    margin: 0;
}

.tpj-form-section legend {
    font-weight: 600;
    padding: 0 0.45rem;
}

.tpj-manage-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tpj-manage-form .tpj-field--full {
    grid-column: 1 / -1;
}

.tpj-manage-form input,
.tpj-manage-form textarea,
.tpj-manage-form select {
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    color: inherit;
    background: transparent;
}

.tpj-manage-form input,
.tpj-manage-form select {
    min-height: 42px;
}

.tpj-manage-form textarea {
    min-height: 110px;
}

.tpj-manage-form .tpj-actions {
    grid-column: 1 / -1;
}

.tpj-manage-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tpj-manage-card {
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 10px;
    padding: 0.8rem;
}

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

    .tpj-search-row {
        grid-template-columns: 1fr;
    }

    .tpj-list {
        grid-template-columns: 1fr;
    }

    .tpj-apply-form {
        grid-template-columns: 1fr;
    }

    .tpj-single-layout {
        grid-template-columns: 1fr;
    }

    .tpj-manage-list {
        grid-template-columns: 1fr;
    }

    .tpj-manage-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tpj-wrap {
        padding: 0.85rem;
    }

    .tpj-filter-grid {
        grid-template-columns: 1fr;
    }

    .tpj-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
