/* Bin Src plugin styles: the launcher, the apps grid, the licence box and ad slots.
   Theme-neutral: every colour is a variable, which the Bin Src child theme points at its own tokens. */
:root {
	--binsrc-ink: #18161a;
	--binsrc-text: #2f2d33;
	--binsrc-paper: #ffffff;
	--binsrc-surface: #f6f4f5;
	--binsrc-line: #e4e0e2;
	--binsrc-muted: #46424a;
	--binsrc-accent: #8c1d40;
	--binsrc-accent-hover: #5f1029;
	--binsrc-on-accent: #ffffff;
	--binsrc-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
	--binsrc-radius: 12px;
}

/* ---- launcher ------------------------------------------------------------------------ */
.binsrc-launcher { margin: 0 auto 2rem; max-width: calc(var(--binsrc-w, 1024) * 1px); }
.binsrc-launcher__stage {
	position: relative; aspect-ratio: var(--binsrc-w, 1024) / var(--binsrc-h, 808);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	background: var(--binsrc-surface); border: 1px solid var(--binsrc-line); border-radius: var(--binsrc-radius);
}
.binsrc-launcher.is-running .binsrc-launcher__stage { background: #101316; border-color: #101316; }
.binsrc-launcher__idle { padding: 24px; text-align: center; }
.binsrc-launcher__path {
	display: inline-block; margin: 0 0 20px; padding: 4px 10px; border-radius: 4px;
	background: var(--binsrc-ink); color: var(--binsrc-paper); font: 500 0.8125rem/1.3 var(--binsrc-mono); overflow-wrap: anywhere;
}
.binsrc-launcher__run {
	display: flex; align-items: center; justify-content: center; margin: 0 auto; min-height: 56px; padding: 0 32px;
	border: 2px solid var(--binsrc-accent); border-radius: 8px; background: var(--binsrc-accent); color: var(--binsrc-on-accent);
	font-family: inherit; font-size: 1.125rem; font-weight: 700; line-height: 1.2; cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.binsrc-launcher__run:hover { background: var(--binsrc-accent-hover); border-color: var(--binsrc-accent-hover); color: var(--binsrc-on-accent); }
.binsrc-launcher__note { margin: 18px auto 0; max-width: 42ch; font-size: 1rem; line-height: 1.5; color: var(--binsrc-muted); }
.binsrc-launcher__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.binsrc-launcher__alt { margin: 0.6em 0 0; font-size: 1rem; text-align: right; }
.binsrc-launcher--off { padding: 18px 20px; border: 1px dashed var(--binsrc-line); border-radius: var(--binsrc-radius); color: var(--binsrc-muted); }
.binsrc-launcher--off p { margin: 0; }
@media (max-width: 600px) { .binsrc-launcher__stage { aspect-ratio: 4 / 3; } }

/* ---- apps grid ----------------------------------------------------------------------- */
.binsrc-apps {
	list-style: none; margin: 0 0 2rem !important; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px;
}
.binsrc-card { margin: 0 !important; max-width: none !important; }
.binsrc-card__link {
	display: flex; flex-direction: column; gap: 12px; height: 100%; box-sizing: border-box; padding: 28px;
	background: var(--binsrc-paper); border: 1px solid var(--binsrc-line); border-radius: var(--binsrc-radius);
	color: var(--binsrc-text); text-decoration: none;
}
.binsrc-card__link:hover { border-color: var(--binsrc-ink); color: var(--binsrc-text); }
.binsrc-card__head { display: flex; align-items: center; gap: 12px; }
.binsrc-card__icon { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.binsrc-card__icon--letter {
	display: flex; align-items: center; justify-content: center;
	background: var(--binsrc-ink); color: var(--binsrc-paper); font: 700 1.25rem/1 var(--binsrc-mono); text-transform: lowercase;
}
.binsrc-card__path {
	display: inline-block; padding: 4px 8px; border-radius: 4px; background: var(--binsrc-surface); border: 1px solid var(--binsrc-line);
	color: var(--binsrc-ink); font: 500 0.8125rem/1.3 var(--binsrc-mono); overflow-wrap: anywhere;
}
.binsrc-card__title { font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: var(--binsrc-ink); }
.binsrc-card__text { line-height: 1.55; }
.binsrc-card__run { margin-top: auto; padding-top: 4px; font-weight: 700; color: var(--binsrc-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.binsrc-card__link:hover .binsrc-card__run { color: var(--binsrc-accent-hover); text-decoration-thickness: 3px; }
.binsrc-card__run::after { content: " \2192"; }

/* ---- licence ------------------------------------------------------------------------- */
.binsrc-license { margin: 2.5rem 0 0; border-top: 1px solid var(--binsrc-line); border-bottom: 1px solid var(--binsrc-line); }
.binsrc-license summary { min-height: 52px; display: list-item; padding: 13px 0; font-weight: 700; color: var(--binsrc-ink); cursor: pointer; }
.binsrc-license summary::marker { color: var(--binsrc-accent); }
.binsrc-license summary span { font-weight: 400; color: var(--binsrc-muted); }
.binsrc-license pre {
	max-height: 26rem; overflow: auto; margin: 0 0 1rem; padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere;
	background: var(--binsrc-surface); border: 1px solid var(--binsrc-line); border-radius: 8px;
	color: var(--binsrc-text); font: 0.875rem/1.55 var(--binsrc-mono);
}
.binsrc-license p { margin: 0 0 1rem; font-size: 1rem; }
.binsrc-license--missing { padding: 14px 0; color: var(--binsrc-muted); }

/* ---- ad slots ------------------------------------------------------------------------ */
/* Space is reserved before the ad loads so the page does not jump, and kept clear of the
   emulator and its buttons so clicks meant for a program cannot land on an ad. */
.binsrc-ad { clear: both; margin: 32px auto; max-width: 970px; text-align: center; }
.binsrc-ad__label { display: block; margin-bottom: 6px; font-size: 0.8125rem; line-height: 1.2; color: var(--binsrc-muted); }
.binsrc-ad ins.adsbygoogle { display: block; min-height: 90px; }
.binsrc-ad--header, .binsrc-ad--footer { padding: 0 16px; }
.binsrc-ad--header { margin: 16px auto; }
.binsrc-ad--app { margin-top: 56px; }
.binsrc-ad__placeholder {
	display: flex; align-items: center; justify-content: center; min-height: 90px; padding: 8px 12px;
	border: 1px dashed var(--binsrc-line); border-radius: 8px; font-size: 0.875rem; line-height: 1.4; color: var(--binsrc-muted);
}
@media (max-width: 600px) { .binsrc-ad ins.adsbygoogle, .binsrc-ad__placeholder { min-height: 100px; } }
@media print { .binsrc-ad { display: none; } }
