.court-directory .court-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: stretch;
    gap: .3rem;
    height: 9rem;
    min-height: 9rem;
    padding: 1rem;
    overflow: hidden;
}
.court-card:hover, .court-card:focus-within { border-color: var(--accent); }
.court-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.court-card-meta small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.court-card .court-card-flags { display: flex; flex: 0 0 auto; align-items: center; gap: .3rem; }
.court-card-flags img { display: block; width: 24px; height: 16px; object-fit: contain; border: 1px solid #ffffff38; }
.court-card .court-card-heading { margin: 0; font: 700 1.25rem/1.15 Georgia, serif; min-width: 0; }
.court-card-heading a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); text-decoration: none; }
.court-card-heading a::after { content: ''; position: absolute; inset: 0; }
.court-card-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .65fr); gap: .5rem; align-items: end; align-self: end; min-width: 0; }
.court-card-hierarchy { display: grid; align-content: end; gap: .1rem; min-width: 0; }
.court-card .court-card-hierarchy a { position: relative; z-index: 1; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: .78rem; line-height: 1.2; text-decoration: none; }
.court-card .court-card-hierarchy a:hover, .court-card .court-card-city:hover { color: var(--accent); text-decoration: underline; }
.court-card .court-card-city { position: relative; z-index: 1; justify-self: end; color: var(--muted); text-align: right; font-size: .82rem; line-height: 1.2; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.court-card-city span { font-size: inherit; line-height: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.court-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.court-kind-shortcuts { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.court-kind-shortcuts a { padding: .45rem .7rem; border: 1px solid var(--line); color: var(--text); background: var(--panel); text-decoration: none; font-size: .85rem; }
.court-kind-shortcuts a[aria-current=page], .court-kind-shortcuts a:hover { border-color: var(--accent); color: var(--accent); }
.court-card-key { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.court-profile-flags { display: flex; gap: .4rem; align-items: center; margin: .8rem 0; }
.court-profile-flags img { width: 30px; height: 20px; border: 1px solid #ffffff38; }
@media (min-width: 681px) and (max-width: 1050px) { .court-directory .court-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .court-directory .court-grid { grid-template-columns: 1fr; } }

.court-profile-flags .court-card-flags { display: flex; gap: .4rem; align-items: center; }
.court-profile .court-location-note { border-left: 3px solid var(--accent); padding: .7rem 1rem; background: var(--panel); }
