/*
 * Nova Tudástár — article layout.
 *
 * Deliberately thin: layout, rhythm and the meta line only. Typography, colour
 * and link styling are left to the theme (The7 on novaphone.hu), so an entry
 * still looks like the rest of the site. `currentColor` is used throughout for
 * the same reason.
 */

.nova-tudastar-article {
	--nova-tudastar-gap: 1.5rem;
	--nova-tudastar-radius: 12px;
	--nova-tudastar-muted: 0.68;
}

/* Featured image ------------------------------------------------------- */

.nova-tudastar-article__figure {
	margin: 0 0 var(--nova-tudastar-gap);
}

.nova-tudastar-article__figure img,
.nova-tudastar-article__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--nova-tudastar-radius);
}

/* Category + date ------------------------------------------------------ */

.nova-tudastar-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin: 0 0 0.6rem;
	font-size: 0.875em;
	line-height: 1.4;
}

.nova-tudastar-article__meta > * {
	opacity: var(--nova-tudastar-muted);
}

.nova-tudastar-article__sep {
	opacity: 0.4;
	user-select: none;
}

.nova-tudastar-article__cat a {
	color: inherit;
	text-decoration: none;
}

.nova-tudastar-article__cat a:hover,
.nova-tudastar-article__cat a:focus-visible {
	text-decoration: underline;
}

/* Title ---------------------------------------------------------------- */

.nova-tudastar-article__title {
	margin: 0 0 var(--nova-tudastar-gap);
	text-wrap: balance;
}

/* Body ----------------------------------------------------------------- */

.nova-tudastar-article__content > *:first-child {
	margin-top: 0;
}

.nova-tudastar-article__content > *:last-child {
	margin-bottom: 0;
}

.nova-tudastar-article__content h2 {
	margin-top: 2em;
	margin-bottom: 0.6em;
	text-wrap: balance;
}

.nova-tudastar-article__content h3 {
	margin-top: 1.6em;
	margin-bottom: 0.5em;
}

.nova-tudastar-article__content ul,
.nova-tudastar-article__content ol {
	padding-left: 1.35em;
}

.nova-tudastar-article__content li + li {
	margin-top: 0.35em;
}

.nova-tudastar-article__content blockquote {
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.15em;
	border-left: 3px solid currentColor;
	opacity: 0.85;
}

/* Wide content must scroll inside itself, never the page. */
.nova-tudastar-article__content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.nova-tudastar-article__content th,
.nova-tudastar-article__content td {
	padding: 0.55em 0.8em;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 18%, transparent);
	text-align: left;
	vertical-align: top;
}

.nova-tudastar-article__content th {
	font-weight: 600;
}

.nova-tudastar-article__content img {
	max-width: 100%;
	height: auto;
}

/* Signature -------------------------------------------------------------
 *
 * The one place the plugin allows itself a surface of its own. Every colour
 * is mixed out of `currentColor`, so the card picks up the theme's text
 * colour and works on a light or a dark background without a second rule set.
 * Override the accent with --nova-tudastar-accent to bring in a brand colour.
 */

.nova-tudastar-signature {
	--nova-tudastar-accent: currentColor;
	--nova-tudastar-mark-bg: #10bce1;
	--nova-tudastar-mark-fg: #fff;

	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.25rem;
	margin: 2.5rem 0 0;
	padding: 1.15rem 1.35rem;
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: var(--nova-tudastar-radius, 12px);
	background: color-mix(in srgb, currentColor 4%, transparent);
	font-size: 0.9375em;
	line-height: 1.45;
}

.nova-tudastar-signature__mark {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--nova-tudastar-mark-bg);
	color: var(--nova-tudastar-mark-fg);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
}

.nova-tudastar-signature__identity {
	flex: 1 1 14rem;
	min-width: 0;
}

.nova-tudastar-signature__author,
.nova-tudastar-signature__tagline {
	margin: 0;
}

.nova-tudastar-signature__author {
	font-weight: 600;
}

.nova-tudastar-signature__tagline {
	margin-top: 0.15em;
	font-size: 0.9em;
	opacity: var(--nova-tudastar-muted, 0.68);
}

.nova-tudastar-signature__aside {
	flex: 0 1 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.9rem;
	margin-left: auto;
	font-size: 0.875em;
}

.nova-tudastar-signature__date {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4em;
	padding: 0.3em 0.7em;
	border-radius: 999px;
	background: color-mix(in srgb, currentColor 7%, transparent);
	white-space: nowrap;
}

.nova-tudastar-signature__label {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.6;
}

.nova-tudastar-signature__link {
	color: var(--nova-tudastar-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.nova-tudastar-signature__link:hover,
.nova-tudastar-signature__link:focus-visible {
	text-decoration: underline;
}

/* Stacked on narrow screens: the aside must not get squeezed to one word
   per line next to the identity block. */
@media (max-width: 30rem) {
	.nova-tudastar-signature__aside {
		margin-left: 0;
		flex-basis: 100%;
	}
}
