.terms-page h1,
.term-detail h1 {
    margin-top: 0;
}

.terms-header .inner,
.term-detail-inner {
    padding: 20px;
}

.term-search {
    max-width: 680px;
    margin: 18px 0 10px;
}

.term-clear {
    display: inline-block;
    margin-top: 8px;
}

.term-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
}

.term-letter {
    min-width: 36px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #333;
    text-align: center;
}

.term-letter:hover,
.term-letter:focus,
.term-letter.active {
    border-color: #568f3e;
    background: #568f3e;
    color: #fff;
    text-decoration: none;
}

.term-results {
    margin-top: 18px;
}

.terms-home-list {
    margin: 18px 0 14px;
}

.terms-home-list .term-card {
    padding: 12px 15px;
}

.terms-home-list .term-card h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.term-sidebar-search {
    margin-bottom: 12px;
}

.term-sidebar-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.term-sidebar-letters a {
    min-width: 26px;
    padding: 3px 5px;
    border: 1px solid #ddd;
    text-align: center;
}

.term-sidebar-list {
    margin-bottom: 0;
}

.term-sidebar-list li {
    padding: 5px 0;
    border-top: 1px solid #eee;
}

.term-card {
    margin-bottom: 12px;
    padding: 16px 18px;
}

.term-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.term-card-footer,
.term-meta,
.term-neighbours {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.term-card-footer {
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.term-meta {
    margin-bottom: 18px;
    color: #777;
}

.term-content {
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.term-content img,
.term-content table {
    max-width: 100%;
    height: auto !important;
}

.term-neighbours {
    margin: 18px 0;
}

.term-neighbours > div {
    width: 50%;
}

.term-neighbours small,
.term-neighbours a {
    display: block;
}

@media (max-width: 767px) {
    .terms-header .inner,
    .term-detail-inner {
        padding: 14px;
    }

    .term-card-footer,
    .term-meta,
    .term-neighbours {
        display: block;
    }

    .term-neighbours > div {
        width: 100%;
        margin-bottom: 14px;
        text-align: left;
    }
}
