/* ANIE Frontend CSS v1.0.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ── Table of Contents ────────────────────────────────────────────── */
.anie-toc {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 0 0 28px;
    font-family: 'Inter', -apple-system, sans-serif;
    box-shadow: 0 2px 12px rgba(16,185,129,0.08);
}
.anie-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.anie-toc-title { font-weight: 700; font-size: 15px; color: #166534; }
.anie-toc-toggle {
    background: none; border: 1px solid #86efac; border-radius: 6px;
    cursor: pointer; width: 28px; height: 28px; font-size: 18px;
    color: #166534; line-height: 1; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.anie-toc-toggle:hover { background: #bbf7d0; }
.anie-toc-nav ol { margin: 0; padding-left: 20px; }
.anie-toc-nav > ol { padding-left: 0; list-style: decimal; }
.anie-toc-nav ol ol { list-style: lower-alpha; padding-left: 20px; margin-top: 4px; }
.anie-toc-nav li { margin: 5px 0; }
.anie-toc-nav a {
    color: #166534; text-decoration: none; font-size: 14px;
    transition: color 0.15s; font-weight: 500;
}
.anie-toc-nav a:hover { color: #15803d; text-decoration: underline; }
.anie-toc-collapsed .anie-toc-nav { display: none; }
.anie-toc-collapsed .anie-toc-header { margin-bottom: 0; }

/* ── Related Posts ────────────────────────────────────────────────── */
.anie-related-posts {
    border-top: 3px solid #e5e7eb;
    padding-top: 28px;
    margin-top: 36px;
    font-family: 'Inter', -apple-system, sans-serif;
}
.anie-related-title {
    font-size: 20px; font-weight: 700; color: #111827;
    margin: 0 0 18px; display: flex; align-items: center; gap: 8px;
}
.anie-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.anie-related-item {
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; text-decoration: none; color: inherit;
    transition: all 0.2s; display: flex; flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.anie-related-item:hover {
    border-color: #10b981; box-shadow: 0 4px 16px rgba(16,185,129,0.15);
    transform: translateY(-2px);
}
.anie-related-item img { width: 100%; height: 130px; object-fit: cover; }
.anie-related-item-title {
    padding: 10px 12px; font-size: 13px; font-weight: 600;
    color: #1f2937; line-height: 1.4; flex: 1;
}

/* ── Entity links ─────────────────────────────────────────────────── */
a.anie-entity-link {
    color: inherit;
    border-bottom: 2px dotted #10b981;
    text-decoration: none;
    font-weight: 600;
    transition: border-color 0.15s, color 0.15s;
}
a.anie-entity-link:hover { color: #059669; border-bottom-color: #059669; }

@media (max-width: 600px) {
    .anie-related-grid { grid-template-columns: 1fr 1fr; }
    .anie-toc { padding: 14px 16px; }
}
