/* Scoped editorial aids for the bilingual entity audit. */
.entity-table{overflow-x:auto;margin:2rem 0;border:1px solid var(--border, #454550);border-radius:12px;max-width:100%;-webkit-overflow-scrolling:touch}
.entity-table table{border-collapse:collapse;width:100%;min-width:540px;font-size:.9rem;line-height:1.6}
.entity-table caption{text-align:left;padding:1rem 1.25rem;font-weight:700;color:var(--text,#fff);background:rgba(232,97,77,.09)}
.entity-table th,.entity-table td{padding:1rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--border,#454550)}
.entity-table thead th{color:var(--text,#fff);font-size:.8rem;letter-spacing:.03em}
.entity-table tbody th{width:26%;font-weight:600;color:var(--text,#fff)}
.entity-table tr:last-child td,.entity-table tr:last-child th{border-bottom:0}
.entity-code{max-width:100%;overflow-x:auto;padding:1.25rem;border:1px solid var(--border,#454550);border-radius:12px;background:#161620;color:#f3f3f7;font-size:.85rem;line-height:1.7;white-space:pre}
.entity-map{margin:2.5rem 0;padding:1.5rem;border:1px solid var(--border,#454550);border-radius:16px;background:rgba(232,97,77,.05)}
.entity-map__nodes{display:grid;grid-template-columns:1fr;gap:2.5rem;max-width:440px;margin:auto;text-align:center}
.entity-map__node{position:relative;border:1px solid var(--border,#454550);border-radius:10px;padding:1rem;background:var(--bg,#0d0d14);color:var(--text,#fff);font-size:.95rem}
.entity-map__node span{display:block;color:var(--coral,#e8614d);font-size:.75rem;letter-spacing:.12em;margin-bottom:.35rem}
.entity-map__node:not(:last-child)::after{content:'↕';position:absolute;top:100%;left:calc(50% - .5em);height:2.5rem;line-height:2.5rem;color:var(--coral,#e8614d);font-size:1.2rem}
.entity-map figcaption{font-size:.85rem;line-height:1.65;margin-top:1.5rem;text-align:left}
.entity-faq{border-bottom:1px solid var(--border,#454550);padding:1rem 0}
.entity-faq summary{cursor:pointer;font-weight:650;color:var(--text,#fff);line-height:1.6}
.entity-faq p{padding-top:.5rem}
.entity-table:focus-visible,.entity-code:focus-visible,.entity-faq summary:focus-visible{outline:2px solid var(--coral,#e8614d);outline-offset:4px}
@media(max-width:600px){.entity-map{padding:1rem}.entity-table th,.entity-table td{padding:.8rem}.entity-code{font-size:.75rem}}
.entity-map__hub{padding:1rem;border:1px solid var(--coral,#e8614d);border-radius:10px;text-align:center;color:var(--text,#fff);overflow-wrap:anywhere;margin-bottom:2rem}
.entity-map__hub span{display:block;color:var(--coral,#e8614d);font-size:.8rem;margin-bottom:.5rem}
.entity-map__hub strong{font-size:.85rem}
.entity-map__nodes{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none;gap:.75rem}
.entity-map__node::before{content:'';position:absolute;bottom:100%;left:50%;height:2rem;border-left:1px solid var(--coral,#e8614d)}
.entity-map__node:not(:last-child)::after{content:none}
@media(max-width:600px){.entity-map__nodes{grid-template-columns:1fr;gap:1rem}.entity-map__node::before{height:1rem}.entity-map__node:first-child::before{height:2rem}}
/* Article body uses the site's light reading surface. */
.article-body .entity-map__node{background:#fffaf2;color:#17171e;border-color:#bfb6aa}
.article-body .entity-map__node strong,.article-body .entity-map__hub strong{color:#17171e}
.article-body .entity-map__node span,.article-body .entity-map__hub span{color:#a33e2e}
.article-body .entity-code,.article-body .entity-code code{background:#161620;color:#f3f3f7}

/* Match entity components to the article's light reading surface. */
.article-body .entity-faq summary,
.article-body .entity-table caption,
.article-body .entity-table tbody th,
.article-body .entity-map__hub{color:var(--editorial-ink,#10131d)}
.article-body .entity-faq{border-color:var(--editorial-line,#d8d2c8)}
