/* Arshad Site Toolkit. Uses the theme's CSS variables when present, with neutral fallbacks. */
.asm-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none; }
.asm-progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--accent, #4338ca), var(--accent-2, #0891b2)); will-change: transform; }

.asm-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border, #e1e5ee); background: var(--surface, #fff); color: var(--text, #0f172a); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow, 0 6px 20px rgba(0, 0, 0, .15)); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s, border-color .2s; }
.asm-top.is-visible { opacity: 1; transform: none; }
.asm-top:hover { border-color: var(--accent, #4338ca); color: var(--accent, #4338ca); }
.asm-top[hidden] { display: none; }

.asm-toc { background: var(--surface-2, #eef0f7); border: 1px solid var(--border, #e1e5ee); border-radius: 14px; padding: 18px 22px; margin: 0 0 2em; font-size: .98rem; }
.asm-toc strong { display: block; margin-bottom: 8px; }
.asm-toc ol { margin: 0; padding-left: 1.2em; }
.asm-toc li { margin: 4px 0; }
.asm-toc .lvl3 { margin-left: 1.1em; list-style: circle; font-size: .94em; }

.asm-author { display: flex; gap: 18px; align-items: flex-start; margin: 2.5em 0 1.5em; padding: 22px; border: 1px solid var(--border, #e1e5ee); border-radius: 16px; background: var(--surface, #fff); }
.asm-author .asm-avatar { border-radius: 50%; flex: none; }
.asm-author p { margin: 4px 0 0; color: var(--muted, #55607a); font-size: .98rem; }
.asm-author .asm-links { font-size: .92rem; }

.asm-related { margin-top: 2em; }
.asm-related h2 { font-size: 1.3rem; margin-top: 0; }
.asm-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.asm-related li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border, #e1e5ee); border-radius: 12px; background: var(--surface, #fff); transition: border-color .2s, transform .2s; }
.asm-related li:hover { border-color: var(--accent, #4338ca); transform: translateX(4px); }
.asm-related a { font-weight: 600; text-decoration: none; }
.asm-related span { color: var(--muted, #55607a); font-size: .88rem; white-space: nowrap; }
@media (max-width: 560px) { .asm-related li { flex-direction: column; gap: 2px; } }

/* Ad containers: clearly labelled, never inside navigation or controls, reserve no fixed height (no layout-shift tricks). */
.asm-ad { margin: 2em 0; text-align: center; }
.asm-ad small { display: block; color: var(--muted, #55607a); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

.asm-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; max-width: 560px; margin-inline: auto; padding: 16px 18px; border-radius: 14px; background: var(--surface, #fff); color: var(--text, #0f172a); border: 1px solid var(--border, #e1e5ee); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, .2)); font-size: .93rem; }
.asm-consent[hidden] { display: none; }
.asm-consent p { margin: 0 0 12px; }
.asm-consent button { padding: 8px 18px; border-radius: 10px; border: 1px solid var(--border, #e1e5ee); background: var(--surface-2, #eef0f7); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.asm-consent button[data-asm-consent="granted"] { background: var(--accent, #4338ca); color: var(--accent-contrast, #fff); border-color: transparent; }

@media (prefers-reduced-motion: reduce) { .asm-top, .asm-related li { transition: none; } .asm-progress span { transition: none; } }
