.firm-directory {
    margin: 2rem 0;
}
.firm-search {
    margin: 0 0 2rem 0;
    width: 100%;
    display: block;
}
.firm-search input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.firm-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15), 0 10px 24px rgba(15, 23, 42, 0.12);
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #3498db;
}
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}
.pagination .page-info {
    padding: 0.5rem 1rem;
    color: #666;
}
.firm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.firm-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.firm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.firm-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
}
.firm-card-name:hover {
    color: #2563eb;
}
.firm-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.firm-metric {
    display: flex;
    flex-direction: column;
}
.firm-metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.firm-metric-value {
    font-size: 1.1rem;
    font-weight: 600;
}
.firm-card-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #475569;
}
.firm-results-summary {
    font-size: 0.95rem;
    color: #666;
    margin: 1rem 0;
}
@media (max-width: 768px) {
    .firm-card-grid {
        grid-template-columns: 1fr;
    }
}
.firm-card a {
    color: inherit;
}

.hoaballot-related-card,
.hoaballot-context-card,
.hoaballot-demo-card {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #fbfcfd;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hoaballot-related-card h2,
.hoaballot-context-card h2,
.hoaballot-demo-card h2 {
    margin: 0 0 0.65rem;
    color: #1f2937;
    font-size: 1.15rem;
    line-height: 1.35;
}
.hoaballot-related-card p,
.hoaballot-context-card p,
.hoaballot-demo-card p {
    margin: 0 0 0.85rem;
    color: #4b5563;
    line-height: 1.65;
}
.hoaballot-related-card .hoaballot-note,
.hoaballot-context-card .hoaballot-note,
.hoaballot-demo-card .hoaballot-note {
    margin-top: 0.75rem;
    color: #6b7280;
    font-size: 0.9rem;
}
.hoaballot-link {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}
.hoaballot-link:hover,
.hoaballot-link:focus {
    text-decoration: underline;
}
.hoaballot-resource-page {
    max-width: 920px;
    margin: 0 auto;
    color: #1f2937;
    line-height: 1.7;
}
.hoaballot-resource-page h1 {
    margin: 0 0 1rem;
    color: #111827;
    font-size: clamp(2rem, 5vw, 2.65rem);
    line-height: 1.15;
}
.hoaballot-resource-page h2 {
    margin: 2.25rem 0 0.75rem;
    color: #1f2937;
    font-size: 1.35rem;
    line-height: 1.3;
}
.hoaballot-resource-page p {
    margin: 0 0 1rem;
}
.hoaballot-resource-page ul {
    margin: 0 0 1.25rem 1.25rem;
    padding: 0;
}
.hoaballot-resource-page li {
    margin-bottom: 0.45rem;
}
.hoaballot-resource-page a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}
.hoaballot-resource-page a:hover,
.hoaballot-resource-page a:focus {
    text-decoration: underline;
}
.directory-crawlable-summary {
    margin: 1.5rem 0 2rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}
.directory-crawlable-summary h2 {
    margin: 0 0 0.9rem;
    color: #1f2937;
    font-size: 1.2rem;
}
details.directory-crawlable-summary summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 700;
    list-style-position: inside;
}
details.directory-crawlable-summary[open] summary {
    margin-bottom: 0.9rem;
}
details.directory-crawlable-summary .directory-fallback-count {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
}
.directory-crawlable-summary ul {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2;
}
.directory-crawlable-summary li {
    break-inside: avoid;
    margin-bottom: 0.45rem;
}
.directory-crawlable-summary a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.directory-crawlable-summary a:hover,
.directory-crawlable-summary a:focus {
    text-decoration: underline;
}
.directory-crawlable-summary .directory-fallback-meta {
    color: #64748b;
    font-size: 0.88rem;
}
@media (max-width: 720px) {
    .hoaballot-related-card,
    .hoaballot-context-card,
    .hoaballot-demo-card {
        padding: 1rem;
    }
    .directory-crawlable-summary ul {
        columns: 1;
    }
}