/*
 * swarm.css - the operations-log page.
 *
 * The page itself is deliberately SCRIPTLESS: the site's Content-Security-
 * Policy sets `script-src 'none'`, and the previous version of this page was
 * an interactive canvas simulation whose inline <script> and inline <style>
 * were both blocked by that policy, so it rendered as an empty shell behind
 * the "Research" navigation link.
 *
 * Rather than weaken the policy, the page was rebuilt as static HTML on the
 * same design system as the rest of the site. Only the agent-specific
 * components live here; everything else comes from site.css.
 */

/* --- Agent roster ------------------------------------------------------- */
.agent-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px; margin-top: 44px;
}

.agent-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 26px;
    display: flex; flex-direction: column; gap: 12px;
    transition: border-color 0.2s, transform 0.2s;
}

.agent-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.agent-head {
    display: flex; align-items: center; gap: 14px;
}

.agent-avatar {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-weight: 800; font-size: 1.1rem;
    color: var(--bg);
}

.agent-name { font-size: 1.05rem; font-weight: 700; }
.agent-role {
    font-family: var(--mono); font-size: 0.74rem; color: var(--accent);
    letter-spacing: 0.04em;
}

.agent-task {
    font-size: 0.88rem; color: var(--text-muted); line-height: 1.65;
    padding-top: 12px; border-top: 1px solid var(--border);
}

.agent-meta {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px;
}

.agent-meta span {
    font-family: var(--mono); font-size: 0.68rem;
    border: 1px solid var(--border); border-radius: 6px;
    padding: 3px 8px; color: var(--text-muted);
}

/* --- Operations log ----------------------------------------------------- */
.log-table {
    width: 100%; border-collapse: collapse; margin-top: 36px;
    font-size: 0.86rem;
}

.log-table th, .log-table td {
    text-align: left; padding: 13px 16px;
    border-bottom: 1px solid var(--border); vertical-align: top;
}

.log-table thead th {
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-muted); font-weight: 700;
}

.log-table td:first-child {
    font-family: var(--mono); font-size: 0.74rem; color: var(--accent);
    white-space: nowrap; width: 110px;
}

.log-table td.log-what { color: var(--text); }
.log-table td.log-detail { color: var(--text-muted); line-height: 1.6; }
.log-table tbody tr:last-child td { border-bottom: none; }

.log-table .tag {
    display: inline-block; font-family: var(--mono); font-size: 0.66rem;
    border-radius: 5px; padding: 2px 7px; letter-spacing: 0.04em;
    border: 1px solid currentColor;
}

.log-table .tag-verify { color: var(--green); }
.log-table .tag-fix { color: var(--accent); }
.log-table .tag-detect { color: var(--amber); }
.log-table .tag-tooling { color: var(--text-muted); }

/* --- Method rules -------------------------------------------------------- */
.rule-list {
    list-style: none; display: flex; flex-direction: column; gap: 16px;
    margin-top: 36px;
}

.rule-list li {
    display: grid; grid-template-columns: 54px 1fr; gap: 18px;
    padding: 20px 22px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 12px;
}

.rule-key {
    font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
    color: var(--accent); letter-spacing: 0.06em; padding-top: 2px;
}

.rule-list strong { display: block; font-size: 0.96rem; margin-bottom: 5px; }
.rule-list p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.65; }

/* --- Artifact grid -------------------------------------------------------- */
.artifact-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px; margin-top: 36px;
}

.artifact-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 22px;
    background: var(--bg-card); display: flex; flex-direction: column; gap: 8px;
}

.artifact-card .artifact-kind {
    font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--green);
}

.artifact-card strong { font-size: 0.94rem; }
.artifact-card p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }
.artifact-card a { margin-top: auto; font-size: 0.82rem; font-weight: 600; }

/* --- Page banner ---------------------------------------------------------- */
.page-head {
    padding: 84px 0 48px;
    border-bottom: 1px solid var(--border);
}

.page-head h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.1rem); font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 18px;
}

.page-head h1 span { color: var(--accent); }
.page-head p {
    font-size: 1.05rem; color: var(--text-muted); max-width: 700px; line-height: 1.7;
}

.breadcrumb {
    font-family: var(--mono); font-size: 0.76rem; color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
