/* Popular — "הכתבות הכי נקראות" widget.
   Brand book: Karantina for the big numerals, 4px corners, a 1px rule instead
   of a shadow, and the yellow cursor reserved for what matters and where you
   are. Generic — every colour comes from tokens.css. */

/* The rail shell (.rail-left .widget) owns the card: border, radius, background
   and padding. Repeating any of them here drew a second frame inside the first —
   a card inside a card — so this element carries layout only. */
.nx-pop {
	min-width: 0;
}

.nx-pop-title {
	margin: 0;
	color: var(--soft);
	font-family: var(--font-site);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

/* Tabs: three small labels on one 1px rule; the active one takes the yellow
   underline, exactly as the feed tabs do — "where you are" is one signal. */
.nx-pop-tabs {
	display: flex;
	gap: 4px;
	margin-top: 14px;
	border-bottom: 1px solid var(--border);
}

.nx-pop-tab {
	appearance: none;
	flex: 1 1 0;
	margin: 0;
	padding: 7px 4px 8px;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--muted);
	font-family: var(--font-site);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	box-shadow: inset 0 -2px 0 transparent;
	transition: color 0.12s ease;
}

.nx-pop-tab:hover { color: var(--text-2); }
.nx-pop-tab:focus-visible { outline-offset: -2px; }

.nx-pop-tab.is-active {
	color: var(--color-accent);
	font-weight: 700;
	box-shadow: inset 0 -2px 0 var(--color-accent);
}

/* Rows: the rank is a numeral, not an ordinal — Karantina, tabular, and the
   leader gets the cursor. */
.nx-pop-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nx-pop-list[hidden] { display: none; }

.nx-pop-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 13px 0;
	border-bottom: 1px solid var(--border);
}

.nx-pop-item:first-child { padding-top: 14px; }
.nx-pop-item:last-child { border-bottom: 0; padding-bottom: 2px; }

.nx-pop-rank {
	flex: none;
	width: 20px;
	/* Muted, not invisible: --rule-2 sits too close to the card fill on a dark
	   skin, which left ranks 2-5 unreadable. --muted is the tone used for the
	   meta line: visibly present without competing with the headline. */
	color: var(--muted);
	/* Not --font-display: Karantina is a poster face whose heavy, tightly-spaced
	   glyphs read as Hebrew letters when sized as a small numeral. The site face
	   at tabular figures matches how .meta-views already sets numbers. */
	font-family: var(--font-site);
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.6;
	text-align: start;
}

.nx-pop-item:first-child .nx-pop-rank {
	color: var(--color-accent);
	font-size: 18px;
}

.nx-pop-body { min-width: 0; }

.nx-pop-link {
	display: block;
	color: var(--text);
	font-family: var(--font-site);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
}

.nx-pop-link:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.nx-pop-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 0;
	color: var(--muted);
	font-family: var(--font-site);
	font-size: 12px;
	line-height: 1.4;
}

/* The channel keeps its own palette colour — the rail shows it as a 8px mark,
   so the widget uses the same square, not a word. */
.nx-pop-ch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	color: var(--soft);
}

.nx-pop-ch::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--ch, var(--rule-2));
}

.nx-pop-ch {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nx-pop-stat {
	flex: none;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.nx-pop-stat::before {
	content: "·";
	margin-inline-end: 8px;
}

.nx-pop-empty {
	padding: 16px 0 4px;
	color: var(--muted);
	font-family: var(--font-site);
	font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
	.nx-pop-tab { transition: none; }
}