/* ---------------------------------------------------------------
   ASG Scaffold — content slots, gap report, embeds, TOC
   Colours come from the theme's custom properties (see theme style.css)
   --------------------------------------------------------------- */

/* --- Content slots ------------------------------------------- */
.asg-slot { margin: 2rem 0; }

.asg-slot--gap {
	border: 1px dashed var(--asg-gap-border, #c2ccd8);
	border-radius: 6px;
	background: var(--asg-gap-bg, #f8fafc);
	padding: 1.25rem 1.4rem;
}

.asg-slot__head { display: flex; gap: .85rem; align-items: flex-start; }

.asg-slot__icon {
	width: 24px; height: 24px; flex: 0 0 24px;
	color: var(--asg-primary, #264164); opacity: .55; margin-top: 2px;
}

.asg-slot__title {
	margin: 0; font-weight: 600; line-height: 1.3;
	color: var(--asg-primary, #264164);
}

.asg-slot__status {
	margin: .15rem 0 0; font-size: .8125rem; letter-spacing: .02em;
	text-transform: uppercase; color: #7d6a2e;
}
.asg-slot--gap .asg-slot__status::before {
	content: ''; display: inline-block; width: 7px; height: 7px;
	border-radius: 50%; background: #d9822b; margin-right: .45rem; vertical-align: middle;
}

.asg-slot__note { margin: .85rem 0 0; font-size: .9375rem; color: #475569; }

.asg-slot__meta {
	display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem;
	margin: 1rem 0 0; font-size: .875rem;
}
.asg-slot__meta dt { font-weight: 600; color: #475569; }
.asg-slot__meta dd { margin: 0; color: #334155; overflow-wrap: anywhere; }

.asg-slot__late {
	display: inline-block; margin-left: .4rem; padding: 1px 7px;
	border-radius: 999px; background: #fde2e1; color: #9b1c1c;
	font-size: .75rem; font-weight: 600;
}

.asg-slot__flag {
	margin: 0 0 1rem; padding: .6rem .85rem; font-size: .875rem;
	border-left: 3px solid #e0b64a; background: #fdf8ec; color: #6b5518;
}

/* --- Embeds --------------------------------------------------- */
.asg-embed {
	position: relative; border: 1px solid #dde3ea; border-radius: 6px;
	overflow: hidden; background: #f1f5f9; height: var(--asg-embed-height, 620px);
}
.asg-embed__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.asg-embed__placeholder {
	position: absolute; inset: 0; display: flex; gap: .6rem;
	align-items: center; justify-content: center;
	color: #64748b; font-size: .9375rem;
}
.asg-embed.is-loaded .asg-embed__placeholder { display: none; }
.asg-embed__spinner {
	width: 15px; height: 15px; border: 2px solid #cbd5e1;
	border-top-color: var(--asg-primary, #264164); border-radius: 50%;
	animation: asg-spin .7s linear infinite;
}
@keyframes asg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .asg-embed__spinner { animation: none; } }

/* --- Downloads ------------------------------------------------ */
.asg-download { margin: 1.25rem 0; }
.asg-download__link {
	display: inline-flex; align-items: center; gap: .55rem;
	padding: .7rem 1.1rem; border-radius: 4px; text-decoration: none;
	background: var(--asg-primary, #264164); color: #fff; font-weight: 500;
}
.asg-download__link:hover { background: var(--asg-primary-light, #38517B); }
.asg-download__link .asg-slot__icon { color: currentColor; opacity: 1; width: 18px; height: 18px; flex-basis: 18px; }

/* --- Table of contents ---------------------------------------- */
.asg-toc { font-size: .875rem; }
.asg-toc__title {
	margin: 0 0 .7rem; font-weight: 600; font-size: .75rem;
	letter-spacing: .08em; text-transform: uppercase; color: #64748b;
}
.asg-toc__list { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e2e8f0; }
.asg-toc__item a {
	display: block; padding: .3rem 0 .3rem .9rem; margin-left: -2px;
	border-left: 2px solid transparent; color: #475569; text-decoration: none; line-height: 1.4;
}
.asg-toc__item.is-level-3 a { padding-left: 1.7rem; font-size: .8125rem; }
.asg-toc__item a:hover { color: var(--asg-primary, #264164); }
.asg-toc__item a.is-current {
	color: var(--asg-primary, #264164); font-weight: 600;
	border-left-color: var(--asg-secondary-light, #92C062);
}

/* --- Gap report ----------------------------------------------- */
.asg-report__summary { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1.25rem; }
.asg-report__card {
	flex: 1 1 140px; padding: 1rem 1.1rem; border-radius: 6px;
	border: 1px solid #e2e8f0; background: #fff;
}
.asg-report__card.is-ready   { border-color: #bfe3c8; background: #f3faf5; }
.asg-report__card.is-draft   { border-color: #ecd9a8; background: #fdfaf2; }
.asg-report__card.is-missing { border-color: #f0c4c1; background: #fdf5f5; }
.asg-report__n { display: block; font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--asg-primary, #264164); }
.asg-report__l { display: block; margin-top: .2rem; font-size: .8125rem; color: #475569; }

.asg-report__bar { height: 8px; border-radius: 999px; background: #e9eef4; overflow: hidden; }
.asg-report__bar-fill { display: block; height: 100%; background: var(--asg-secondary-light, #92C062); }
.asg-report__caption { margin: .5rem 0 2rem; font-size: .875rem; color: #64748b; }

.asg-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.asg-table th, .asg-table td {
	text-align: left; vertical-align: top; padding: .7rem .8rem;
	border-bottom: 1px solid #e8edf3;
}
.asg-table thead th {
	font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
	color: #64748b; border-bottom: 2px solid #dde3ea; white-space: nowrap;
}
.asg-table tbody th { font-weight: 600; }
.asg-table tbody th.is-repeat { border-bottom-color: transparent; }
.asg-table__note { display: block; margin-top: .2rem; font-size: .8125rem; color: #64748b; }

.asg-pill {
	display: inline-block; padding: .15rem .6rem; border-radius: 999px;
	font-size: .8125rem; white-space: nowrap; background: #eef2f7; color: #334155;
}
.asg-pill.is-ready   { background: #dff3e3; color: #14532d; }
.asg-pill.is-draft   { background: #fdf0d5; color: #7a5a10; }
.asg-pill.is-missing { background: #fde2e1; color: #9b1c1c; }

@media (max-width: 720px) {
	.asg-table thead { position: absolute; left: -9999px; }
	.asg-table tr { display: block; padding: .8rem 0; border-bottom: 1px solid #e8edf3; }
	.asg-table th, .asg-table td { display: block; border: 0; padding: .15rem 0; }
	.asg-table tbody th.is-repeat { display: none; }
}

/* --- Home cards ----------------------------------------------- */
.asg-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 2rem 0; }
.asg-card {
	display: flex; flex-direction: column; gap: .55rem; padding: 1.5rem;
	border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
	text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
.asg-card:hover { border-color: var(--asg-secondary-light, #92C062); transform: translateY(-2px); }
.asg-card__title { font-size: 1.25rem; font-weight: 600; color: var(--asg-primary, #264164); }
.asg-card__desc { font-size: .9375rem; color: #475569; line-height: 1.55; flex: 1; }
.asg-card__cta { font-size: .875rem; font-weight: 600; color: var(--asg-secondary, #6C8255); }
.asg-card__cta::after { content: ' \2192'; }

/* --- Link out to the embed's source --------------------------- */
.asg-embed__source { margin: .6rem 0 0; font-size: .875rem; }
.asg-embed__source a { color: var(--asg-ink-soft, #475569); }
.asg-embed__source a::after { content: ' \2197'; }
.asg-embed__source a:hover { color: var(--asg-primary, #264164); }
