/* All rules are scoped to the plugin; typography is inherited from the active theme. */
.hat-toplist {
    --hat-ink: #112139;
    --hat-green: #15803d;
    --hat-green-hover: #166534;
    --hat-link: #1766bb;
    container: hat-toplist / inline-size;
    width: 100%;
    margin: 1.5rem 0;
    color: var(--hat-ink);
    font-family: inherit;
    line-height: 1.5;
    text-align: left;
}
.hat-toplist, .hat-toplist * { box-sizing: border-box; }
.hat-toplist .hat-toplist__title { margin: 0 0 1.25rem; color: var(--hat-ink); }
.hat-toplist ol.hat-toplist__items {
    display: grid;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.hat-toplist li.hat-toplist__card {
    display: block;
    list-style: none;
    margin: 0;
    padding: 22px 24px;
    background: #fff;
    color: var(--hat-ink);
    border: 1px solid #e5eaf0;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(17, 33, 57, .08);
}
.hat-toplist li.hat-toplist__card::before,
.hat-toplist li.hat-toplist__card::after,
.hat-toplist .hat-toplist__features li::before,
.hat-toplist .hat-toplist__features li::after { content: none; }
.hat-toplist .hat-toplist__row {
    display: grid;
    grid-template-columns: minmax(150px, .75fr) minmax(0, 1.65fr) minmax(0, 1.1fr) 164px;
    align-items: center;
    gap: 26px;
}
.hat-toplist .hat-toplist__identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hat-toplist .hat-toplist__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    background: #112139;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.hat-toplist .hat-toplist__brand { flex: 1; min-width: 0; text-align: center; }
.hat-toplist .hat-toplist__image { display: flex; justify-content: center; margin: 0 0 8px; }
.hat-toplist img.hat-toplist__logo { display: block; width: 64px; height: 64px; margin: 0; object-fit: contain; border: 0; border-radius: 0; box-shadow: none; }
.hat-toplist .hat-toplist__name { display: block; margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.hat-toplist a.hat-toplist__name { color: var(--hat-link); text-decoration: none; }
.hat-toplist a.hat-toplist__name:hover { text-decoration: underline; }
.hat-toplist .hat-toplist__offer {
    padding: 18px 16px;
    border: 2px dashed var(--hat-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}
.hat-toplist ul.hat-toplist__features { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.hat-toplist .hat-toplist__features li { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 0; line-height: 1.5; list-style: none; overflow-wrap: anywhere; }
.hat-toplist .hat-toplist__check { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--hat-green); color: #fff; font-size: 13px; font-weight: 700; }
.hat-toplist .hat-toplist__action { display: grid; gap: 8px; text-align: center; min-width: 0; }
.hat-toplist a.hat-toplist__cta,
.hat-toplist a.hat-toplist__cta:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 3px;
    background: var(--hat-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: none;
    overflow-wrap: anywhere;
    transition: background-color .15s;
}
.hat-toplist a.hat-toplist__cta:hover { background: var(--hat-green-hover); color: #fff; text-decoration: none; }
.hat-toplist .hat-toplist__review { color: var(--hat-ink); font-size: 14px; font-weight: 600; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.hat-toplist a.hat-toplist__review:hover { text-decoration: underline; }
.hat-toplist .hat-toplist__legal { margin-top: 18px; font-size: 12px; line-height: 1.65; color: #40536b; overflow-wrap: anywhere; }
.hat-toplist .hat-toplist__legal p { margin: 0 0 6px; font-size: inherit; line-height: inherit; }
.hat-toplist .hat-toplist__legal p:last-child { margin-bottom: 0; }
.hat-toplist .hat-toplist__legal a { color: #1766bb; text-decoration: underline; }
.hat-toplist a:focus-visible { outline: 3px solid #1766bb; outline-offset: 4px; }
@container hat-toplist (max-width: 920px) {
    .hat-toplist .hat-toplist__row { grid-template-columns: 160px minmax(0, 1fr); gap: 18px 24px; }
    .hat-toplist .hat-toplist__identity { grid-column: 1; grid-row: 1 / span 2; }
    .hat-toplist .hat-toplist__offer-area { grid-column: 2; }
    .hat-toplist .hat-toplist__features-area { grid-column: 2; }
    .hat-toplist .hat-toplist__action { grid-column: 1 / -1; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 24px; }
}
@container hat-toplist (max-width: 540px) {
    .hat-toplist li.hat-toplist__card { padding: 20px 18px; }
    .hat-toplist .hat-toplist__row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .hat-toplist .hat-toplist__identity { grid-column: 1; grid-row: auto; }
    .hat-toplist .hat-toplist__brand { display: flex; align-items: center; gap: 12px; text-align: left; }
    .hat-toplist .hat-toplist__image { flex: 0 0 52px; margin: 0; }
    .hat-toplist img.hat-toplist__logo { width: 52px; height: 52px; }
    .hat-toplist .hat-toplist__offer-area, .hat-toplist .hat-toplist__features-area { grid-column: 1; }
    .hat-toplist .hat-toplist__action { grid-column: 1; grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .hat-toplist .hat-toplist__offer { font-size: 17px; padding: 16px 14px; }
}
/* Fallback for browsers without container queries. */
@supports not (container-type: inline-size) {
    @media (max-width: 920px) {
        .hat-toplist .hat-toplist__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
    }
    @media (max-width: 540px) {
        .hat-toplist .hat-toplist__row { grid-template-columns: minmax(0, 1fr); }
    }
}
@media (prefers-reduced-motion: reduce) {
    .hat-toplist a.hat-toplist__cta { transition: none; }
}
