/* Słownik psychologiczny: indeks A–Z, strona hasła, ramka pomocy.
   Akcent bierze kolor główny motywu (zmienne Automatu / WordPressa), a bez nich fiolet. Zmienne są na :root,
   bo przy motywie z własnym szablonem strony nie ma kontenera .tp-glossary-page. */
:root {
    --tp-g-accent: var(--color-primary, var(--wp--preset--color--primary, #6d4fc2));
    --tp-g-soft: color-mix(in srgb, var(--tp-g-accent) 8%, transparent);
    --tp-g-line: color-mix(in srgb, currentColor 14%, transparent);
}

.tp-glossary-page {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--container-max, 1100px);
    padding: 0 var(--space-4, 1.25rem) var(--space-6, 2rem);
    width: 100%;
}

.tp-glossary-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 0.4rem;
    line-height: 1.5;
    padding: 20px 0 32px;
}

.tp-glossary-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.tp-glossary-breadcrumbs [aria-current] {
    opacity: 0.7;
}

.tp-glossary-page .entry-content > p,
.tp-glossary-page .entry-content > h2,
.tp-glossary-page .entry-content > h3,
.tp-glossary-page .entry-content > ul {
    max-width: 46rem;
}

.tp-glossary-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.tp-glossary-categories a {
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    text-decoration: none;
}

.tp-glossary-search label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.25rem;
    max-width: 28rem;
}

.tp-glossary-search input {
    box-sizing: border-box;
    font: inherit;
    font-weight: 400;
    min-height: 2.5rem;
    padding: 0.4rem 0.6rem;
    width: 100%;
}

.tp-glossary-count {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.35rem;
    opacity: 0.75;
}

.tp-glossary-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 1.25rem 0;
}

.tp-glossary-letters a {
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 4px;
    min-width: 2rem;
    padding: 0.25rem 0.4rem;
    text-align: center;
    text-decoration: none;
}

.tp-glossary-group[hidden],
.tp-glossary-list li[hidden] {
    display: none;
}

.tp-glossary-list {
    columns: 3 14rem;
    column-gap: 2rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.tp-glossary-list li {
    break-inside: avoid;
    padding: 0.2rem 0;
}

.tp-glossary-list--wide {
    columns: 1;
}

.tp-glossary-list--wide li {
    border-bottom: 1px solid rgba(127, 127, 127, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0;
}

.tp-glossary-list--wide a {
    font-weight: 700;
}

.tp-glossary-list--wide span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.tp-glossary-category {
    font-size: 0.9rem;
}

/* ---------- Strona hasła ---------- */

.tp-term-hero {
    background: var(--tp-g-soft);
    border-radius: 16px;
    margin: 0 0 1.5rem;
    max-width: 46rem;
    padding: 1.25rem 1.5rem 1.4rem;
}

.tp-term-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
}

.tp-term-category,
.tp-term-kind {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.7rem;
    text-decoration: none;
}

.tp-term-category {
    background: var(--tp-g-accent);
    color: #fff;
}

.tp-term-kind {
    border: 1px solid var(--tp-g-accent);
    color: var(--tp-g-accent);
}

.tp-term-definition {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
}

.tp-term-overview {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    margin: 0 0 1.75rem;
    max-width: 46rem;
}

.tp-term-summary,
.tp-term-facts {
    border: 1px solid var(--tp-g-line);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.tp-term-summary h2 {
    font-size: 1rem;
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tp-term-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tp-term-summary li {
    line-height: 1.45;
    margin: 0 0 0.55rem;
    padding-left: 1.75rem;
    position: relative;
}

.tp-term-summary li::before {
    background: var(--tp-g-accent);
    border-radius: 50%;
    color: #fff;
    content: "✓";
    font-size: 0.7rem;
    height: 1.2rem;
    left: 0;
    line-height: 1.2rem;
    position: absolute;
    text-align: center;
    top: 0.1rem;
    width: 1.2rem;
}

.tp-term-facts dl {
    margin: 0;
}

.tp-term-facts div + div {
    border-top: 1px solid var(--tp-g-line);
    margin-top: 0.6rem;
    padding-top: 0.6rem;
}

.tp-term-facts dt {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    opacity: 0.65;
    text-transform: uppercase;
}

.tp-term-facts dd {
    font-weight: 600;
    margin: 0.15rem 0 0;
}

.tp-term-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--tp-g-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.tp-term-link:hover {
    color: var(--tp-g-accent);
}

.tp-term-example {
    background: var(--tp-g-soft);
    border-left: 4px solid var(--tp-g-accent);
    border-radius: 0 14px 14px 0;
    margin: 1.75rem 0;
    max-width: 46rem;
    padding: 1rem 1.25rem;
}

.tp-term-example-label {
    color: var(--tp-g-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 0.35rem;
    text-transform: uppercase;
}

.tp-term-example-label::before {
    content: "💬 ";
}

.tp-term-example p:last-child {
    font-style: italic;
    margin: 0;
}

.tp-term-compare {
    margin: 2rem 0;
    max-width: 46rem;
}

.tp-term-compare-card {
    border: 1px solid var(--tp-g-line);
    border-radius: 14px;
    margin: 0 0 0.75rem;
    padding: 0.9rem 1.2rem;
}

.tp-term-compare-card h3 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.tp-term-compare-card p {
    margin: 0;
}

.tp-term-faq {
    margin: 2rem 0;
    max-width: 46rem;
}

.tp-term-faq details {
    border: 1px solid var(--tp-g-line);
    border-radius: 12px;
    margin: 0 0 0.6rem;
    padding: 0.75rem 1.1rem;
}

.tp-term-faq summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    padding-right: 1.5rem;
    position: relative;
}

.tp-term-faq summary::-webkit-details-marker {
    display: none;
}

.tp-term-faq summary::after {
    color: var(--tp-g-accent);
    content: "+";
    font-size: 1.3rem;
    line-height: 1;
    position: absolute;
    right: 0;
    top: 0;
}

.tp-term-faq details[open] summary::after {
    content: "−";
}

.tp-term-faq details p {
    margin: 0.6rem 0 0;
}

.tp-term-more {
    border: 1px solid var(--tp-g-accent);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 46rem;
    padding: 0.9rem 1.2rem;
}

.tp-term-more span {
    color: var(--tp-g-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tp-term-more a {
    font-weight: 700;
}

.tp-term-more a::after {
    content: " →";
}

.tp-glossary-notice {
    background: color-mix(in srgb, #e0a100 12%, transparent);
    border: 1px solid color-mix(in srgb, #e0a100 45%, transparent);
    border-radius: 14px;
    font-size: 0.95rem;
    margin: 0 0 1.75rem;
    max-width: 46rem;
    padding: 0.9rem 1.2rem;
}

.tp-glossary-notice p {
    margin: 0.3rem 0;
}

.tp-glossary-related {
    margin: 2.25rem 0 0;
}

.tp-glossary-cards {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    list-style: none;
    margin: 0.75rem 0;
    padding: 0;
}

.tp-glossary-cards a {
    border: 1px solid var(--tp-g-line);
    border-radius: 14px;
    box-sizing: border-box;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    height: 100%;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.tp-glossary-cards a:hover,
.tp-glossary-cards a:focus-visible {
    border-color: var(--tp-g-accent);
    transform: translateY(-2px);
}

.tp-glossary-cards strong {
    color: var(--tp-g-accent);
}

.tp-glossary-cards span {
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.8;
}

@media (max-width: 700px) {
    .tp-term-overview {
        grid-template-columns: 1fr;
    }

    .tp-term-hero {
        padding: 1rem 1.1rem 1.2rem;
    }

    .tp-term-definition {
        font-size: 1.05rem;
    }
}
