body {
    background: #ececec;
    color: #1f2937;
}

a:link {
    color: #0000ee;
}

a:visited {
    color: #551a8b;
}

a.btn:visited,
a.navbar-brand:visited {
    color: inherit;
}

.app-navbar {
    background: #ffffff;
    min-height: 72px;
}

.app-navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.navbar-brand {
    text-decoration: none;
    color: #111827;
    margin-right: 0;
    flex: 0 0 auto;
}

.navbar-search-wrap {
    flex: 0 1 640px;
    width: min(640px, calc(100vw - 120px));
    max-width: 640px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex: 0 0 44px;
}

.search-form,
.form-control,
.form-select,
.btn,
.card,
.alert,
.filters-panel,
.filters-accordion,
.pagination .page-link {
    border-radius: 0 !important;
}

.search-form .form-control {
    min-height: 46px;
    border-color: #c8ccd2;
    box-shadow: none;
}

.search-form .form-control:focus,
.form-select:focus {
    box-shadow: none;
    border-color: #6c757d;
}

.search-meta {
    color: #4b5563;
}

.filters-panel,
.result-card,
.results-empty,
.filters-accordion {
    background: #ffffff;
    border: 1px solid #d7dbe0;
}

.filters-panel {
    padding: 1rem;
}

.filters-heading {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.filters-accordion summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-weight: 600;
    user-select: none;
}

.filters-accordion summary::-webkit-details-marker {
    display: none;
}

.filters-accordion[open] summary {
    border-bottom: 1px solid #d7dbe0;
}

.results-empty {
    padding: 1rem;
}

.result-card + .result-card {
    margin-top: 1rem;
}

.result-card {
    overflow: hidden;
}

.result-card-layout {
    display: flex;
    align-items: stretch;
}

.result-rail {
    width: 72px;
    flex: 0 0 72px;
    border-right: 1px solid #d7dbe0;
    background: #f3f4f6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.result-rail-box {
    width: 42px;
    height: 42px;
    border: 1px solid #cfd4da;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.result-main {
    min-width: 0;
    flex: 1 1 auto;
}

.result-media-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.result-media-wrap {
    position: relative;
    margin: 0;
    background: #f3f4f6;
    border-bottom: 1px solid #d7dbe0;
}

.result-media {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.result-title-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.9rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.result-title-overlay .result-title-link,
.result-title-overlay .result-title-link:visited {
    color: #ffffff;
    text-decoration: none;
}

.result-title-overlay .result-title-link:hover {
    text-decoration: underline;
}

.result-title-overlay h2 {
    line-height: 1.2;
    margin: 0;
}

.result-card .card-body {
    padding: 1rem 1rem 1.1rem;
}

.result-favicon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 22px;
}

.result-favicon-placeholder {
    background: #dbeafe;
    border: 1px solid #bfd1ee;
    width: 22px;
    height: 22px;
}

.result-location,
.result-contact {
    color: #6b7280;
}

.pagination-wrap {
    display: flex;
    justify-content: flex-start;
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #0d6efd;
    background: #ffffff;
    border-color: #d7dbe0;
    box-shadow: none;
}

.pagination .page-item.active .page-link {
    background: #e9ecef;
    border-color: #cfd4da;
    color: #111827;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
}

.content-panel {
    max-width: 100%;
}

.result-title-link,
.result-favicon-link {
    color: #111827;
    text-decoration: none;
}

.result-title-link:hover {
    text-decoration: underline;
}

.result-title-link h2 {
    line-height: 1.25;
}

.result-title-row {
    margin-bottom: 0.4rem;
}

.result-icon-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.result-contact-item,
.result-action-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
    text-decoration: none;
    border: 1px solid #cfd4da;
    background: #ffffff;
    min-height: 40px;
    padding: 0.45rem 0.7rem;
    width: fit-content;
    max-width: 100%;
}

.result-contact-item:visited,
.result-action-item:visited {
    color: #551a8b;
}

.result-contact-text,
.result-action-text {
    overflow-wrap: anywhere;
}

.result-contact-icon,
.result-action-icon,
.result-social-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex: 0 0 16px;
}

.result-actions,
.result-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd4da;
    background: #ffffff;
    color: #1f2937;
    text-decoration: none;
}

.icon-button:visited {
    color: #551a8b;
}

@media (max-width: 991.98px) {
    .app-navbar .container-fluid {
        align-items: center;
        gap: 0.75rem;
    }

    .navbar-search-wrap {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
    }

    .result-card-layout {
        display: block;
    }

    .result-rail {
        width: 100%;
        flex: none;
        border-right: 0;
        border-bottom: 1px solid #d7dbe0;
        justify-content: flex-start;
        padding: 0.75rem;
    }

    .result-media {
        height: 280px;
    }
}

/* Polished social-post result layout. */
body {
    background: #eef1f4;
}

.filters-panel,
.result-card,
.results-empty,
.filters-accordion {
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.result-card {
    overflow: hidden;
}

.result-rail {
    width: 82px;
    flex: 0 0 82px;
    border-right: 1px solid rgba(17, 24, 39, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    padding: 0.95rem 0.65rem;
}

.result-rail-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.result-rail-box {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.result-favicon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.result-favicon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #dbeafe, #eef6ff);
}

.result-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.92);
    color: #26384d;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
    color: #0f2742;
    background: #ffffff;
    border-color: rgba(17, 24, 39, 0.18);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.13);
    transform: translateY(-1px);
}

.icon-button:visited {
    color: #26384d;
}

.result-icon-list,
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.result-contact-item,
.result-action-item {
    color: #16324f;
    border: 1px solid rgba(22, 50, 79, 0.12);
    border-radius: 999px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    min-height: 42px;
    padding: 0.5rem 0.9rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, color 150ms ease;
}

.result-contact-item:hover,
.result-action-item:hover {
    color: #0f2742;
    border-color: rgba(22, 50, 79, 0.24);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.result-contact-item:visited,
.result-action-item:visited {
    color: #16324f;
}

@media (max-width: 991.98px) {
    .result-rail {
        width: 100%;
        flex: none;
        border-right: 0;
        border-bottom: 1px solid rgba(17, 24, 39, 0.08);
        justify-content: flex-start;
        padding: 0.75rem;
    }

    .result-rail-stack,
    .result-socials {
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }
}

/* Result card layout inspired by a premium social post profile card. */
.result-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.result-card-layout {
    align-items: stretch;
}

.result-rail {
    width: 96px;
    flex: 0 0 96px;
    background: linear-gradient(180deg, #f9fbfd 0%, #edf2f7 100%);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1.6rem 0.7rem;
}

.result-rail-stack {
    gap: 1rem;
}

.result-rail-box {
    width: 64px;
    height: 64px;
    border-radius: 20px !important;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.result-favicon {
    width: 42px;
    height: 42px;
}

.result-socials {
    gap: 0.7rem;
}

.icon-button {
    width: 42px;
    height: 42px;
    border-radius: 16px !important;
    border: 0;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.result-socials a[aria-label="Facebook"] {
    background: #1877f2;
}

.result-socials a[aria-label="LinkedIn"] {
    background: #0a66c2;
}

.result-socials a[aria-label="Instagram"] {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.result-socials a[aria-label="YouTube"] {
    background: #ff0000;
}

.result-socials a[aria-label="X"] {
    background: #111827;
}

.icon-button:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
}

.result-media-wrap {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #e5e7eb;
}

.result-media {
    height: 380px;
    object-fit: cover;
}

.result-title-overlay {
    top: 0;
    bottom: auto;
    padding: 1.45rem 1.7rem 2.2rem;
    background: linear-gradient(180deg, rgba(0, 15, 42, 0.72), rgba(0, 15, 42, 0));
}

.result-title-overlay h2 {
    font-size: clamp(1.45rem, 2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.result-card .card-body {
    padding: 1.75rem 2rem 2rem;
}

.result-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 2rem;
    align-items: center;
}

.result-copy {
    min-width: 0;
    padding-right: 1.6rem;
    border-right: 1px solid rgba(15, 23, 42, 0.10);
}

.result-title-row {
    margin-bottom: 0.65rem;
}

.result-title-link h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.result-location {
    color: #64748b;
    font-weight: 600;
}

.result-description {
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.72;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0;
}

.result-action-item,
.result-action-item:visited {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px !important;
    padding: 0.85rem 1rem;
    color: #0f2742;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.result-action-phone {
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.result-action-email {
    background: linear-gradient(180deg, #f8fffb, #eefbf4);
}

.result-action-website {
    background: linear-gradient(180deg, #fbf8ff, #f4efff);
}

.result-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex: 0 0 48px;
}

.result-action-icon svg {
    width: 24px;
    height: 24px;
}

.result-action-phone .result-action-icon {
    background: #1478ff;
}

.result-action-email .result-action-icon {
    background: #20bf74;
}

.result-action-website .result-action-icon {
    background: #6d28d9;
}

.result-action-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.result-action-label {
    color: #145aff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
}

.result-action-email .result-action-label {
    color: #15945b;
}

.result-action-website .result-action-label {
    color: #5b21b6;
}

.result-action-text {
    color: #0f2742;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.result-action-chevron {
    color: #475569;
    font-size: 2rem;
    line-height: 1;
    justify-self: end;
}

.result-action-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
}

@media (max-width: 991.98px) {
    .result-card-layout {
        display: block;
    }

    .result-rail {
        width: 100%;
        flex: none;
        border-right: 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        padding: 0.9rem 1rem;
    }

    .result-rail-stack,
    .result-socials {
        flex-direction: row;
        justify-content: flex-start;
    }

    .result-rail-stack {
        position: static;
    }

    .result-media {
        height: 320px;
    }

    .result-card .card-body {
        padding: 1.25rem;
    }

    .result-body-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .result-copy {
        border-right: 0;
        padding-right: 0;
    }

    .result-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .result-action-item,
    .result-action-item:visited {
        min-height: 58px;
        display: flex;
        justify-content: center;
        padding: 0.65rem;
    }

    .result-action-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .result-action-copy,
    .result-action-chevron {
        display: none;
    }
}

/* Compact tabbed result-card refinement. */
.result-rail {
    width: 72px;
    flex-basis: 72px;
    padding: 1rem 0.45rem;
}

.result-rail-stack {
    gap: 0.65rem;
}

.result-rail-box {
    width: 52px;
    height: 52px;
    border-radius: 16px !important;
}

.result-favicon,
.result-favicon-placeholder {
    width: 34px;
    height: 34px;
}

.result-socials {
    gap: 0.45rem;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 11px !important;
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.result-card .card-body {
    padding: 1.1rem 1.35rem 1.35rem;
}

.result-tabs {
    width: 100%;
}

.result-tab-list {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #f8fafc;
}

.result-tab-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.6rem 0.9rem;
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.result-tab-button.is-active {
    background: #ffffff;
    color: #0f2742;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.10);
}

.result-tab-panel {
    display: none;
}

.result-tab-panel.is-active {
    display: block;
}

.result-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: start;
}

.result-copy {
    border-right: 0;
    padding-right: 0;
}

.result-description {
    font-size: 0.96rem;
    line-height: 1.62;
    max-width: 68ch;
}

.result-location {
    font-size: 0.88rem;
}

.result-site-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: 260px;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(109, 40, 217, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f6f1ff);
    color: #43248b;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.result-site-pill:visited,
.result-site-pill:hover {
    color: #43248b;
}

.result-site-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    border-radius: 999px;
    background: #6d28d9;
    color: #ffffff;
}

.result-site-icon svg {
    width: 17px;
    height: 17px;
}

.result-site-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.result-action-item,
.result-action-item:visited {
    min-height: 56px;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 16px !important;
}

.result-action-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.result-action-icon svg {
    width: 18px;
    height: 18px;
}

.result-action-label {
    font-size: 0.82rem;
}

.result-action-text {
    font-size: 0.88rem;
    font-weight: 700;
}

.result-action-chevron {
    font-size: 1.35rem;
}

.result-muted {
    color: #64748b;
    font-size: 0.92rem;
}

@media (max-width: 991.98px) {
    .result-rail {
        width: 100%;
        padding: 0.7rem 0.85rem;
    }

    .result-rail-box {
        width: 48px;
        height: 48px;
    }

    .result-favicon,
    .result-favicon-placeholder {
        width: 30px;
        height: 30px;
    }

    .result-media {
        height: 210px;
    }

    .result-overview-layout {
        grid-template-columns: 1fr;
    }

    .result-overview-site {
        width: 100%;
    }

    .result-site-pill {
        max-width: 100%;
    }

    .result-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .result-action-item,
    .result-action-item:visited {
        display: flex;
        min-height: 50px;
        justify-content: center;
    }

    .result-action-copy,
    .result-action-chevron {
        display: none;
    }
}
