/**
 * Stylish Letter Generator — frontend stylesheet (v2.0.0 "Preview Stage").
 *
 * Three columns on desktop: the index on the left, the ledger of styles in
 * the middle, the phone stage on the right. The stage is what the redesign
 * is really about — a style is not a row of glyphs, it is what a name will
 * look like sitting in a WhatsApp header or an Instagram bio, so the tool
 * shows exactly that.
 *
 * Everything is scoped to `.slg` so no theme rule leaks in and nothing
 * leaks out. Colors, radius and width come from custom properties the
 * admin panel writes onto the element itself.
 */

/* ==================================================================
   Tokens
   ================================================================== */

.slg {
	--slg-accent: #e04a2f;
	--slg-accent-2: #b3341c;
	--slg-accent-soft: rgba(224, 74, 47, 0.08);
	--slg-accent-line: rgba(224, 74, 47, 0.28);

	--slg-ink: #14110f;
	--slg-ink-2: #4b4441;
	--slg-ink-3: #8d8681;
	--slg-line: #e4e1de;
	--slg-line-2: #efecea;
	--slg-rule: #14110f;
	--slg-paper: #ffffff;
	--slg-paper-2: #faf9f8;

	--slg-radius: 4px;
	--slg-max-width: 2400px;
	--slg-font-size: 30px;

	--slg-ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--slg-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--slg-row-pad: 18px;

	max-width: var(--slg-max-width);
	margin: 0 auto 40px;
	padding: 0 16px;
	box-sizing: border-box;
	font-family: var(--slg-ui);
	color: var(--slg-ink);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/*
 * Desktop and tablet: 90% of the screen, not 90% of whatever column the
 * theme happens to put the shortcode in. The negative margins break out
 * of that column the same way the phone rule at the bottom of this file
 * does, so the tool is measured against the viewport.
 *
 * --slg-half is half the used width, so the two margins always shift the
 * box by exactly half of itself and it stays centred whether the 90vw or
 * the admin's max-width is the smaller of the two. Writing it as one
 * value is the point: `width: 90vw` with a margin computed from a
 * different number is what makes a broken-out box sit off-centre.
 *
 * The admin's "Layout max width" still caps this if it is set below 90vw
 * — it defaults high enough (2400px) that on any ordinary screen the 90%
 * is what wins.
 *
 * Caveat, same as the phone rule: an ancestor with overflow:hidden clips
 * the break-out, and the tool stays inside its column instead.
 */
@media (min-width: 781px) {
	.slg[data-slg-app] {
		--slg-half: min(45vw, calc(var(--slg-max-width, 2400px) / 2));

		width: calc(var(--slg-half) * 2);
		max-width: none;
		margin-left: calc(50% - var(--slg-half));
		margin-right: calc(50% - var(--slg-half));
	}
}

.slg *,
.slg *::before,
.slg *::after {
	box-sizing: border-box;
}

.slg[data-density="compact"] {
	--slg-row-pad: 11px;
}

/* Shared utility: the small uppercase mono label used all over. */
.slg-eyebrow {
	font-family: var(--slg-mono);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--slg-ink-3);
	line-height: 1.2;
}

.slg-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Button reset. Wrapped in :where() so it carries the specificity of
 * `.slg` alone — otherwise `.slg button` (0,1,1) would outrank every
 * component class below it (0,1,0) and quietly strip the Copy button,
 * the preview eye and the tabs back to bare text.
 */
.slg :where(button) {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	cursor: pointer;
	text-align: inherit;
}

.slg button:focus-visible,
.slg input:focus-visible,
.slg a:focus-visible {
	outline: 2px solid var(--slg-accent);
	outline-offset: 2px;
}

/*
 * Two decorations themes like to add on button hover that nothing here
 * ever wants. Kept to these two properties on purpose: colour and
 * background belong to each component, and a blanket reset of those
 * would strip the hover states further down this file.
 */
.slg :where(button):hover,
.slg :where(button):focus {
	text-decoration: none;
	box-shadow: none;
}

/* ==================================================================
   Intro copy
   ================================================================== */

.slg-masthead {
	margin-bottom: 20px;
}

.slg-lede,
.slg-intro {
	max-width: 62ch;
	color: var(--slg-ink-2);
	margin: 0 0 22px;
}

.slg-lede p:last-child,
.slg-intro p:last-child {
	margin-bottom: 0;
}

.slg-display {
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.08;
	letter-spacing: -0.025em;
	font-weight: 600;
	margin: 0 0 12px;
}

.slg-display em {
	font-style: italic;
	color: var(--slg-accent);
}

/* ==================================================================
   Masthead bar — brand, the one big field, kind switch, favourites
   ================================================================== */

.slg-bar {
	display: grid;
	/* Brand, then the field. The kind switch and the favourites tally
	   moved into the index, which is where filtering lives. */
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	border: 1px solid var(--slg-line);
	border-bottom: 2px solid var(--slg-rule);
	background: var(--slg-paper);
	padding: 14px 16px;
}

.slg-brand {
	font-family: var(--slg-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.25;
	color: var(--slg-ink);
	max-width: 92px;
}

.slg-field {
	position: relative;
	display: flex;
	align-items: flex-start;
}

.slg-input {
	width: 100%;
	display: block;
	border: 2px solid var(--slg-rule);
	border-radius: 0;
	background: var(--slg-paper);
	padding: 12px 44px 12px 16px;
	font-family: inherit;
	font-size: clamp(20px, 2.4vw, 30px);
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--slg-ink);
	line-height: 1.25;
	min-width: 0;
	resize: none;
	overflow-y: auto;
	max-height: 40vh;
}

.slg-input::placeholder {
	color: #b8b2ae;
	font-weight: 400;
}

.slg-input:focus {
	outline: none;
	border-color: var(--slg-accent);
}

.slg-clear {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	font-size: 20px;
	line-height: 1;
	color: var(--slg-ink-3);
	border-radius: 50%;
}

.slg-clear:hover {
	color: var(--slg-ink);
	background: var(--slg-line-2);
}

/* Kind switch: All / Unicode / Real */
.slg-kinds {
	display: flex;
	border: 1px solid var(--slg-line);
	flex: none;
}

.slg-kind {
	display: flex;
	align-items: baseline;
	gap: 6px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--slg-ink-2);
	white-space: nowrap;
	border-right: 1px solid var(--slg-line);
	flex: none;
	transition: background 0.12s ease, color 0.12s ease;
}

.slg-kind:last-child {
	border-right: 0;
}

.slg-kind:hover {
	background: var(--slg-paper-2);
	color: var(--slg-ink);
}

.slg-kind.is-active {
	background: var(--slg-accent);
	color: #fff;
}

.slg-kind-n {
	font-family: var(--slg-mono);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	opacity: 0.85;
}

.slg-favbtn {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 14px;
	border: 1px solid var(--slg-line);
	font-size: 13px;
	color: var(--slg-ink-2);
	white-space: nowrap;
}

.slg-favbtn:hover {
	border-color: var(--slg-ink-3);
	color: var(--slg-ink);
}

.slg-favbtn.is-active {
	border-color: var(--slg-accent);
	color: var(--slg-accent);
	background: var(--slg-accent-soft);
}

.slg-favbtn .slg-heart {
	font-size: 14px;
	line-height: 1;
}

.slg-favbtn .slg-fav-count {
	font-family: var(--slg-mono);
	font-variant-numeric: tabular-nums;
}

/* Quick-try row under the bar. */
.slg-try {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 2px 0;
}

.slg-try-item {
	padding: 4px 10px;
	border: 1px solid var(--slg-line);
	font-size: 12.5px;
	color: var(--slg-ink-2);
	border-radius: var(--slg-radius);
}

.slg-try-item:hover {
	border-color: var(--slg-ink);
	color: var(--slg-ink);
}

.slg-counter {
	margin-left: auto;
	font-family: var(--slg-mono);
	font-size: 11px;
	color: var(--slg-ink-3);
	font-variant-numeric: tabular-nums;
}

.slg-counter.is-full {
	color: var(--slg-accent);
}

/* ==================================================================
   Three-column body
   ================================================================== */

.slg-body {
	display: grid;
	grid-template-columns: 208px minmax(0, 1fr) 328px;
	border: 1px solid var(--slg-line);
	border-top: 0;
	background: var(--slg-paper);
}

.slg-body.no-index {
	grid-template-columns: minmax(0, 1fr) 328px;
}

.slg-body.no-stage {
	grid-template-columns: 208px minmax(0, 1fr);
}

.slg-body.no-index.no-stage {
	grid-template-columns: minmax(0, 1fr);
}

/* ---- Index (left) ------------------------------------------------ */

.slg-index {
	border-right: 1px solid var(--slg-line);
	background: var(--slg-paper);
	min-width: 0;
}

/* The scroll rail and arrows belong to the phone-width chip strip only;
   in the sidebar layout the index is a plain vertical list, not a
   slider, so neither has anything to point at. */
.slg-index-rail,
.slg-index-arrow {
	display: none;
}

.slg-index-inner {
	position: sticky;
	top: 12px;
	padding: 16px 0 20px;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.slg-index-title {
	padding: 0 16px 10px;
}

.slg-idx-group + .slg-idx-group {
	margin-top: 2px;
}

.slg-idx-cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 8px 16px;
	text-align: left;
	font-size: 14px;
	font-weight: 500;
	color: var(--slg-ink);
	border-left: 3px solid transparent;
	transition: background 0.12s ease;
}

/*
 * Hover states must declare their own colour, not inherit whatever the
 * theme thinks a hovered button looks like.
 *
 * `button:hover` is (0,1,1) — a pseudo-class counts in the class column
 * — which outranks the (0,1,0) base rule this component sets its colour
 * in. So a theme styling `button:hover` wins every property this rule
 * leaves undeclared. Astra does exactly that: it was painting the label
 * white on a near-white background (unreadable) and colouring the 3px
 * left border with its own link blue. Declaring colour and border here
 * at (0,2,0) settles it.
 *
 * The background is also a step darker than it was. --slg-paper-2 is
 * #faf9f8 against #ffffff paper — a difference you cannot see, which
 * makes it feedback in name only.
 */
.slg-idx-cat:hover {
	background: var(--slg-line-2);
	color: var(--slg-ink);
	border-left-color: var(--slg-line);
}

.slg-idx-cat.is-active {
	background: var(--slg-accent-soft);
	border-left-color: var(--slg-accent);
}

.slg-idx-n {
	font-family: var(--slg-mono);
	font-size: 11.5px;
	color: var(--slg-ink-3);
	font-variant-numeric: tabular-nums;
}

.slg-idx-subs {
	list-style: none;
	margin: 2px 0 8px;
	padding: 0;
}

.slg-idx-subs[hidden] {
	display: none;
}

.slg-idx-sub {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 5px 16px 5px 30px;
	text-align: left;
	font-size: 13.5px;
	color: var(--slg-ink-2);
	border-left: 3px solid transparent;
}

.slg-idx-sub:hover {
	color: var(--slg-ink);
	background: var(--slg-paper-2);
}

.slg-idx-sub.is-active {
	color: var(--slg-accent);
	font-weight: 500;
}

.slg-index-note {
	margin: 14px 16px 0;
	padding-top: 14px;
	border-top: 1px solid var(--slg-line);
	font-size: 12px;
	line-height: 1.5;
	color: var(--slg-ink-3);
}

/* ---- Ledger (middle) --------------------------------------------- */

.slg-ledger {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.slg-fx {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 12px 16px;
	border-bottom: 1px solid var(--slg-line);
}

.slg-fx-label {
	margin-right: 2px;
}

.slg-fx-btn {
	padding: 6px 13px;
	white-space: nowrap;
	flex: none;
	border: 1px solid var(--slg-line);
	font-size: 13px;
	font-weight: 500;
	color: var(--slg-ink-2);
	border-radius: var(--slg-radius);
	transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.slg-fx-btn:hover {
	border-color: var(--slg-ink);
	color: var(--slg-ink);
}

.slg-fx-btn.is-active {
	background: var(--slg-accent);
	border-color: var(--slg-accent);
	color: #fff;
}

.slg-fx-sep {
	width: 1px;
	align-self: stretch;
	background: var(--slg-line);
	margin: 0 4px;
}

.slg-comparebtn {
	padding: 6px 13px;
	white-space: nowrap;
	flex: none;
	border: 1px solid var(--slg-line);
	font-size: 13px;
	color: var(--slg-ink-2);
	border-radius: var(--slg-radius);
}

.slg-comparebtn.is-active {
	border-color: var(--slg-accent);
	color: var(--slg-accent);
}

.slg-search {
	margin-left: auto;
	width: 170px;
	max-width: 100%;
	padding: 7px 12px;
	border: 1px solid var(--slg-line);
	border-radius: var(--slg-radius);
	font-family: inherit;
	font-size: 13px;
	color: var(--slg-ink);
	background: var(--slg-paper);
}

.slg-search::placeholder {
	color: var(--slg-ink-3);
}

.slg-search:focus {
	outline: none;
	border-color: var(--slg-ink);
}

.slg-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px 10px;
}

.slg-meta-label {
	font-family: var(--slg-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--slg-ink);
}

.slg-meta-count {
	font-family: var(--slg-mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--slg-ink-3);
	white-space: nowrap;
}

/* ---- Rows --------------------------------------------------------- */

.slg-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--slg-line);
}

.slg-row {
	position: relative;
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: var(--slg-row-pad) 16px;
	border-bottom: 1px solid var(--slg-line-2);
	border-left: 3px solid transparent;
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease;
}

.slg-row:hover {
	background: var(--slg-paper-2);
}

.slg-row.is-selected {
	background: var(--slg-accent-soft);
	border-left-color: var(--slg-accent);
}

.slg-row.is-copied {
	background: var(--slg-accent-soft);
}

.slg[data-numbers="0"] .slg-row {
	grid-template-columns: 0 minmax(0, 1fr) auto;
	gap: 0 12px;
}

.slg-row-n {
	font-family: var(--slg-mono);
	font-size: 11px;
	color: #b9b3ae;
	font-variant-numeric: tabular-nums;
	user-select: none;
}

.slg-row.is-selected .slg-row-n {
	color: var(--slg-accent);
}

.slg-row-sample {
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.slg-row-sample::-webkit-scrollbar {
	display: none;
}

.slg-preview {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 26px;
	line-height: 1.5;
	letter-spacing: 0.01em;
	color: var(--slg-ink);
	padding: 2px 0;
}

.slg-preview--font {
	font-size: var(--slg-font-size);
	line-height: 1.45;
}

/* Right-hand tail: the note swaps for the action set on hover. */
.slg-row-tail {
	display: flex;
	align-items: center;
	gap: 4px;
	justify-content: flex-end;
}

.slg-row-note {
	font-family: var(--slg-mono);
	font-size: 10px;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--slg-ink-3);
	white-space: nowrap;
}

.slg-row-note--real {
	color: var(--slg-accent);
}

.slg-row.is-selected .slg-row-note {
	color: var(--slg-accent);
}

.slg-row-acts {
	display: none;
	align-items: center;
	gap: 4px;
}

.slg-row:hover .slg-row-acts,
.slg-row:focus-within .slg-row-acts,
.slg-row.is-selected .slg-row-acts {
	display: flex;
}

.slg-row:hover .slg-row-note,
.slg-row:focus-within .slg-row-note,
.slg-row.is-selected .slg-row-note {
	display: none;
}

/* The preview eye never hides — it is the primary invitation. */
.slg-eye {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--slg-line);
	border-radius: var(--slg-radius);
	color: var(--slg-ink-2);
	flex: none;
	transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.slg-eye svg {
	width: 17px;
	height: 17px;
	display: block;
}

.slg-eye:hover {
	border-color: var(--slg-accent);
	color: var(--slg-accent);
}

.slg-row.is-selected .slg-eye {
	background: var(--slg-accent);
	border-color: var(--slg-accent);
	color: #fff;
}

.slg-act {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: var(--slg-radius);
	color: var(--slg-ink-3);
	flex: none;
}

/*
 * The phone-width Copy: same footprint as the heart beside it, but
 * carrying the accent, because it is the row's primary action and the
 * heart is not.
 */
.slg-act--copy {
	color: var(--slg-accent);
	border: 1px solid var(--slg-accent-line);
	background: var(--slg-accent-soft);
}

.slg-act--copy.is-copied {
	color: #fff;
	border-color: #1c8a4c;
	background: #1c8a4c;
}

.slg-act svg {
	width: 16px;
	height: 16px;
	display: block;
}

.slg-act:hover {
	color: var(--slg-ink);
	background: var(--slg-line-2);
}

.slg-act.is-active {
	color: var(--slg-accent);
}

.slg-act--fav.is-active {
	color: var(--slg-accent);
}

.slg-copy {
	padding: 7px 14px;
	font-family: var(--slg-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: var(--slg-accent);
	color: #fff;
	border-radius: var(--slg-radius);
	white-space: nowrap;
	transition: background 0.12s ease;
}

/* Colour restated for the same reason as .slg-idx-cat:hover — without
   it a theme's button:hover can repaint the label on an accent fill. */
.slg-copy:hover {
	background: var(--slg-accent-2);
	color: #fff;
}

.slg-copy.is-copied {
	background: #1c8a4c;
}

/* Button style variants from the admin panel. */
.slg[data-buttons="outline"] .slg-copy {
	background: transparent;
	color: var(--slg-accent);
	box-shadow: inset 0 0 0 1px var(--slg-accent);
}

.slg[data-buttons="soft"] .slg-copy {
	background: var(--slg-accent-soft);
	color: var(--slg-accent);
}

.slg[data-buttons="text"] .slg-copy {
	background: transparent;
	color: var(--slg-accent);
	padding-left: 6px;
	padding-right: 6px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.slg-empty {
	margin: 0;
	padding: 34px 16px;
	text-align: center;
	color: var(--slg-ink-3);
	font-size: 14px;
}

.slg-more-wrap {
	padding: 16px;
	border-top: 1px solid var(--slg-line);
	margin-top: auto;
}

.slg-more {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--slg-line);
	font-size: 13.5px;
	font-weight: 500;
	color: var(--slg-ink);
	border-radius: var(--slg-radius);
}

.slg-more:hover {
	border-color: var(--slg-ink);
	background: var(--slg-paper-2);
}

/* ---- Compare tray ------------------------------------------------- */

.slg-compare {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-top: 2px solid var(--slg-rule);
	background: var(--slg-paper-2);
}

.slg-compare[hidden] {
	display: none;
}

.slg-compare-cell {
	padding: 14px 16px 16px;
	border-right: 1px solid var(--slg-line);
	min-width: 0;
}

.slg-compare-cell:last-child {
	border-right: 0;
}

.slg-compare-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.slg-compare-drop {
	font-size: 15px;
	line-height: 1;
	color: var(--slg-ink-3);
	padding: 2px 5px;
}

.slg-compare-drop:hover {
	color: var(--slg-accent);
}

.slg-compare-sample {
	overflow-x: auto;
	scrollbar-width: none;
	font-size: 28px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-word;
}

.slg-compare-sample::-webkit-scrollbar {
	display: none;
}

.slg-compare-text {
	display: block;
	color: var(--slg-ink);
}

.slg-compare-empty {
	color: #c4bfbb;
	font-size: 14px;
	font-style: italic;
}

/* ==================================================================
   Stage — the phone preview
   ================================================================== */

.slg-stage {
	border-left: 1px solid var(--slg-line);
	background: var(--slg-paper-2);
	min-width: 0;
}

.slg-stage-inner {
	position: sticky;
	top: 12px;
	padding: 16px 18px 20px;
}

.slg-stage-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.slg-stage-head-text {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.slg-stage-style {
	font-size: 13px;
	font-weight: 500;
	color: var(--slg-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* Only shown once JS turns the stage into a mobile sheet (see the
   is-stage-overlay rules below); hidden on desktop and in the no-JS
   fallback, where the stage sits in the flow and needs no close button. */
.slg-stage-close {
	display: none;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--slg-line);
	border-radius: 50%;
	background: var(--slg-paper);
	color: var(--slg-ink-2);
	font-size: 18px;
	line-height: 1;
}

.slg-stage-close:hover {
	border-color: var(--slg-ink-3);
	color: var(--slg-ink);
}

/* Network tabs */
/*
 * Four columns, not three. Kill Feed was added as a fourth tab without
 * this track count following it, so it wrapped onto a second row and the
 * strip stopped reading as one set of tabs. minmax(0, 1fr) rather than
 * 1fr because a grid track's default minimum is its content, which would
 * let "WhatsApp" push the strip wider than the stage column.
 */
.slg-nets {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border: 1px solid var(--slg-line);
	background: var(--slg-paper);
	margin-bottom: 14px;
}

.slg-net {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 9px 3px;
	/* Four labels share the width three used to, so the type comes down
	   with it — far enough for "WhatsApp" to sit on one line in the
	   narrowest stage column, no further. */
	font-size: 11.5px;
	font-weight: 500;
	white-space: nowrap;
	min-width: 0;
	color: var(--slg-ink-2);
	border-right: 1px solid var(--slg-line);
	transition: background 0.12s ease, color 0.12s ease;
}

.slg-net svg {
	width: 14px;
	height: 14px;
	display: block;
	flex: none;
}

.slg-net:last-child {
	border-right: 0;
}

.slg-net svg {
	width: 15px;
	height: 15px;
	display: block;
	flex: none;
}

.slg-net:hover {
	background: var(--slg-paper-2);
	color: var(--slg-ink);
}

.slg-net.is-active {
	background: var(--slg-ink);
	color: #fff;
}

/* ---- Ads ---------------------------------------------------------------- */

/*
 * The ad is no longer boxed. It used to sit in an inset panel with a
 * border, side margins and a label above it, and on a phone that chrome
 * was eating the width the unit needed: a responsive AdSense unit
 * measures the box it is in at fill time, and after 12px of margin, 1px
 * of border and 10px of padding on each side there was often too little
 * left for it to return anything. Now the wrapper carries no width of
 * its own — the unit gets the full row width and fills at the size the
 * screen can actually show.
 *
 * The rows above and below are still tappable copy buttons, so the
 * separation that the panel used to provide is done with vertical space
 * and a hairline instead. That keeps an accidental tap unlikely without
 * taking a single pixel of horizontal room from the unit.
 */
.slg-ad {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 14px 0;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--slg-line-2);
	border-radius: 0;
	text-align: center;
	overflow: visible;
}

/* The "Advertisement" line is not printed any more. The rule stays so an
   older cached script, or a pasted unit that ships its own label, cannot
   put one back. */
.slg-ad-label {
	display: none !important;
}

/*
 * Full width, and free to grow. A fixed max-width or overflow:hidden
 * here is what leaves a blank gap on a phone when the unit comes back
 * taller or wider than the reserved box, so neither is set. min-height
 * only holds the space open until the fill lands, which stops the list
 * jumping under a thumb mid-scroll.
 */
.slg-ad-slot {
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 100px;
	overflow: visible;
}

/* Google writes inline styles onto the ins element, so these have to
   win: without them a unit can be left at its 0px starting width and
   never draw anything. */
.slg-ad-slot ins.adsbygoogle {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 auto;
}

.slg-ad-slot iframe,
.slg-ad-slot img {
	max-width: 100%;
	margin: 0 auto;
}

/* Once a unit has drawn, the reserved height is no longer doing anything
   useful and would only pad a short ad. Set by the script on fill. */
.slg-ad.is-filled .slg-ad-slot {
	min-height: 0;
}

/* ---- Image screen (real typefaces) ------------------------------------- */

/*
 * A real font is a picture, not text you can paste, so the stage drops the
 * tabs and shows one screen. Forced from CSS rather than by changing the
 * selected network in script: the visitor's chosen tab survives, and it is
 * still there when they pick a Unicode style again.
 */
.slg-stage.is-image .slg-nets {
	display: none;
}

.slg-stage.is-image .slg-view {
	display: none;
}

.slg-stage.is-image .slg-img {
	display: flex;
	flex-direction: column;
}

.slg-img {
	background: #ece5dd;
}

/* The photo bubble: padding tightens because the image is the content. */
.slg-bub--photo {
	padding: 4px 4px 16px;
	max-width: 74%;
}

.slg-img-card {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 96px;
	padding: 14px 10px;
	border-radius: 5px;
	background: linear-gradient(155deg, #fdfbf9 0%, #f1ece7 100%);
	border: 1px solid rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.slg-img-name {
	font-size: 26px;
	line-height: 1.3;
	text-align: center;
	color: #14110f;
	overflow-wrap: anywhere;
}

.slg-img-cap {
	display: block;
	padding: 5px 5px 0;
	font-family: var(--slg-mono);
	font-size: 9px;
	letter-spacing: 0.08em;
	color: #6b7d6b;
}

/* Device */
.slg-phone {
	width: 100%;
	max-width: 290px;
	margin: 0 auto;
	background: #14110f;
	border-radius: 30px;
	padding: 9px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.slg-phone-screen {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	background: #fff;
	height: 470px;
	display: flex;
	flex-direction: column;
	font-size: 12px;
	line-height: 1.4;
	color: #14110f;
}

.slg-notch {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 88px;
	height: 17px;
	background: #14110f;
	border-radius: 0 0 11px 11px;
	z-index: 6;
}

.slg-status {
	position: relative;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 14px 3px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.01em;
	flex: none;
}

.slg-status-icons {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 9px;
}

.slg-sig {
	display: flex;
	align-items: flex-end;
	gap: 1px;
	height: 8px;
}

.slg-sig i {
	display: block;
	width: 2px;
	background: currentColor;
	border-radius: 1px;
}

.slg-sig i:nth-child(1) { height: 3px; }
.slg-sig i:nth-child(2) { height: 5px; }
.slg-sig i:nth-child(3) { height: 6.5px; }
.slg-sig i:nth-child(4) { height: 8px; }

.slg-batt {
	width: 16px;
	height: 8px;
	border: 1px solid currentColor;
	border-radius: 2px;
	position: relative;
	padding: 1px;
}

.slg-batt::after {
	content: "";
	position: absolute;
	right: -3px;
	top: 2px;
	width: 1.5px;
	height: 3px;
	background: currentColor;
	border-radius: 0 1px 1px 0;
}

.slg-batt i {
	display: block;
	height: 100%;
	width: 72%;
	background: currentColor;
	border-radius: 1px;
}

/* Views */
.slg-view {
	flex: 1;
	min-height: 0;
	display: none;
	flex-direction: column;
}

.slg-view.is-active {
	display: flex;
}

/* Styled text inside the phone — the whole point of the stage. */
.slg-styled {
	display: inline-block;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* ---- WhatsApp ---- */

.slg-wa {
	background: #ece5dd;
}

.slg-wa .slg-status {
	background: #075e54;
	color: #fff;
}

.slg-wa-top {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px 9px;
	background: #075e54;
	color: #fff;
	flex: none;
}

.slg-back {
	font-size: 15px;
	line-height: 1;
	opacity: 0.9;
	flex: none;
}

.slg-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #b6ada4;
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 600;
	flex: none;
	overflow: hidden;
}

.slg-wa-who {
	min-width: 0;
	flex: 1;
}

.slg-wa-name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.slg-wa-status {
	display: block;
	font-size: 9.5px;
	opacity: 0.8;
}

.slg-wa-icons {
	display: flex;
	gap: 10px;
	font-size: 11px;
	opacity: 0.9;
	flex: none;
}

.slg-wa-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
	background-color: #ece5dd;
	background-image:
		radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px),
		radial-gradient(circle at 70% 65%, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px);
	background-size: 46px 46px, 66px 66px;
}

.slg-day {
	align-self: center;
	background: #dcecf3;
	color: #4a6572;
	font-size: 9px;
	padding: 3px 9px;
	border-radius: 6px;
	flex: none;
}

.slg-bub {
	max-width: 82%;
	padding: 6px 9px 14px;
	border-radius: 8px;
	position: relative;
	font-size: 12px;
	line-height: 1.45;
	box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
	flex: none;
}

.slg-bub--in {
	align-self: flex-start;
	background: #fff;
	border-top-left-radius: 2px;
}

.slg-bub--out {
	align-self: flex-end;
	background: #dcf8c6;
	border-top-right-radius: 2px;
}

.slg-bub-time {
	position: absolute;
	right: 8px;
	bottom: 4px;
	font-size: 8.5px;
	color: #7b8a8d;
	display: flex;
	align-items: center;
	gap: 3px;
}

.slg-tick {
	color: #34b7f1;
	font-size: 9px;
	letter-spacing: -2px;
}

.slg-wa-foot {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 9px 9px;
	background: #ece5dd;
	flex: none;
}

.slg-wa-entry {
	flex: 1;
	background: #fff;
	border-radius: 16px;
	padding: 6px 11px;
	font-size: 11px;
	color: #9aa0a3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.slg-wa-send {
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: #128c7e;
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 11px;
	flex: none;
}

/* ---- Stage footer ------------------------------------------------- */

.slg-stage-note {
	margin: 12px 0 0;
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--slg-ink-3);
	text-align: center;
	min-height: 34px;
}

/* The Kill Feed verdict. Sits above the general note because it is the
   specific finding — how this style behaves at feed width — while the
   note below it stays the general truth about the screen. Colour is a
   second signal only; the sentence itself always says what happened. */
.slg-kf-audit {
	margin: 12px 0 0;
	padding: 8px 10px;
	font-size: 11.5px;
	line-height: 1.5;
	text-align: center;
	border-radius: var(--slg-radius);
	border: 1px solid var(--slg-line);
	color: var(--slg-ink-2, var(--slg-ink));
}

.slg-kf-audit.is-ok { border-color: rgba(28, 138, 76, 0.4); background: rgba(28, 138, 76, 0.07); }
.slg-kf-audit.is-warn { border-color: rgba(217, 145, 32, 0.45); background: rgba(217, 145, 32, 0.08); }
.slg-kf-audit.is-bad { border-color: rgba(198, 47, 24, 0.45); background: rgba(198, 47, 24, 0.07); }

.slg-stage-acts {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.slg-stage-btn {
	flex: 1;
	padding: 11px 10px;
	font-family: var(--slg-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: var(--slg-radius);
	border: 1px solid var(--slg-line);
	color: var(--slg-ink);
	background: var(--slg-paper);
	white-space: nowrap;
}

.slg-stage-btn:hover {
	border-color: var(--slg-ink);
}

.slg-stage-btn--primary {
	background: var(--slg-accent);
	border-color: var(--slg-accent);
	color: #fff;
}

.slg-stage-btn--primary:hover {
	background: var(--slg-accent-2);
	border-color: var(--slg-accent-2);
}

/* Only rendered on the Kill Feed. [hidden] needs saying because the
   button is a flex child with an explicit display above. */
.slg-stage-btn--kf[hidden] { display: none; }

.slg-stage-btn--kf {
	border-color: rgba(255, 194, 71, 0.55);
	background: rgba(255, 194, 71, 0.12);
}

.slg-stage-btn--kf:hover { border-color: #ffc247; }

.slg-stage-btn.is-copied {
	background: #1c8a4c;
	border-color: #1c8a4c;
	color: #fff;
}

/* ==================================================================
   Mobile stage sheet — closed by default below 780px (phones only;
   tablets keep the in-flow layout above), opened by a row's preview
   icon or the dock's Preview button. Progressive enhancement: this
   only takes effect once JS adds is-stage-overlay to the root, so
   without JS (or at 780px+) the stage prints normally.
   ================================================================== */

@media (max-width: 780px) {
	.slg.is-stage-overlay .slg-stage {
		position: fixed;
		inset: 0;
		z-index: 1000;
		grid-column: auto;
		max-height: none;
		border: 0;
		background: var(--slg-paper);
		transform: translateY(100%);
		transition: transform 0.28s ease;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.slg.is-stage-overlay .slg-stage.is-open {
		transform: translateY(0);
	}

	.slg.is-stage-overlay .slg-stage-inner {
		position: static;
		min-height: 100%;
		padding-top: max(20px, env(safe-area-inset-top));
		padding-bottom: max(20px, env(safe-area-inset-bottom));
	}

	.slg.is-stage-overlay .slg-stage-close {
		display: inline-flex;
	}
}

.slg-stage-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(20, 17, 15, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
}

.slg-stage-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* Locks background scroll while the sheet is open. Scoped by name
   rather than to .slg since the sheet covers the whole viewport. */
body.slg-no-scroll {
	overflow: hidden;
}

/* ==================================================================
   Mobile dock — prompts Preview while the stage sheet is closed
   ================================================================== */

.slg-dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	display: none;
	align-items: center;
	gap: 10px;
	padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.97);
	border-top: 2px solid var(--slg-rule);
	backdrop-filter: blur(6px);
}

.slg-dock.is-visible {
	display: flex;
}

.slg-dock-text {
	flex: 1;
	min-width: 0;
}

.slg-dock-label {
	display: block;
	margin-bottom: 1px;
}

.slg-dock-sample {
	display: block;
	font-size: 17px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.slg-dock-btn {
	flex: none;
	padding: 9px 16px;
	background: var(--slg-accent);
	color: #fff;
	font-family: var(--slg-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: var(--slg-radius);
}

/* ==================================================================
   Toast
   ================================================================== */

.slg-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translate(-50%, 14px);
	z-index: 60;
	max-width: min(420px, calc(100vw - 32px));
	padding: 11px 18px;
	background: var(--slg-ink);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	border-radius: var(--slg-radius);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.slg-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ==================================================================
   Share sheet
   ================================================================== */

.slg-sharemenu {
	position: fixed;
	inset: 0;
	z-index: 70;
	background: rgba(20, 17, 15, 0.42);
	display: grid;
	place-items: center;
	padding: 20px;
}

.slg-sharemenu[hidden] {
	display: none;
}

.slg-sharemenu-panel {
	width: min(400px, 100%);
	background: var(--slg-paper);
	border-radius: var(--slg-radius);
	padding: 18px;
}

.slg-sharemenu-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.slg-sharemenu-title {
	font-family: var(--slg-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.slg-sharemenu-close {
	font-size: 22px;
	line-height: 1;
	color: var(--slg-ink-3);
}

.slg-sharemenu-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 8px;
}

.slg-sharemenu-btn {
	display: block;
	padding: 10px;
	text-align: center;
	border: 1px solid var(--slg-line);
	border-radius: var(--slg-radius);
	font-size: 13px;
	color: var(--slg-ink);
	text-decoration: none;
}

.slg-sharemenu-btn:hover {
	border-color: var(--slg-ink);
}

/* ==================================================================
   Supporting content (How-to, FAQ, related, outro)
   ================================================================== */

.slg-howto,
.slg-faq,
.slg-related,
.slg-outro {
	margin-top: 32px;
}

.slg-section-title {
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 0 0 14px;
}

.slg-steps {
	margin: 0;
	padding-left: 20px;
	color: var(--slg-ink-2);
}

.slg-steps li {
	margin-bottom: 7px;
}

.slg-faq-item {
	border-bottom: 1px solid var(--slg-line);
	padding: 12px 0;
}

.slg-faq-item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.slg-faq-item summary::-webkit-details-marker {
	display: none;
}

.slg-faq-item summary::after {
	content: "+";
	font-family: var(--slg-mono);
	font-size: 16px;
	color: var(--slg-ink-3);
	flex: none;
}

.slg-faq-item[open] summary::after {
	content: "\2212";
}

.slg-faq-q {
	margin: 0;
	font-size: 15.5px;
	font-weight: 500;
}

.slg-faq-a {
	color: var(--slg-ink-2);
	padding-top: 8px;
}

.slg-related-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.slg-related-list a {
	display: block;
	padding: 6px 12px;
	border: 1px solid var(--slg-line);
	border-radius: var(--slg-radius);
	font-size: 13.5px;
	color: var(--slg-ink);
	text-decoration: none;
}

.slg-related-list a:hover {
	border-color: var(--slg-ink);
}

.slg-outro {
	color: var(--slg-ink-2);
}

.slg-noscript {
	padding: 20px 16px;
	color: var(--slg-ink-2);
}

/* ==================================================================
   Responsive
   ================================================================== */

/* Tablet and below: the stage drops beneath the ledger, full width. */
@media (max-width: 1100px) {
	.slg-body,
	.slg-body.no-index,
	.slg-body.no-stage,
	.slg-body.no-index.no-stage {
		grid-template-columns: 200px minmax(0, 1fr);
	}

	.slg-stage {
		grid-column: 1 / -1;
		border-left: 0;
		border-top: 2px solid var(--slg-rule);
	}

	.slg-stage-inner {
		position: static;
		max-height: none;
		display: grid;
		grid-template-columns: 290px minmax(0, 1fr);
		gap: 4px 22px;
		align-content: start;
		align-items: start;
		padding: 20px;
	}

	.slg-stage-head,
	.slg-nets,
	.slg-stage-note,
	.slg-stage-acts {
		grid-column: 2;
	}

	.slg-phone {
		grid-row: 1 / span 5;
		grid-column: 1;
		margin: 0;
	}

	.slg-stage-note {
		text-align: left;
	}
}

/* Phones: everything becomes a single stacked column of strips. */
@media (max-width: 780px) {
	/*
	 * Edge to edge. A 1,280-style ledger and a chip strip both want every
	 * pixel a phone has, and the theme's own column padding was costing
	 * roughly a chip's width on each side. The negative margins break out
	 * of whatever centred container the theme puts around the shortcode.
	 *
	 * Caveat worth knowing: an ancestor with overflow:hidden clips this,
	 * in which case the tool simply stays inside its column as before —
	 * it degrades to the old layout rather than breaking.
	 *
	 * [data-slg-app] is kept on the selector as belt and braces. The
	 * failsafe skeleton also sets max-width and margin on a plain .slg;
	 * it now prints above this file so plain .slg would win here anyway,
	 * but the attribute costs nothing and keeps the rule safe from a
	 * theme reaching in at the same specificity.
	 */
	.slg[data-slg-app] {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 0;
	}

	/* At full bleed the side borders sit on the screen edge, where they
	   read as a stray hairline rather than as an enclosure. */
	.slg-bar,
	.slg-body {
		border-left: 0;
		border-right: 0;
	}

	.slg-masthead,
	.slg-intro,
	.slg-outro,
	.slg-howto,
	.slg-faq,
	.slg-related {
		padding-left: 12px;
		padding-right: 12px;
	}

	.slg-bar {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		padding: 10px 8px;
	}

	.slg-brand {
		display: none;
	}

	/*
	 * The field is the first thing touched and the thing every result
	 * depends on, so on a phone it gets the width the screen has: the
	 * bar's side padding drops to 8px and the field spans it. Rounded,
	 * because at full bleed a square 2px box running the width of the
	 * screen reads as a hard band across the page rather than as
	 * something to type in.
	 */
	.slg-field {
		width: 100%;
	}

	.slg-input {
		width: 100%;
		font-size: 22px;
		padding: 13px 44px 13px 14px;
		border-radius: 12px;
	}

	.slg-kinds {
		border: 0;
		border-bottom: 1px solid var(--slg-line);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.slg-kinds::-webkit-scrollbar {
		display: none;
	}

	.slg-kind {
		border-right: 0;
		border-bottom: 2px solid transparent;
		padding: 7px 12px 8px;
	}

	.slg-kind.is-active {
		background: transparent;
		color: var(--slg-accent);
		border-bottom-color: var(--slg-accent);
	}

	.slg-favbtn {
		position: absolute;
		top: 12px;
		right: 12px;
		border: 0;
		padding: 4px 6px;
	}

	.slg-bar {
		position: relative;
	}

	.slg-body,
	.slg-body.no-index,
	.slg-body.no-stage,
	.slg-body.no-index.no-stage {
		grid-template-columns: minmax(0, 1fr);
	}

	/* The index becomes a horizontal strip of chips. */
	.slg-index {
		position: relative;
		border-right: 0;
		border-bottom: 1px solid var(--slg-line);
		overflow: hidden;
	}

	.slg-index-inner {
		position: static;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		padding: 10px 12px;
		display: flex;
		align-items: center;
		gap: 8px;
		scrollbar-width: none;
		/*
		 * Snap, so a swipe parks on a chip instead of halfway through
		 * one. Proximity rather than mandatory: a short flick to peek at
		 * what is next should not be yanked back.
		 */
		scroll-snap-type: x proximity;
		scroll-padding-left: 12px;
		-webkit-overflow-scrolling: touch;
	}

	/*
	 * Fade the ends instead of letting the container border slice a chip
	 * in half. A chip cut by a hard edge reads as something overflowing
	 * its box; a chip dissolving into the paper reads as a row that keeps
	 * going — which is the thing that was actually true all along and was
	 * never being said. The classes come from setupIndexSlider(): the
	 * fade only appears on the side there is more to scroll towards.
	 */
	.slg-index.is-slider .slg-index-inner {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 30px), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 30px), transparent 100%);
	}

	.slg-index.is-slider.at-start .slg-index-inner {
		-webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
		mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
	}

	.slg-index.is-slider.at-end .slg-index-inner {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 100%);
	}

	.slg-index.is-slider.at-start.at-end .slg-index-inner {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.slg-index.is-slider .slg-index-inner::after {
		content: "";
		flex: none;
		width: 2px;
	}

	/*
	 * The rail. A thumb whose width is the visible share of the strip and
	 * whose position tracks the scroll — the one element on screen that
	 * moves when the row moves, which is what makes the row legible as a
	 * slider on a device that draws no scrollbar of its own.
	 */
	.slg-index.is-slider .slg-index-rail {
		display: block;
		position: relative;
		height: 3px;
		margin: 0 12px 9px;
		border-radius: 999px;
		background: var(--slg-line);
		overflow: hidden;
	}

	.slg-index-thumb {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
		width: 30%;
		border-radius: inherit;
		background: var(--slg-accent);
		transition: transform 0.12s linear;
	}

	/*
	 * Arrows, sitting on top of the fade at each end so they read as part
	 * of the same edge rather than as two more chips competing with the
	 * categories. They are unhidden by setupIndexSlider() only when the
	 * strip overflows, and each one goes away at its own end.
	 */
	.slg-index.is-slider .slg-index-arrow {
		display: flex;
		position: absolute;
		top: 10px;
		z-index: 2;
		align-items: center;
		justify-content: center;
		width: 28px;
		height: 30px;
		padding: 0;
		font-size: 19px;
		line-height: 1;
		color: var(--slg-ink-2);
		background: var(--slg-paper);
		border: 1px solid var(--slg-line);
		border-radius: var(--slg-radius);
		box-shadow: 0 0 10px 6px var(--slg-paper);
		cursor: pointer;
	}

	.slg-index.is-slider .slg-index-arrow[hidden] {
		display: none;
	}

	.slg-index-arrow--prev { left: 4px; }
	.slg-index-arrow--next { right: 4px; }

	.slg-index-arrow:active {
		background: var(--slg-paper-2);
		border-color: var(--slg-ink-3);
	}

	/* The arrows overlap the first and last chip, so the strip needs to
	   be able to scroll clear of them at both ends. */
	.slg-index.is-slider .slg-index-inner {
		padding-left: 36px;
		padding-right: 40px;
		scroll-padding-left: 36px;
	}

	.slg-index-inner::-webkit-scrollbar {
		display: none;
	}

	.slg-index-title,
	.slg-index-note {
		display: none;
	}

	.slg-idx-group {
		display: contents;
	}

	.slg-idx-cat {
		width: auto;
		flex: none;
		padding: 6px 12px;
		border: 1px solid var(--slg-line);
		border-left-width: 1px;
		border-radius: var(--slg-radius);
		font-size: 12.5px;
		scroll-snap-align: start;
	}

	.slg-idx-cat.is-active {
		background: var(--slg-ink);
		border-color: var(--slg-ink);
		color: #fff;
	}

	.slg-idx-cat.is-active .slg-idx-n {
		color: rgba(255, 255, 255, 0.72);
	}

	.slg-idx-subs {
		display: flex;
		gap: 8px;
		margin: 0;
		flex: none;
	}

	.slg-idx-subs[hidden] {
		display: none;
	}

	.slg-idx-sub {
		width: auto;
		flex: none;
		padding: 6px 11px;
		border: 1px solid var(--slg-line);
		border-left-width: 1px;
		border-radius: var(--slg-radius);
		font-size: 12.5px;
		white-space: nowrap;
		scroll-snap-align: start;
	}

	.slg-idx-sub.is-active {
		border-color: var(--slg-accent);
		background: var(--slg-accent-soft);
	}

	.slg-fx {
		overflow-x: auto;
		flex-wrap: nowrap;
		scrollbar-width: none;
		padding: 10px 12px;
	}

	.slg-fx::-webkit-scrollbar {
		display: none;
	}

	/*
	 * Search, Compare and Stars are no longer rendered at any width (see
	 * SLG_Shortcode::render and the effects row in the template), so the
	 * phone-width hide rules that used to live here are gone with them.
	 * The effects row is now Spacing and Aa, which fits one line.
	 */

	.slg-row {
		padding: 13px 12px;
		grid-template-columns: 26px minmax(0, 1fr) auto;
		gap: 9px;
	}

	/*
	 * Edge to edge on a phone. The tool already breaks out to 100vw at
	 * this width, so anything the ad keeps for itself here is width the
	 * unit does not get — and on a 360px screen that is the difference
	 * between a unit that fills and one that returns nothing. No side
	 * padding, no side margin, no border on the sides.
	 */
	.slg-ad {
		padding: 12px 0;
		margin: 0;
	}

	/* A phone banner is 50–100px tall; reserving more than that leaves a
	   visible hole above the next row while the fill is in flight. */
	.slg-ad-slot {
		min-height: 100px;
	}

	.slg-preview {
		font-size: 22px;
	}

	.slg-preview--font {
		font-size: calc(var(--slg-font-size) * 0.82);
	}

	/*
	 * No hover on touch, so the action set is always out — and the note
	 * stays out with it. Here the note is not a footnote: with the Copy
	 * button gone it is the only thing saying the row can be tapped, and
	 * the script writes "Tap to copy" into it at this width.
	 *
	 * The row is a grid of 34px / minmax(0, 1fr) / auto, and every word in
	 * that auto track is width taken from the sample in the middle one —
	 * an auto track claims its content before the flexible track gets
	 * anything. The sample is what the visitor came to look at, so no
	 * wording sits beside it here at all. The script builds Copy as an
	 * icon at this width instead (see the row builder), and the row
	 * itself still copies on tap.
	 */
	.slg-row-note {
		display: none;
	}

	.slg-row-acts {
		display: flex;
	}

	.slg-row .slg-copy--png {
		padding: 6px 10px;
		font-size: 10px;
	}

	.slg-act--share,
	.slg-act--compare {
		display: none;
	}

	.slg-compare {
		grid-template-columns: 1fr;
	}

	.slg-compare-cell {
		border-right: 0;
		border-bottom: 1px solid var(--slg-line);
	}

	.slg-stage-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 18px 14px 22px;
	}

	.slg-stage-head,
	.slg-nets,
	.slg-stage-note,
	.slg-stage-acts {
		grid-column: 1;
	}

	.slg-phone {
		grid-row: auto;
		grid-column: 1;
		margin: 0 auto;
	}

	.slg-stage-note {
		text-align: center;
	}

	.slg-toast {
		bottom: 84px;
	}
}

/*
 * Touch pointers on a wide screen — a tablet, or a touchscreen laptop.
 * The action set cannot wait for a hover that never comes. The note is
 * left alone here: above 780px the Copy button is still present, so the
 * note still says what it says on the desktop layout.
 */
@media (hover: none) {
	.slg-row-acts {
		display: flex;
	}
}

/*
 * Above the phone breakpoint a touch device still has the Copy button,
 * so the note goes on swapping out for the action set exactly as it does
 * under a mouse. Scoped to 781px and up so it cannot reach down and undo
 * the "Tap to copy" line, which this file sets earlier and which a plain
 * (hover: none) block would otherwise win against by source order.
 */
@media (hover: none) and (min-width: 781px) {
	.slg-row-note {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.slg *,
	.slg *::before,
	.slg *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Print: the ledger is the useful part. */
@media print {
	.slg-bar,
	.slg-index,
	.slg-fx,
	.slg-stage,
	.slg-dock,
	.slg-stage-backdrop,
	.slg-more-wrap,
	.slg-toast {
		display: none !important;
	}

	.slg-body {
		grid-template-columns: 1fr;
		border: 0;
	}
}

/* ====================================================================
 * Game lobbies (v2.1.0)
 *
 * A name in Free Fire or BGMI is read in a squad list and on a player
 * card, not in a chat bubble — so the preview shows it where it will
 * actually be seen. Both screens are drawn in CSS; no game assets are
 * used, and no logos or trademarks are reproduced.
 * ==================================================================== */

.slg-status--dark { color: #fff; }
.slg-status--dark .slg-sig i,
.slg-status--dark .slg-batt { background: rgba(255, 255, 255, 0.85); }
.slg-status--dark .slg-batt i { background: #fff; }

/* ---- Free Fire ---- */
.slg-ff {
	background: linear-gradient(180deg, #16233a 0%, #0d1626 46%, #101b2c 100%);
	color: #e8eef8;
	font-size: 11px;
}

.slg-ff-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 10px 8px;
}

.slg-ff-card {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding: 5px 10px 5px 5px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 3px;
}

.slg-avatar--ff {
	background: linear-gradient(140deg, #f5a623, #e2571e);
	color: #fff;
	border-radius: 3px;
	width: 30px;
	height: 30px;
	font-size: 13px;
	font-weight: 700;
}

.slg-ff-who { display: flex; flex-direction: column; min-width: 0; gap: 1px; }

.slg-ff-name {
	display: flex;
	align-items: baseline;
	gap: 4px;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	overflow: hidden;
}

.slg-ff-guild { color: #ffc247; font-size: 11px; flex: none; }
.slg-ff-uid { font-size: 9px; color: rgba(232, 238, 248, 0.6); letter-spacing: 0.02em; }

.slg-ff-wallet { display: flex; flex-direction: column; gap: 3px; flex: none; }

.slg-ff-coin {
	font-size: 9px;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #9ad7ff;
	white-space: nowrap;
}

.slg-ff-coin--gold { color: #ffd479; }

.slg-ff-body { position: relative; padding: 0 10px 12px; }

.slg-ff-mode {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.12em;
	padding: 3px 8px;
	color: #0d1626;
	background: #ffc247;
	border-radius: 2px;
}

.slg-ff-hero {
	display: block;
	height: 92px;
	margin: 8px 0;
	border-radius: 4px;
	background:
		radial-gradient(60% 80% at 50% 100%, rgba(245, 166, 35, 0.35), transparent 70%),
		linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.slg-ff-squad { display: grid; gap: 4px; margin-bottom: 10px; }
.slg-ff-squad-title { color: rgba(232, 238, 248, 0.55); font-size: 9px; }

.slg-ff-slot {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	padding: 5px 8px;
	font-size: 11px;
	background: rgba(255, 255, 255, 0.06);
	border-left: 2px solid rgba(255, 255, 255, 0.15);
	border-radius: 2px;
	overflow: hidden;
}

.slg-ff-slot--me { border-left-color: #ffc247; background: rgba(255, 194, 71, 0.12); }

.slg-ff-slot--empty {
	color: rgba(232, 238, 248, 0.45);
	border-left-style: dashed;
	justify-content: center;
	font-size: 10px;
}

.slg-ff-slot-av {
	width: 18px;
	height: 18px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.18);
	font-size: 10px;
	font-weight: 700;
	color: #fff;
}

.slg-ff-start {
	display: block;
	text-align: center;
	padding: 9px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.16em;
	color: #10202f;
	background: linear-gradient(180deg, #ffd570, #f5a623);
	border-radius: 3px;
}

/* ---- BGMI ---- */
.slg-bg {
	background: linear-gradient(180deg, #2a1c10 0%, #14100c 44%, #1b1510 100%);
	color: #f2e9dc;
	font-size: 11px;
}

.slg-bg-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 10px 8px;
	border-bottom: 1px solid rgba(255, 200, 120, 0.16);
}

.slg-bg-id { display: flex; align-items: center; gap: 8px; min-width: 0; }

.slg-avatar--bg {
	background: linear-gradient(140deg, #d9a441, #8a5a15);
	color: #1b1510;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 13px;
	font-weight: 700;
}

.slg-bg-who { display: flex; flex-direction: column; min-width: 0; gap: 1px; }

.slg-bg-name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	overflow: hidden;
}

.slg-bg-meta { font-size: 9px; color: #d9a441; letter-spacing: 0.06em; }
.slg-bg-tier { font-size: 16px; color: #d9a441; flex: none; }

.slg-bg-body { padding: 10px; }

.slg-bg-map {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: #f2e9dc;
	padding: 3px 8px;
	border: 1px solid rgba(255, 200, 120, 0.35);
	border-radius: 2px;
	margin-bottom: 10px;
}

.slg-bg-team { display: grid; gap: 4px; margin-bottom: 12px; }

.slg-bg-slot {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	padding: 6px 8px;
	font-size: 11px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 200, 120, 0.14);
	border-radius: 2px;
	overflow: hidden;
}

.slg-bg-slot--me { border-color: #d9a441; background: rgba(217, 164, 65, 0.14); }

.slg-bg-slot--empty {
	justify-content: center;
	border-style: dashed;
	color: rgba(242, 233, 220, 0.45);
	font-size: 10px;
}

.slg-bg-slot-av {
	width: 18px;
	height: 18px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	font-size: 10px;
	font-weight: 700;
	color: #fff;
}

.slg-bg-ready {
	margin-left: auto;
	flex: none;
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: #7fd18a;
}

.slg-bg-start {
	display: block;
	text-align: center;
	padding: 9px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: #1b1510;
	background: linear-gradient(180deg, #f0c46a, #d9a441);
	border-radius: 3px;
}

/* A styled name inside a game lobby must not wrap the layout out of
   shape, however long the visitor's text is. */
.slg-ff .slg-styled,
.slg-bg .slg-styled,
.slg-kf .slg-styled {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

/* ---- Kill Feed ----
   Auto-played by App.prototype.playKillFeed(): three elimination lines
   reveal one at a time, the kill counter ticks up with them, then the
   placement banner fades in and the whole thing resets and repeats.
   All timing lives in JS — this file only styles the shown/hidden and
   is-shown states so the loop has something to toggle. */
.slg-kf {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, #0c1112 0%, #070a0b 48%, #0c1112 100%);
	color: #eef4f2;
	font-size: 11px;
}

.slg-kf-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 10px 5px;
}

.slg-kf-mode {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: rgba(238, 244, 242, 0.55);
}

.slg-kf-kills {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: none;
	font-size: 11px;
	font-weight: 700;
	color: #ff6a53;
	padding: 3px 8px;
	background: rgba(255, 106, 83, 0.12);
	border: 1px solid rgba(255, 106, 83, 0.35);
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
}

.slg-kf-kills-icon { font-size: 8px; }

.slg-kf-arena {
	display: block;
	height: 76px;
	margin: 2px 10px 8px;
	border-radius: 5px;
	background:
		radial-gradient(60% 90% at 25% 15%, rgba(255, 106, 83, 0.16), transparent 70%),
		radial-gradient(55% 70% at 85% 85%, rgba(120, 200, 255, 0.10), transparent 70%),
		linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.slg-kf-feed {
	list-style: none;
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0 10px;
	flex: 1;
	min-height: 0;
}

.slg-kf-line {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 6px 8px;
	background: rgba(255, 255, 255, 0.05);
	border-left: 2px solid rgba(255, 106, 83, 0.55);
	border-radius: 2px;
	opacity: 0;
	transform: translateX(16px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.slg-kf-line.is-shown { opacity: 1; transform: translateX(0); }

.slg-kf-verb { flex: none; font-size: 11px; color: #ff6a53; }

.slg-kf-victim {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: rgba(238, 244, 242, 0.55);
}

.slg-kf-banner {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 12px 10px;
	text-align: center;
	background: linear-gradient(180deg, rgba(10, 14, 15, 0.97), rgba(10, 14, 15, 0.88));
	border: 1px solid rgba(255, 194, 71, 0.4);
	border-radius: 8px;
	opacity: 0;
	transform: translateY(10px) scale(0.96);
	transition: opacity 0.4s ease, transform 0.4s ease;
	pointer-events: none;
}

.slg-kf-banner.is-shown { opacity: 1; transform: translateY(0) scale(1); }

/* Each pass reveals a random two to four of the four slots; the rest
   are taken out of the grid entirely so the feed does not sit on gaps.
   .slg-kf-line sets display:flex, which would otherwise beat [hidden]. */
.slg-kf-line[hidden] { display: none; }

/* Replay. Only offered once the loop has spent its budget and parked on
   the finished frame — until then there is nothing to replay. */
.slg-kf-replay {
	position: absolute;
	top: 44px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(238, 244, 242, 0.85);
	background: rgba(10, 14, 15, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.slg-kf.is-done .slg-kf-replay { opacity: 1; }
.slg-kf-replay:hover { border-color: rgba(255, 255, 255, 0.5); }
.slg-kf-replay:focus-visible { outline: 2px solid #ffc247; outline-offset: 2px; opacity: 1; }

.slg-kf-banner-rank { font-size: 20px; font-weight: 800; color: #ffc247; }
.slg-kf-banner-title { font-size: 9px; font-weight: 700; letter-spacing: 0.18em; color: rgba(238, 244, 242, 0.7); margin-bottom: 2px; }
.slg-kf-banner-name.slg-styled { max-width: 100%; font-size: 15px; font-weight: 700; color: #fff; }

/* ---- Favourites entry in the index ---------------------------------- */
.slg-idx-group--fav { margin-top: 6px; border-top: 1px solid var(--slg-line); padding-top: 6px; }
.slg-idx-fav .slg-idx-name { display: inline-flex; align-items: center; gap: 6px; }
.slg-idx-fav .slg-heart { color: var(--slg-heart, #c62f18); }
.slg-idx-fav[aria-pressed="true"] { background: var(--slg-accent-wash); color: var(--slg-ink); }
