/*
 * Elglide docs (docs.elglide.com / elglide.com/docs).
 * Loaded AFTER /styles.css — brand tokens come from there; this file only
 * adds long-form article styling. Content pages were moved verbatim from
 * the portal's /Portal/Help/* Razor pages (single source lives here now).
 */

/* ── Article shell ─────────────────────────────────────────────────── */

.docs-body { padding: 0.5rem 0 3.5rem; }

.docs-article {
    max-width: 56rem;
}

.docs-article h1 {
    font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
}

.docs-article h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.6rem;
}
.docs-article h2 .muted-note {
    color: var(--brand-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.docs-article h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}

.docs-article p,
.docs-article li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--brand-text);
}

.docs-article .lede {
    font-size: 1.02rem;
    color: var(--brand-muted);
}

.docs-article ul, .docs-article ol { padding-left: 1.4rem; margin: 0.4rem 0 1rem; }
.docs-article li { margin-bottom: 0.35rem; }
.docs-article li > ul { margin: 0.35rem 0 0.25rem; }

.docs-article code {
    font-size: 0.85em;
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    padding: 0.08rem 0.32rem;
    border-radius: 0.3rem;
}

.docs-article pre {
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    font-size: 0.83rem;
    line-height: 1.5;
    margin: 0.5rem 0 1.1rem;
}
.docs-article pre code {
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
}

.docs-article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0.5rem 0 1.25rem;
}
.docs-article th, .docs-article td {
    text-align: left;
    vertical-align: top;
    padding: 0.55rem 0.8rem;
    border: 1px solid #c9d2dd;
    line-height: 1.5;
}
.docs-article thead th {
    background: var(--brand-bg-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-muted);
}

/* ── Breadcrumbs ───────────────────────────────────────────────────── */

.crumbs {
    font-size: 0.85rem;
    color: var(--brand-muted);
    margin: 1.5rem 0 0.75rem;
}
.crumbs a { color: var(--brand-muted); }
.crumbs a:hover { color: var(--brand-primary); }
.crumbs .sep { margin: 0 0.4rem; color: #c1c8d1; }

/* ── Callouts (portal alert-info / alert-secondary equivalents) ────── */

.note, .tip, .warn {
    border: 1px solid var(--brand-border);
    border-left: 3px solid var(--brand-primary);
    background: #f3f8ff;
    border-radius: 0.5rem;
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0.75rem 0 1.1rem;
}
.note > :first-child, .tip > :first-child, .warn > :first-child { margin-top: 0; }
.note > :last-child, .tip > :last-child, .warn > :last-child { margin-bottom: 0; }

.tip {
    border-left-color: #8d97a3;
    background: var(--brand-bg-soft);
}

.warn {
    border-left-color: #d39e00;
    background: #fff9ec;
}

/* ── Hub (docs index) cards ────────────────────────────────────────── */

.docs-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.25rem 0 0;
}
@media (max-width: 720px) {
    .docs-cards { grid-template-columns: 1fr; }
}

.docs-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.docs-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}
.docs-card p {
    color: var(--brand-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 0.6rem;
}
.docs-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.docs-card li { margin-bottom: 0.3rem; font-size: 0.92rem; }
.docs-card li a::before { content: "\2192\00a0"; color: var(--brand-muted); }

/* ── Tenant roles page (reference/tenant-roles.html) ───────────────── */
/* Adapted from the portal's marketing.css .role-grid / .role-card set.
   Selectors are .docs-article-scoped so they out-rank the generic
   .docs-article ul/li/h2 rules above. */

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1.25rem 0 0;
}
@media (max-width: 991.98px) {
    .role-grid { grid-template-columns: 1fr; }
}

.role-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.25rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}
.role-card-head { border-bottom: 1px solid var(--brand-border); padding-bottom: 0.75rem; margin-bottom: 0.5rem; }
.docs-article .role-card-head h2 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    color: var(--brand-text);
}
.role-card-sub { color: var(--brand-muted); font-size: 0.85rem; margin: 0.15rem 0 0; }

.docs-article .role-rows { list-style: none; padding: 0; margin: 0; }
.docs-article .role-rows li {
    padding: 0.6rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--brand-bg-soft);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.docs-article .role-rows li:last-child { border-bottom: 0; }
.role-row-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-muted); }
.role-row-value { font-size: 0.92rem; color: var(--brand-text); }
.role-row-value.role-row-none { color: var(--brand-muted); }

.docs-article .role-guidance { list-style: none; padding: 0; margin: 0 0 2rem; max-width: 52rem; }
.docs-article .role-guidance li { padding: 0.65rem 0; margin-bottom: 0; line-height: 1.5; }
.docs-article .role-guidance li + li { border-top: 1px solid var(--brand-bg-soft); }
