/* Numbered citations: [1] pills in the text, tooltip with source name + checked date, numbered Sources list. Purple #7829B4 numerals. */
.ats-cite { position: relative; display: inline; top: -0.42em; font-size: 0.72em; line-height: 0; vertical-align: baseline; margin-inline: 0.1em; white-space: nowrap; }
body .ats-cite a.ats-cite__a {
	display: inline-block; padding: 0.12em 0.42em; border-radius: 999px; line-height: 1;
	font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; text-decoration: none;
	color: var(--color-accent-2, #7829b4); background: rgb(120 41 180 / 9%); box-shadow: inset 0 0 0 1px rgb(120 41 180 / 16%); text-decoration: none;
	transition: background-color 0.12s ease, color 0.12s ease;
}
.ats-cite a.ats-cite__a:hover { background: rgb(120 41 180 / 16%); text-decoration: none; }
.ats-cite a.ats-cite__a:focus-visible { outline: 0; box-shadow: var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #7829b4); background: rgb(120 41 180 / 16%); }
.ats-cite__tip {
	position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 0.7em); transform: translateX(-50%);
	display: none; flex-direction: column; gap: 0.15em; width: max-content; max-width: min(17rem, 72vw);
	padding: 0.5rem 0.7rem; border-radius: 0.6rem; background: #2b2a28; color: #fff;
	font-size: 0.8rem; line-height: 1.35; font-weight: 400; white-space: normal; text-align: left; box-shadow: 0 6px 20px rgb(43 42 40 / 24%); pointer-events: none;
}
.ats-cite__tip b { font-weight: 600; overflow-wrap: anywhere; }
.ats-cite__tip span { color: #d9cfe6; }
.ats-cite__a:hover + .ats-cite__tip, .ats-cite__a:focus-visible + .ats-cite__tip { display: flex; }
@media (max-width: 600px) { .ats-cite__tip { left: 16px; right: 16px; transform: none; bottom: auto; max-width: none; width: auto; margin-top: 0.4rem; position: fixed; top: auto; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .ats-cite a.ats-cite__a { transition: none; } }

.ats-sources-sec { scroll-margin-top: 5rem; }
.ats-sources { list-style: none; counter-reset: src; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.ats-src { counter-increment: src; display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 0.7rem; background: var(--color-surface-2, #f7f5f2); }
.ats-src::before { content: counter(src); grid-row: 1 / span 2; align-self: start; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--color-accent-2, #7829b4); background: rgb(120 41 180 / 10%); }
.ats-src:target { box-shadow: 0 0 0 2px var(--color-accent-2, #7829b4); }
.ats-src__main { grid-column: 2; overflow-wrap: anywhere; }
.ats-src__name { font-weight: 600; color: var(--color-text, #2b2a28); text-decoration-color: rgb(120 41 180 / 45%); text-underline-offset: 0.15em; }
.ats-src__name:hover { color: var(--color-accent-2, #7829b4); }
.ats-src__for { color: var(--color-text-muted, #5f5b55); }
.ats-src__meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-top: 0.2rem; font-size: 0.82rem; color: var(--color-text-muted, #5f5b55); }
.ats-src__tag { padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #8a4a00; background: #fff1e0; }
.ats-src__back a { color: var(--color-accent-2, #7829b4); text-decoration: none; padding: 0.1rem 0.3rem; border-radius: 0.3rem; }
.ats-src__back a:hover { background: rgb(120 41 180 / 10%); }
.ats-src__back a:focus-visible { outline: 0; box-shadow: var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #7829b4); }
.ats-src a:focus-visible { outline: 0; box-shadow: var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #7829b4); border-radius: 0.25rem; }
