/* Husky Sound — the small toggle tucked under the HUSKY WORKS logo */
.hs-toggle {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	left: 0;
	top: calc(100% + 7px);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 1px 0;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #777;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 200ms ease;
}
/* A bigger invisible hit area, so the tiny label is easy to tap */
.hs-toggle::after { content: ""; position: absolute; inset: -7px -8px; }
.hs-toggle:hover { color: #b5b5b5; }
.hs-toggle.is-on { color: var(--hs-color, #fff); }
.hs-toggle:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }

/* The character spot. Without JavaScript (or before it loads): one crisp pixel block.
   husky-disco.js turns it into the pixel disco man / skull. */
.hs-char {
	display: block;
	flex: none;
	order: 2;               /* after the label: SOUND ON ▸ dancer */
	width: 6px;
	height: 6px;
	background: currentColor;
}
.hs-toggle.is-loading .hs-char { animation: hs-wait 700ms steps(2, jump-none) infinite; }
@keyframes hs-wait { from { opacity: 1; } to { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
	.hs-toggle, .hs-toggle .hs-char { transition: none; animation: none !important; }
}

/* Pixel disco man (husky-disco.js): a canvas sized in whole device pixels — no smoothing */
/* His 9 × 13 spot; the canvas overhangs it (left, above, and to the right where the door appears) */
.hs-char.is-disco { position: relative; width: 9px; height: 13px; background: none; }
.hs-char.is-disco canvas { position: absolute; display: block; pointer-events: none; image-rendering: pixelated; image-rendering: crisp-edges; }
/* The burst of pixels on SOUND OFF flies over everything, outside the header */
.hs-burst {
	position: fixed;
	z-index: 2147483000;
	pointer-events: none;
	image-rendering: pixelated;
}

/* Sound Lab panel (Grid Lab only; shares the Motion/Color Lab look from husky-grid.css) */
.hg-lab.hg-soundlab { left: auto; right: 16px; top: 96px; bottom: auto; }
.hg-lab.hg-soundlab .hg-lab-body { max-height: calc(100vh - 360px); min-height: 120px; }
.hg-soundlab.is-silent .hl-status { color: #ffe600; }
.hl-tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hg-lab .hl-tests button {
	padding: 7px 4px;
	border: 1px solid rgba(255, 255, 255, .4);
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.hg-lab .hl-tests button:hover { background: #fff; color: #000; }
@media (max-width: 599px) {
	.hg-lab.hg-soundlab { top: 120px; left: 8px; right: 8px; }
}

/* ---- HW.FM (husky-fm.js) — the compact player under the logo ----------------------
   Row 1:  SOUND ON/OFF   HW.FM ▾   [character]
   Row 2:  STATION — Track title
   Same type as the SOUND toggle: Helvetica 10px bold, tracked caps. */
.smp-navbar.hs-has-player, .smp-navbar:has(.hs-player) { overflow: visible; }
.hs-player {
	position: absolute;
	left: 0;
	top: calc(100% + 5px);
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	padding-bottom: 4px;
	background: #000;          /* reads as part of the black header when it hangs just below it */
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #777;
	--fm-c: #fff;
}
.fm-row { display: flex; align-items: center; gap: 16px; height: 13px; }
.hs-player .hs-toggle { position: relative; left: auto; top: auto; padding: 0; }
.hs-player .hs-toggle::after { inset: -6px -6px; }
.fm-dial, .fm-now, .fm-b {
	all: unset;
	box-sizing: border-box;
	position: relative;
	cursor: pointer;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}
.fm-dial { display: inline-flex; align-items: center; gap: 5px; color: #777; transition: color 200ms ease; }
.fm-dial::after { content: ""; position: absolute; inset: -6px -6px; }
.fm-dial:hover, .fm-dial[aria-expanded="true"] { color: #b5b5b5; }
.hs-player.is-on .fm-dial { color: #b5b5b5; }
.fm-caret { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid currentColor; transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
.fm-dial[aria-expanded="true"] .fm-caret { transform: rotate(180deg); }
/* the little arrow drifts through RGB CMY so the station picker gets noticed */
.fm-caret { animation: fm-caret-rgb 6s linear infinite; }
@keyframes fm-caret-rgb {
	0%, 100% { border-top-color: #ff1f3d; } 16.6% { border-top-color: #ffe600; } 33.3% { border-top-color: #00e64d; }
	50% { border-top-color: #00f0ff; } 66.6% { border-top-color: #3d5cff; } 83.3% { border-top-color: #ff2bd6; }
}
/* the station list glides open and closed */
.fm-list { opacity: 0; transform: translateY(-6px); transition: opacity .32s cubic-bezier(.22, 1, .36, 1), transform .32s cubic-bezier(.22, 1, .36, 1); }
.fm-list.is-open { opacity: 1; transform: none; }
/* hello on arrival: the list opens and each channel lights up in turn */
.hs-player.is-teasing .fm-caret { transform: rotate(180deg); }
.fm-opt { transition: background-color .32s ease, color .32s ease; }
.fm-opt .fm-sw, .fm-opt .fm-on { transition: color .32s ease, opacity .32s ease, box-shadow .32s ease, background-color .32s ease; }
.fm-opt.is-lit { background: #111; }
.fm-opt.is-lit .fm-on { color: var(--fm-c); }
.fm-opt.is-lit .fm-sw { opacity: 1; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--fm-c), 0 0 10px var(--fm-c); }
@media (prefers-reduced-motion: reduce) { .fm-caret { animation: none; border-top-color: #00f0ff; } .fm-list { transition: none; } }
.fm-dial:focus-visible, .fm-now:focus-visible, .fm-b:focus-visible, .fm-opt:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }

/* The character's spot. Stage 3 gives him room to walk to a door just right of here. */
.fm-stage { position: relative; display: flex; align-items: center; height: 13px; cursor: pointer; }
.fm-stage .hs-char { order: 0; }

/* Row 2: station (its colour) — track (subdued) */
.fm-now { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: #6a6a6a; }
.fm-now::after { content: ""; position: absolute; inset: -4px -6px; }
.fm-st { color: var(--fm-c); }
.fm-tr { letter-spacing: .08em; text-transform: none; font-weight: 400; color: #8a8a8a; }
.fm-now:hover .fm-tr { color: #bbb; }

/* Station list — drops over row 2, never pushes anything */
.fm-list {
	position: absolute;
	left: 0;
	top: 38px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	min-width: 240px;
	background: #000;
	border: 1px solid #2a2a2a;
}
.fm-list[hidden], .fm-deck[hidden] { display: none; }
.fm-opt { display: flex; align-items: center; gap: 9px; padding: 7px 12px; cursor: pointer; color: #8a8a8a; white-space: nowrap; }
.fm-opt:hover, .fm-opt:focus { color: #fff; background: #111; outline: none; }
.fm-opt:focus-visible { outline-offset: -2px; }
.fm-sw { flex: none; width: 6px; height: 6px; background: var(--fm-c); opacity: .45; }
.fm-opt.is-sel .fm-sw { opacity: 1; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--fm-c); }
.fm-opt.is-sel .fm-on { color: var(--fm-c); }
.fm-genre { letter-spacing: .08em; text-transform: none; font-weight: 400; color: #666; }

/* Deck — previous / play / next, title, time, seek, volume */
.fm-deck {
	position: absolute;
	left: 0;
	top: 38px;
	width: 240px;
	padding: 10px 12px 12px;
	background: #000;
	border: 1px solid #2a2a2a;
	display: grid;
	gap: 9px;
}
.fm-ctrls { display: flex; align-items: center; gap: 14px; }
.fm-b { width: 14px; height: 12px; display: inline-flex; align-items: center; justify-content: center; color: #8a8a8a; }
.fm-b::after { content: ""; position: absolute; inset: -6px; }
.fm-b:hover { color: #fff; }
.fm-b i { display: block; position: relative; }
/* tiny drawn icons (crisp, no icon font) */
.fm-play i { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.fm-play.is-playing i { width: 8px; height: 10px; border: 0; background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px, currentColor 5px); }
.fm-prev i, .fm-next i { width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.fm-next i { border-left: 6px solid currentColor; }
.fm-prev i { border-right: 6px solid currentColor; }
.fm-next i::after, .fm-prev i::after { content: ""; position: absolute; top: -4px; width: 2px; height: 8px; background: currentColor; }
.fm-next i::after { left: 0; }
.fm-prev i::after { left: -2px; }
.fm-count { margin-left: auto; color: #555; letter-spacing: .1em; }
.fm-meta { display: grid; gap: 4px; min-width: 0; }
.fm-title { color: var(--fm-c); text-transform: none; letter-spacing: .06em; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-artist { color: #777; text-transform: none; letter-spacing: .06em; font-weight: 400; }
.fm-artist[hidden] { display: none; }
.fm-time, .fm-vol { display: flex; align-items: center; gap: 8px; color: #666; letter-spacing: .08em; }
.fm-vol { cursor: default; }
.fm-time input, .fm-vol input { flex: 1; min-width: 0; margin: 0; height: 12px; accent-color: var(--fm-c); background: transparent; cursor: pointer; }
.fm-time input:disabled { opacity: .35; cursor: default; }
.fm-el, .fm-dur { min-width: 30px; font-variant-numeric: tabular-nums; }
.fm-dur { text-align: right; }

@media (max-width: 599px) {
	.fm-row { gap: 12px; }
	.fm-now { max-width: calc(100vw - 40px); }
	.fm-list, .fm-deck { max-width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
	.fm-caret, .fm-dial { transition: none; }
}
.fm-shuf {
	all: unset; position: relative; cursor: pointer; margin-left: auto;
	font: inherit; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #555;
}
.fm-shuf::after { content: ""; position: absolute; inset: -6px; }
.fm-shuf:hover { color: #aaa; }
.fm-shuf.is-on { color: var(--fm-c); }
.fm-shuf:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.fm-shuf + .fm-count { margin-left: 10px; }
.hs-player.is-paused .fm-tr { color: #555; }

/* HW.FM waveform: a tiny rainbow line beside the station name; click it for a larger view */
.fm-row2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fm-row2 .fm-now { flex: 0 1 auto; min-width: 0; }
.fm-scope { all: unset; box-sizing: border-box; position: relative; flex: none; display: block; width: 56px; height: 12px; cursor: pointer; }
.fm-scope::after { content: ""; position: absolute; inset: -5px -4px; }
.fm-scope canvas, .fm-scope-panel canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.fm-scope:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.fm-scope-panel {
	position: absolute; left: 0; top: 38px; z-index: 3;
	width: 300px; max-width: calc(100vw - 32px); height: 84px; padding: 12px 34px 12px 12px; box-sizing: border-box;
	background: #000; border: 1px solid #2a2a2a;
	opacity: 0; transform: translateY(-6px); transform-origin: 0 0;
	transition: opacity .32s cubic-bezier(.22, 1, .36, 1), transform .32s cubic-bezier(.22, 1, .36, 1);
}
.fm-scope-panel.is-open { opacity: 1; transform: none; }
.fm-scope-x { all: unset; position: absolute; top: 6px; right: 8px; width: 18px; height: 18px; line-height: 18px; text-align: center; color: #8a8a8a; cursor: pointer; font-size: 16px; }
.fm-scope-x:hover { color: #fff; }
.fm-scope-x:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fm-scope-panel { transition: none; } }

/* THIS SITE IS IN STEREO. / HUSKY WORKS IS BEST VIEWED WITH HEADPHONES. — tiny, muted, no box.
   Under the station line on big screens; at the foot of the station list where the header is tight. */
.hs-player .fm-stereo {
	margin: 9px 0 0 !important;
	padding: 0 !important;
	font: 700 8px/1.55 Helvetica, "Helvetica Neue", Arial, sans-serif !important;
	letter-spacing: .2em !important;
	text-transform: uppercase;
	color: #5c5c5c !important;
	white-space: nowrap;
	pointer-events: none;
}
.fm-list .fm-note { display: none; }
@media (max-width: 991px), (pointer: coarse) {
	.hs-player .fm-stereo { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); margin: -1px !important; }
	.fm-list .fm-note {
		display: block;
		margin: 6px 12px 2px;
		padding: 9px 0 3px;
		font-size: 8px; line-height: 1.6; letter-spacing: .2em; text-transform: uppercase;
		color: #5c5c5c; white-space: normal; cursor: default;
	}
}
