/* Threat-intelligence directory. Shared tokens, header, and footer live in common.css. */

body {
    background:
        radial-gradient(circle at 14% 4%, rgba(82, 182, 255, 0.09), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(132, 103, 255, 0.08), transparent 25%),
        linear-gradient(180deg, #06101a 0%, #08111d 48%, #09111d 100%);
}

.directory_hero {
    padding: 54px 0 62px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at 70% 0%, rgba(82, 182, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(10, 18, 31, 0.9), rgba(8, 15, 26, 0.82));
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text_muted);
    font-size: 0.9rem;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.hero_content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 44px;
    align-items: end;
    margin-top: 28px;
}

.hero_content h1 {
    max-width: 780px;
    margin: 20px 0 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.hero_copy {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--text_soft);
    font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.directory_summary {
    display: grid;
    gap: 5px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(14, 23, 37, 0.9), rgba(10, 17, 29, 0.96));
    box-shadow: var(--shadow);
}

.directory_summary strong {
    margin: 3px 0;
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.directory_summary > span:last-child {
    color: var(--text_soft);
    font-size: 0.9rem;
}

.directory_section {
    padding: 70px 0 84px;
}

.directory_heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 26px;
}

.section_label {
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.directory_heading h2,
.method_panel h2 {
    margin: 10px 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.directory_heading p {
    margin: 10px 0 0;
    color: var(--text_soft);
}

.result_count {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(150, 179, 255, 0.12);
    border-radius: 999px;
    background: rgba(7, 14, 26, 0.48);
    color: var(--text_soft);
    font-size: 0.88rem;
}

.bot_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bot_card {
    min-width: 0;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(14, 23, 37, 0.9), rgba(9, 16, 27, 0.97));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.25);
}

.bot_card_header {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.bot_card_header > div:last-child {
    min-width: 0;
}

.bot_mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border: 1px solid rgba(82, 182, 255, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(82, 182, 255, 0.15), rgba(132, 103, 255, 0.13));
    color: #dff1ff;
    font-size: 1.45rem;
}

.bot_id {
    display: block;
    color: var(--text_muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bot_card h3 {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot_card h3 a {
    color: inherit;
}

.bot_card h3 a:hover,
.agent_signature a:hover code {
    color: var(--blue);
}

.agent_signature {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius_sm);
    background: rgba(4, 9, 16, 0.55);
}

.agent_signature a,
.agent_signature code {
    display: block;
    overflow: hidden;
    color: #dceaff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot_metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.bot_metrics > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.bot_metrics dt {
    overflow: hidden;
    color: var(--text_muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot_metrics dd {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 750;
}

.bot_card_footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 16px;
    color: var(--text_muted);
    font-size: 0.78rem;
}

.bot_card_footer span {
    position: relative;
}

.bot_card_footer span:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0.6em;
    right: -8px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(184, 196, 220, 0.45);
}

.pagination {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 130px;
    align-items: center;
    gap: 16px;
    margin-top: 34px;
}

.page_numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.page_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(150, 179, 255, 0.13);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text_soft);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.page_link:hover {
    border-color: rgba(82, 182, 255, 0.3);
    background: rgba(82, 182, 255, 0.08);
    color: var(--text);
}

.page_link.is_current {
    border-color: rgba(82, 182, 255, 0.34);
    background: linear-gradient(135deg, rgba(82, 182, 255, 0.2), rgba(132, 103, 255, 0.18));
    color: #fff;
    font-weight: 750;
}

.page_direction:last-child {
    justify-self: end;
}

.page_link.is_disabled {
    cursor: default;
    opacity: 0.42;
}

.page_link.is_disabled:hover {
    border-color: rgba(150, 179, 255, 0.13);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text_soft);
}

.page_ellipsis {
    min-width: 24px;
    color: var(--text_muted);
    text-align: center;
}

.database_notice,
.empty_state {
    display: grid;
    gap: 5px;
    margin: 24px 0;
    padding: 22px;
    border: 1px solid rgba(82, 182, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(82, 182, 255, 0.06);
    color: var(--text_soft);
}

.database_notice strong,
.empty_state strong {
    color: var(--text);
}

.method_section {
    padding: 0 0 88px;
}

.method_panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 42px;
    align-items: center;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    background:
        radial-gradient(circle at 0% 0%, rgba(82, 182, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(13, 21, 35, 0.9), rgba(9, 16, 27, 0.96));
    box-shadow: var(--shadow);
}

.method_panel p {
    margin: 0;
    color: var(--text_soft);
    font-size: 1rem;
}

@media (max-width: 900px) {
    .hero_content,
    .method_panel {
        grid-template-columns: 1fr;
    }

    .directory_summary {
        max-width: 360px;
    }
}

@media (max-width: 760px) {
    .directory_hero {
        padding: 38px 0 46px;
    }

    .directory_section {
        padding: 52px 0 66px;
    }

    .directory_heading {
        display: grid;
        align-items: start;
    }

    .result_count {
        justify-self: start;
    }

    .bot_grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        grid-template-columns: 1fr 1fr;
    }

    .page_numbers {
        grid-column: 1 / -1;
        grid-row: 1;
        flex-wrap: wrap;
    }

    .page_direction {
        grid-row: 2;
    }
}

@media (max-width: 480px) {
    .bot_card,
    .directory_summary,
    .method_panel {
        padding: 18px;
    }

    .bot_metrics {
        gap: 7px;
    }

    .bot_metrics > div {
        padding: 10px 8px;
    }

    .bot_metrics dt {
        font-size: 0.66rem;
    }

    .page_link {
        min-width: 38px;
        min-height: 38px;
        padding: 0 10px;
    }
}
