/* ============================================================
   For developers and AI agents (Views/Home/Agents): the legal pages' frame (legal.css/js) with its own head,
   address, fact lists, tables and limit tiles. Classes: ag-.
   ============================================================ */

.ag-hero {
    padding-bottom: 28px;
}

.ag-lead {
    max-width: 68ch;
    margin: 0 0 18px !important;
    font-size: 17px;
    line-height: 1.9;
    color: var(--ds-muted);
}

.ag-address {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    max-width: 100%;
    margin-bottom: 18px;
    padding: 10px 16px;
    border-radius: var(--ds-r-md);
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    box-shadow: var(--ds-shadow-sm);
    font-size: 14px;
    font-weight: 700;
    color: var(--ds-ink);
}

    .ag-address code {
        font-family: var(--ds-mono);
        font-size: 14.5px;
        color: var(--ds-red);
        overflow-wrap: anywhere;
    }

.ag-user-link {
    text-decoration: none;
    color: var(--ds-ink);
}

/* ---------- code inside the document ---------- */
.ag-doc code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--ds-soft);
    border: 1px solid var(--ds-line-soft);
    font-family: var(--ds-mono);
    font-size: .86em;
    color: var(--ds-ink);
    overflow-wrap: anywhere;
}

/* ---------- facts: label and value ---------- */
.ag-facts {
    display: grid;
    gap: 8px;
    margin: 14px 0 16px;
}

    .ag-facts > div {
        display: grid;
        grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
        gap: 4px 16px;
        align-items: baseline;
        padding: 10px 16px;
        border-radius: 12px;
        background: var(--ds-soft);
        border: 1px solid var(--ds-line-soft);
    }

    .ag-facts dt {
        font-size: 13px;
        font-weight: 700;
        color: var(--ds-muted);
    }

    .ag-facts dd {
        margin: 0;
        font-size: 14.5px;
        line-height: 1.7;
        color: var(--ds-ink);
    }

        .ag-facts dd code {
            background: none;
            border: 0;
            padding: 0;
        }

/* ---------- tables ---------- */
.ag-table-wrap {
    margin: 14px 0 16px;
    overflow-x: auto;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-md);
}

.ag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    line-height: 1.7;
}

    .ag-table th,
    .ag-table td {
        padding: 10px 14px;
        border-bottom: 1px solid var(--ds-line-soft);
        text-align: start;
        vertical-align: top;
    }

    .ag-table thead th {
        background: var(--ds-soft);
        font-size: 12.5px;
        font-weight: 700;
        color: var(--ds-muted);
        white-space: nowrap;
    }

    .ag-table tbody th {
        font-weight: 600;
        white-space: nowrap;
        color: var(--ds-ink);
    }

    .ag-table tr:last-child th,
    .ag-table tr:last-child td {
        border-bottom: 0;
    }

    .ag-table .ds-chip {
        margin: 2px 0;
        margin-inline-end: 4px;
        white-space: nowrap;
    }

/* ---------- limits ---------- */
.ag-limits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

    .ag-limits > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 14px 16px;
        border-radius: 12px;
        background: var(--ds-tint);
        border: 1px solid var(--ds-tint-line);
    }

    .ag-limits b {
        font-size: 22px;
        font-weight: 800;
        line-height: 1.3;
        color: var(--ds-red);
    }

    .ag-limits span {
        font-size: 13px;
        line-height: 1.6;
        color: var(--ds-muted);
    }

@media (max-width: 767.98px) {
    .ag-limits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ag-facts > div {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media print {
    .ag-user-link {
        display: none;
    }
}
