/* TempoJam ads (public/ads/tempojam-ads.js). Tokens only; quiet hairline frames, labelled, never covering content. */
html.tj-ad-top-on body{padding-top:var(--tj-ad-top-h,0px)}
html.tj-ad-bottom-on body{padding-bottom:var(--tj-ad-bottom-h,0px)}
.tj-ad-banner{position:fixed;inset-inline:0;z-index:900;display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:4px 16px;background:var(--tj-bg);color:var(--tj-muted);font:12px/1.3 var(--tj-font,system-ui,sans-serif)}
.tj-ad-banner[hidden]{display:none}
.tj-ad-banner-top{top:0;border-bottom:1px solid var(--tj-line)}
.tj-ad-banner-bottom{bottom:0;border-top:1px solid var(--tj-line);padding-bottom:max(4px,env(safe-area-inset-bottom))}
@media (min-width:760px){.tj-ad-banner{min-height:90px}}
.tj-ad-label{font-size:11px;letter-spacing:.02em;color:var(--tj-subtle,var(--tj-muted))}
.tj-ad-banner .tj-ad-label{position:absolute;inset-inline-end:8px;top:2px;font-size:11px}
.tj-ad-slot{display:grid;gap:6px;margin:12px 0;padding:10px 12px;border:1px solid var(--tj-line);border-radius:var(--tj-radius-sm,8px);background:var(--tj-surface,transparent);color:var(--tj-text,inherit);font:13px/1.35 var(--tj-font,system-ui,sans-serif)}
.tj-ad-slot[hidden]{display:none}
.tj-ad-banner.tj-ad-slot{margin:0;border-radius:0;border-inline:0;background:var(--tj-bg)}
.tj-ad-player{min-height:120px}
@media (min-width:760px){.tj-ad-player{min-height:250px}}
.tj-ad-slot ins.adsbygoogle{width:100%}
.tj-sponsored{display:flex;align-items:center;gap:12px;min-width:0;color:inherit;text-decoration:none}
.tj-sponsored img{flex:none;width:96px;height:72px;object-fit:cover;border-radius:6px;border:1px solid var(--tj-line)}
.tj-sponsored span{display:grid;gap:2px;min-width:0}
.tj-sponsored b{font-size:14px;font-weight:600;color:var(--tj-text,inherit)}
.tj-sponsored small{font-size:12px;color:var(--tj-muted)}
.tj-sponsored:hover b,.tj-sponsored:focus-visible b{color:var(--tj-violet-soft,var(--tj-violet))}
.tj-sponsored:focus-visible{outline:2px solid var(--tj-focus,var(--tj-violet));outline-offset:3px;border-radius:6px}
.tj-sponsored.compact img{width:64px;height:40px}
.tj-ad-player .tj-sponsored,.tj-ad-summary .tj-sponsored{flex-direction:column;align-items:stretch;text-align:start}
.tj-ad-player .tj-sponsored img,.tj-ad-summary .tj-sponsored img{width:100%;height:auto;max-height:260px;aspect-ratio:16/9}
.tj-ad-break{max-width:min(440px,calc(100vw - 32px));padding:0;border:1px solid var(--tj-line-strong,var(--tj-line));border-radius:var(--tj-radius,12px);background:var(--tj-surface,var(--tj-bg));color:var(--tj-text,inherit);font:14px/1.4 var(--tj-font,system-ui,sans-serif)}
.tj-ad-break::backdrop{background:color-mix(in srgb,var(--tj-bg) 82%,transparent)}
.tj-ad-break-box{display:grid;gap:12px;padding:18px}
.tj-ad-break .tj-sponsored{flex-direction:column;align-items:stretch}
.tj-ad-break .tj-sponsored img{width:100%;height:auto;aspect-ratio:16/9}
.tj-ad-break p{margin:0;font-size:12px;color:var(--tj-muted)}
.tj-ad-break-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tj-ad-break-actions a{color:var(--tj-violet-soft,var(--tj-violet));font-size:13px}
.tj-ad-break-actions button{min-height:40px;padding:0 18px;border:0;border-radius:var(--tj-radius-pill,999px);background:var(--tj-violet);color:var(--tj-paper,white);font:600 14px var(--tj-font,system-ui,sans-serif);cursor:pointer}
.tj-ad-break-actions button:disabled{opacity:.6;cursor:default}
html.tj-no-ads .tj-ad-slot,html.tj-no-ads .tj-ad-banner{display:none!important}
/* In-article ads on CMS and lesson pages: between paragraphs, clearly labelled, full text width. */
.tj-ad-article{margin:24px 0;min-height:100px}
.tj-ad-article .tj-sponsored img{width:160px;height:100px}
@media (max-width:600px){.tj-ad-article .tj-sponsored{flex-direction:column;align-items:stretch}.tj-ad-article .tj-sponsored img{width:100%;height:auto;aspect-ratio:16/9}}
/* Test ads (?ads=test on localhost): grey boxes at the real AdSense sizes. */
.tj-ad-test{display:grid;place-items:center;margin-inline:auto;max-width:100%;border:1px dashed var(--tj-line-strong,var(--tj-line));border-radius:4px;background:var(--tj-surface-2,var(--tj-surface));color:var(--tj-muted);font:12px/1.3 var(--tj-font,system-ui,sans-serif);text-align:center}
.tj-ad-test-top,.tj-ad-test-bottom{width:320px;height:50px}
@media (min-width:760px){.tj-ad-test-top,.tj-ad-test-bottom{width:728px;height:90px}}
.tj-ad-test-summary{width:336px;height:280px}
.tj-ad-test-player{width:300px;height:250px}
.tj-ad-test-tool{width:320px;height:100px}
.tj-ad-test-article{width:100%;height:280px}
/* Top banner under a page header (data-tj-banner-anchor): in the page flow, not pinned. */
.tj-ad-banner.tj-ad-banner-inline{position:relative;inset:auto;z-index:auto;width:100%;border-top:0}
.seo-top-ad{margin:16px 0}
/* Third-card ads in workspace lists: they take a card's place in the list or grid. */
.tj-feed-ad.tj-ad-slot{margin:0;min-height:120px}
.tj-feed-ad[hidden]{display:none}
