/*
 * remix — split out of style.css so it only loads on the pages that
 * actually render it (see newsdesign_conditional_styles() in
 * functions.php). Edit here, not in style.css.
 */
/* ======================================================================== *
 * Remix List — article block
 * ======================================================================== */
.nd-remix__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--nd-space-3);
}

.nd-remix__toplink {
	flex: none;
	padding: 6px 16px;
	border: 1px solid var(--nd-color-rule-strong);
	border-radius: var(--nd-radius-pill);
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--nd-color-ink);
	text-decoration: none;
	transition: border-color 0.12s ease;
}

.nd-remix__toplink:hover { border-color: var(--nd-color-ink); }

.nd-remix__intro {
	font-size: var(--nd-text-sm);
	color: var(--nd-color-muted);
	margin: 0 0 var(--nd-space-3);
}

/* "You make this ranking" note — the reader must know the list is theirs. */
.nd-remix__note {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-sm);
	line-height: 1.5;
	margin: 0 0 var(--nd-space-4);
	padding: var(--nd-space-3) var(--nd-space-4);
	background: var(--nd-color-paper-2);
	border-left: 3px solid var(--nd-color-accent);
	border-radius: var(--nd-radius-sm);
}


/* Desktop sticky bar: fixed under the masthead (theme.js sets the exact top
   and toggles .is-visible while the list is on screen; the element itself is
   moved to <body>). Mobile uses the bottom CTA banner instead. */
.nd-remix__stickybar {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 45; /* under the sticky masthead (50) */
	display: flex;
	align-items: center;
	gap: var(--nd-space-4);
	padding: 10px clamp(16px, 4vw, 48px);
	background: var(--nd-color-paper);
	border-bottom: 1px solid var(--nd-color-rule-strong);
	box-shadow: var(--nd-shadow-md);
	transform: translateY(-110%);
	transition: transform 0.2s ease;
}

.nd-remix__stickybar.is-visible { transform: translateY(0); }

.nd-remix__stickytitle {
	flex: 1;
	min-width: 0;
	font-family: var(--nd-font-display);
	font-weight: var(--nd-weight-regular);
	text-transform: uppercase;
	font-size: var(--nd-text-md);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nd-remix__stickyhint {
	flex: none;
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--nd-color-subtle);
}

.nd-remix__stickybtn {
	flex: none;
	padding: 8px 22px;
	border-radius: var(--nd-radius-pill);
	background: var(--nd-color-ink);
	color: var(--nd-color-paper);
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	transition: background 0.12s ease;
}

.nd-remix__stickybtn:hover { background: var(--nd-color-accent); color: #fff; }

/* Mobile: same bar, tighter — the hint goes, title + button stay. */
@media (max-width: 600px) {
	.nd-remix__stickybar { gap: var(--nd-space-3); padding: 8px 16px; }
	.nd-remix__stickyhint { display: none; }
	.nd-remix__stickybtn { padding: 8px 14px; }}

.nd-remix__list { list-style: none; margin: 0; padding: 0; }

.nd-remix__item {
	display: flex;
	gap: var(--nd-space-4);
	align-items: flex-start;
	padding: var(--nd-space-4) 0;
	border-bottom: 1px solid var(--nd-color-rule);
}

.nd-remix__rank {
	font-family: var(--nd-font-display);
	font-size: var(--nd-text-3xl);
	line-height: 0.9;
	color: var(--nd-color-accent);
	flex: none;
	width: 1.4em;
	text-align: center;
}

.nd-remix__body { min-width: 0; flex: 1; }

.nd-remix__media { margin-bottom: var(--nd-space-3); }

.nd-remix__media img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: var(--nd-radius-md);
}

.nd-remix__title {
	font-family: var(--nd-font-display);
	font-weight: var(--nd-weight-regular);
	text-transform: uppercase;
	font-size: var(--nd-text-lg);
	line-height: 1.1;
	margin: 0 0 var(--nd-space-2);
}

.nd-remix__text {
	font-size: var(--nd-text-sm);
	color: var(--nd-color-muted);
	margin: var(--nd-space-2) 0 0;
	line-height: 1.5;
}

.nd-remix__text a { color: var(--nd-color-ink); text-decoration: underline; }

.nd-remix__text a:hover { color: var(--nd-color-accent); }

/* Embedded players are fluid (width 100%; YouTube keeps 16:9 via
   .nd-listen__yt), so they collapse cleanly on mobile. */
.nd-remix__embed { margin-top: var(--nd-space-3); }

.nd-remix__embed iframe { max-width: 100%; }

@media (max-width: 600px) {
	.nd-remix__item { gap: var(--nd-space-3); }
	.nd-remix__rank { font-size: var(--nd-text-2xl); width: 1.2em; }}


/* Remix editor rows: the rich blurb field (RichText has no built-in label). */
.nd-remix__edit-blurb { margin: 8px 0; }

.nd-remix__edit-label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	color: #1e1e1e;
}

.nd-remix__edit-blurb p {
	margin: 0;
	padding: 6px 8px;
	border: 1px solid #949494;
	border-radius: 2px;
	font-size: 13px;
}

.nd-remix__votes { display: flex; flex-wrap: wrap; gap: var(--nd-space-2); }

.nd-remix__vote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid var(--nd-color-rule-strong);
	border-radius: var(--nd-radius-pill);
	background: var(--nd-color-paper);
	color: var(--nd-color-ink);
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.nd-remix__vote:hover { border-color: var(--nd-color-ink); }

.nd-remix__votepct { color: var(--nd-color-subtle); display: none; }

.nd-remix__item.is-voted .nd-remix__vote { cursor: default; opacity: 0.55; }

.nd-remix__item.is-voted .nd-remix__vote:hover { border-color: var(--nd-color-rule-strong); }

.nd-remix__item.is-voted .nd-remix__votepct { display: inline; }

.nd-remix__item.is-voted .nd-remix__vote.is-chosen {
	opacity: 1;
	border-color: var(--nd-color-accent);
	background: var(--nd-color-accent-soft);
	color: var(--nd-color-accent);
}

.nd-remix__item.is-voted .nd-remix__vote.is-chosen .nd-remix__votepct { color: var(--nd-color-accent); }


/* Community results */
.nd-remix__community {
	margin-top: var(--nd-space-5);
	padding: var(--nd-space-5);
	border: 1px solid var(--nd-color-rule);
	border-radius: var(--nd-radius-md);
	background: var(--nd-color-paper-2);
}

.nd-remix__commhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--nd-space-3);
	margin-bottom: var(--nd-space-4);
}

.nd-remix__commmeta {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	color: var(--nd-color-subtle);
}

.nd-remix__cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--nd-space-3);
	margin-bottom: var(--nd-space-4);
}

@media (max-width: 600px) { .nd-remix__cards { grid-template-columns: 1fr; }}

.nd-remix__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: var(--nd-space-3) var(--nd-space-4);
	border: 1px solid var(--nd-color-rule);
	border-radius: var(--nd-radius-sm);
	background: var(--nd-color-paper);
}

.nd-remix__cardkicker {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--nd-color-subtle);
}

.nd-remix__cardrank {
	font-family: var(--nd-font-display);
	font-size: var(--nd-text-2xl);
	line-height: 1;
	color: var(--nd-color-accent);
}

.nd-remix__cardtitle {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-sm);
	font-weight: 700;
}

.nd-remix__cardstat {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	color: var(--nd-color-muted);
}

.nd-remix__commtitle {
	font-family: var(--nd-font-display);
	font-weight: var(--nd-weight-regular);
	text-transform: uppercase;
	font-size: var(--nd-text-lg);
	margin: 0;
}

.nd-remix__commsub {
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	color: var(--nd-color-subtle);
	margin: 2px 0 var(--nd-space-3);
}

.nd-remix__commlist { list-style: none; margin: 0; padding: 0; }

.nd-remix__commitem {
	display: flex;
	align-items: center;
	gap: var(--nd-space-3);
	padding: var(--nd-space-2) 0;
	border-top: 1px solid var(--nd-color-rule);
}

.nd-remix__commrank {
	flex: none;
	min-width: 2ch;
	font-family: var(--nd-font-display);
	font-size: var(--nd-text-lg);
	color: var(--nd-color-subtle);
	text-align: right;
}

.nd-remix__commitem:nth-child(-n+3) .nd-remix__commrank { color: var(--nd-color-accent); }

.nd-remix__commname {
	flex: 1;
	min-width: 0;
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-sm);
	font-weight: 700;
}

.nd-remix__delta {
	flex: none;
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	color: var(--nd-color-subtle);
}

.nd-remix__delta.is-up { color: var(--nd-color-accent); }


/* ======================================================================== *
 * Remix List — the standalone remix page (?nd_remix=<id>)
 * Always dark: inc/remix.php pins data-nd-theme="dark" on <html>, so the
 * theme tokens are already flipped; the page-only chrome is styled here.
 * ======================================================================== */
body.nd-remixfs {
	margin: 0;
	background: #0a0a0a;
	color: var(--nd-color-ink);
	font-family: var(--nd-font-sans);
}

.nd-remixfs__wrap {
	max-width: 560px;
	margin: 0 auto;
	padding: 0 var(--nd-space-4) var(--nd-space-7);
}

.nd-remixfs__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: var(--nd-space-4) 0;
}

.nd-remixfs__kicker {
	font-size: var(--nd-text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.nd-remixfs__close {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	color: var(--nd-color-ink);
	text-decoration: none;
	font-size: var(--nd-text-md);
	padding: 6px;
}

.nd-remixfs__title {
	font-family: var(--nd-font-display);
	font-weight: var(--nd-weight-regular);
	text-transform: uppercase;
	font-size: var(--nd-text-2xl);
	line-height: 1.05;
	margin: var(--nd-space-4) 0 var(--nd-space-2);
}

.nd-remixfs__sub {
	font-size: var(--nd-text-sm);
	color: var(--nd-color-muted);
	margin: 0 0 var(--nd-space-5);
}

.nd-remixfs__list {
	list-style: none;
	margin: 0 0 var(--nd-space-5);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nd-remixfs__item {
	display: grid;
	grid-template-columns: auto 1fr auto auto auto;
	align-items: center;
	gap: var(--nd-space-3);
	padding: 10px var(--nd-space-4);
	background: #161616;
	border: 1px solid #2c2c2c;
	border-radius: var(--nd-radius-md);
	user-select: none;
}

.nd-remixfs__item.is-dragging {
	border-color: var(--nd-color-ink);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
	position: relative;
	z-index: 2;
	will-change: transform; /* the row follows the pointer (JS translateY) */
	cursor: grabbing;
}

.nd-remixfs__rank {
	font-family: var(--nd-font-display);
	font-size: var(--nd-text-xl);
	line-height: 1;
	min-width: 2ch;
}

.nd-remixfs__name {
	font-size: var(--nd-text-sm);
	font-weight: 700;
	min-width: 0;
}

/* Movement badge while rearranging: +N (green) above the editorial spot,
   -N (red) below it, empty when unchanged. */
.nd-remixfs__delta {
	min-width: 3ch;
	text-align: right;
	font-size: var(--nd-text-xs);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--nd-color-subtle);
}

.nd-remixfs__delta.is-up { color: #4ade80; }

.nd-remixfs__delta.is-down { color: #f87171; }

.nd-remixfs__info {
	width: 26px;
	height: 26px;
	border: 1px solid #3a3a3a;
	border-radius: 50%;
	background: none;
	color: var(--nd-color-subtle);
	font-size: var(--nd-text-xs);
	font-weight: 700;
	font-style: italic;
	cursor: pointer;
}

.nd-remixfs__info[aria-expanded="true"],
.nd-remixfs__info:hover { border-color: var(--nd-color-ink); color: var(--nd-color-ink); }

.nd-remixfs__handle {
	border: 0;
	background: none;
	color: var(--nd-color-subtle);
	padding: 8px 4px;
	cursor: grab;
	touch-action: none;
}

.nd-remixfs__handle:active { cursor: grabbing; }

.nd-remixfs__item.is-dragging .nd-remixfs__handle { color: var(--nd-color-ink); }

.nd-remixfs__blurb {
	grid-column: 1 / -1;
	margin: 0;
	font-size: var(--nd-text-xs);
	color: var(--nd-color-muted);
	line-height: 1.5;
}

.nd-remixfs__lock {
	width: 100%;
	padding: 14px;
	border: 0;
	border-radius: var(--nd-radius-pill);
	background: #f2f2f2;
	color: #0a0a0a;
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-sm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
}

.nd-remixfs__lock:hover { background: #fff; }

body.nd-remixfs.is-locked .nd-remixfs__handle { cursor: default; opacity: 0.35; }

body.nd-remixfs.is-locked .nd-remixfs__item { opacity: 0.85; }

.nd-remixfs__done { text-align: center; padding: var(--nd-space-5) 0; }

.nd-remixfs__donetitle {
	font-family: var(--nd-font-display);
	font-weight: var(--nd-weight-regular);
	text-transform: uppercase;
	font-size: var(--nd-text-xl);
	margin: 0 0 var(--nd-space-2);
}

.nd-remixfs__donetext {
	font-size: var(--nd-text-sm);
	color: var(--nd-color-muted);
	margin: 0 0 var(--nd-space-4);
}

.nd-remixfs__doneactions {
	display: flex;
	justify-content: center;
	gap: var(--nd-space-3);
	flex-wrap: wrap;
}

.nd-remixfs__share,
.nd-remixfs__backbtn {
	display: inline-flex;
	align-items: center;
	padding: 10px 24px;
	border: 1px solid #3a3a3a;
	border-radius: var(--nd-radius-pill);
	background: none;
	color: var(--nd-color-ink);
	font-family: var(--nd-font-sans);
	font-size: var(--nd-text-sm);
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.12s ease;
}

.nd-remixfs__share:hover,
.nd-remixfs__backbtn:hover { border-color: var(--nd-color-ink); }

.nd-root .nd-remix__stickybar {
	padding-left: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left));
	padding-right: max(clamp(16px, 4vw, 48px), env(safe-area-inset-right));
}
