@import url('https://fonts.googleapis.com/css2?family=Mallanna&family=Ramabhadra&family=Roboto:wght@400;500;700&display=swap');

:root {
	--ncp-bg: #ece7da;
	--ncp-paper: #fffdfa;
	--ncp-ink: #111111;
	--ncp-muted: #6a665d;
	--ncp-headline: #9f1d1d;
	--ncp-divider: #dad2bf;
	--ncp-title-font: 'Roboto', 'Ramabhadra', 'Mallanna', sans-serif;
	--ncp-description-font: 'Roboto', 'Ramabhadra', 'Mallanna', sans-serif;
}

.ncp-clipping {
	position: relative;
	margin: 2rem auto;
	max-width: 900px;
	font-family: 'Roboto', 'Ramabhadra', 'Mallanna', sans-serif;
	color: var(--ncp-ink);
}

.ncp-generate-clip-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0 0 1rem;
	padding: 1.65rem 1.35rem;
	border: 1px solid rgba(159, 29, 29, 0.18);
	background:
		linear-gradient(135deg, rgba(159, 29, 29, 0.96), rgba(121, 15, 15, 0.9)),
		linear-gradient(135deg, #fffdfa 0%, #f4eee0 100%);
	box-shadow: 0 22px 42px rgba(159, 29, 29, 0.28);
	border-radius: 18px;
}

.ncp-generate-clip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: linear-gradient(180deg, #ffffff 0%, #f6efe0 100%);
	font-size: 1.08rem;
	font-weight: 700;
	padding: 1.12rem 2.15rem;
	min-height: 68px;
	min-width: 360px;
	color: #9f1d1d;
	box-shadow: 0 16px 30px rgba(18, 18, 18, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
	cursor: pointer;
	letter-spacing: 0.02em;
	text-transform: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ncp-generate-clip-btn::before {
	content: 'Clip';
	font-size: 0.86rem;
	font-weight: 900;
	line-height: 1;
	color: #ffffff;
	background: #9f1d1d;
	padding: 0.32rem 0.5rem;
	border-radius: 999px;
	box-shadow: 0 0 0 4px rgba(159, 29, 29, 0.14);
}

.ncp-generate-clip-btn:hover {
	transform: translateY(-2px) scale(1.015);
	background: linear-gradient(180deg, #fff7ec 0%, #efe0c9 100%);
	color: #7c1414;
	box-shadow: 0 20px 36px rgba(18, 18, 18, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.ncp-generate-clip-btn:active {
	transform: translateY(0) scale(0.995);
}

.ncp-generate-clip-btn:disabled {
	opacity: 0.75;
	cursor: wait;
}

.ncp-clipping-canvas {
	background: var(--ncp-paper);
	border: 1px solid var(--ncp-divider);
	box-shadow: 0 10px 26px rgba(22, 22, 22, 0.12);
	padding: 1.2rem 1.2rem 1.5rem;
}

.ncp-masthead {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	padding-bottom: 0.7rem;
	border-bottom: 2px solid var(--ncp-ink);
}

.ncp-source {
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ncp-source-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 76px;
	flex: 1 1 35%;
}

.ncp-branding-logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 140px;
	max-width: 100%;
	object-fit: contain;
}

.ncp-banner {
	background: var(--ncp-headline);
	color: #ffffff;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0.35rem 0.6rem;
	text-transform: uppercase;
}

.ncp-meta {
	margin-top: 0.8rem;
	padding: 0.7rem 0.8rem;
	background: #274f51;
	color: #ffffff;
	font-size: 0.95rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.ncp-meta-date strong {
	font-weight: 800;
}

.ncp-meta-edition {
	font-weight: 700;
}

.ncp-title {
	margin: 0.8rem 0 1rem;
	font-size: 58px;
	line-height: 1.2;
	color: var(--ncp-headline);
	font-family: var(--ncp-title-font);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ncp-description {
	margin: 0 0 1rem;
	font-size: 1.02rem;
	line-height: 1.7;
	color: #2a2a2a;
	font-weight: 500;
	padding-left: 0.8rem;
	border-left: 3px solid rgba(159, 29, 29, 0.3);
	font-family: var(--ncp-description-font);
}

.ncp-featured-image-wrap {
	margin: 0 0 1rem;
}

.ncp-featured-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: cover;
	border: 1px solid var(--ncp-divider);
}

.ncp-article-body {
	font-size: 1rem;
	line-height: 1.7;
	column-gap: 1.25rem;
	column-fill: balance;
	column-rule: 1px solid rgba(0, 0, 0, 0.08);
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
}

.ncp-article-body p,
.ncp-article-body li {
	text-align: justify;
	margin: 0 0 1rem;
	break-inside: auto;
}

.ncp-article-body figure,
.ncp-article-body img,
.ncp-article-body blockquote,
.ncp-article-body table,
.ncp-article-body h2,
.ncp-article-body h3,
.ncp-article-body h4 {
	break-inside: avoid;
	column-break-inside: avoid;
	page-break-inside: avoid;
}

.ncp-article-body img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0.25rem 0 1rem;
}

.ncp-article-body h2,
.ncp-article-body h3,
.ncp-article-body h4 {
	margin: 0 0 0.75rem;
	line-height: 1.3;
}

.ncp-footer {
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--ncp-divider);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.8rem;
}

.ncp-copyright {
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--ncp-muted);
	font-style: italic;
}

.ncp-columns-2 {
	column-count: 2;
}

.ncp-columns-3 {
	column-count: 3;
}

.ncp-columns-1 {
	column-count: 1;
}

.ncp-article-body > * {
	break-inside: auto;
	margin-top: 0;
}

.ncp-floating-actions {
	position: sticky;
	top: 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.6rem;
	margin-bottom: 0.9rem;
	padding: 0.85rem;
	border: 1px solid rgba(159, 29, 29, 0.14);
	background: linear-gradient(135deg, rgba(255, 253, 250, 0.98), rgba(244, 238, 224, 0.96));
	box-shadow: 0 12px 28px rgba(18, 18, 18, 0.08);
	border-radius: 18px;
	z-index: 2;
}

.ncp-floating-actions--footer {
	position: static;
	margin-top: 1rem;
	margin-bottom: 0;
}

.ncp-action-btn,
.ncp-select-control {
	border: 1px solid rgba(159, 29, 29, 0.18);
	background: linear-gradient(180deg, #ffffff 0%, #f3ead7 100%);
	color: #8f1919;
	padding: 0.8rem 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	min-height: 48px;
	border-radius: 999px;
	box-shadow: 0 8px 16px rgba(18, 18, 18, 0.08);
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ncp-action-btn:hover,
.ncp-select-control:hover {
	background: linear-gradient(180deg, #fff7ee 0%, #ecd8bd 100%);
	color: #751414;
	transform: translateY(-1px);
	box-shadow: 0 12px 22px rgba(18, 18, 18, 0.12);
}

.ncp-action-btn[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.ncp-select-control {
	appearance: none;
	padding-right: 2.2rem;
	background-image: linear-gradient(45deg, transparent 50%, #8f1919 50%), linear-gradient(135deg, #8f1919 50%, transparent 50%);
	background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.ncp-action-btn {
	min-width: 110px;
}

.ncp-action-btn[data-ncp-action="download"] {
	background: linear-gradient(180deg, #9f1d1d 0%, #801616 100%);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.08);
}

.ncp-action-btn[data-ncp-action="download"]:hover {
	background: linear-gradient(180deg, #af2020 0%, #8c1818 100%);
	color: #ffffff;
}

.ncp-action-btn[data-ncp-action="share"] {
	background: linear-gradient(180deg, #fffdfa 0%, #f1eadf 100%);
}

.ncp-action-btn[data-ncp-action="print"] {
	background: linear-gradient(180deg, #f8f8f8 0%, #e6e6e6 100%);
	color: #5b5b5b;
}

.ncp-short-link {
	font-size: 0.82rem;
	font-weight: 700;
	color: #7f1515;
	text-decoration: none;
	white-space: nowrap;
}

.ncp-short-link:hover {
	text-decoration: underline;
}

.ncp-qr-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	min-width: 140px;
	padding: 0.2rem 0;
}

.ncp-banner-center {
	display: flex;
	justify-content: center;
	align-items: center;
	flex: 1 1 35%;
	min-height: 76px;
	padding: 0.2rem 0.6rem;
}

.ncp-banner-strip-image {
	display: block;
	max-width: 100%;
	max-height: 76px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ncp-qr-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 110px;
	min-height: 110px;
	padding: 0.35rem;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 8px 18px rgba(18, 18, 18, 0.06);
}

.ncp-qr-image {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: contain;
}

.ncp-qr-title {
	font-size: 0.74rem;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	color: #202020;
}

.ncp-qr-title-top {
	margin-bottom: 0.15rem;
}

.ncp-qr-title-bottom {
	margin-top: 0.15rem;
}

body.ncp-modal-open {
	overflow: hidden;
}

.ncp-clip-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.2rem;
	z-index: 99999;
}

.ncp-clip-modal.is-open {
	display: flex;
}

.ncp-clip-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.56);
	backdrop-filter: blur(2px);
}

.ncp-clip-modal__dialog {
	position: relative;
	width: min(1240px, calc(100vw - 2rem));
	height: min(88vh, 920px);
	background: #ffffff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(159, 29, 29, 0.2);
	display: grid;
	grid-template-rows: auto 1fr;
	z-index: 1;
}

.ncp-clip-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0.95rem;
	border-bottom: 1px solid #ece6d7;
	background: linear-gradient(180deg, #fffdfa 0%, #f5efdf 100%);
}

.ncp-clip-modal__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #7f1515;
}

.ncp-clip-modal__close {
	border: 1px solid rgba(159, 29, 29, 0.25);
	background: #ffffff;
	color: #7f1515;
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
}

.ncp-clip-modal__frame {
	width: 100%;
	height: 100%;
	border: 0;
	background: #f7f7f7;
}

@media (max-width: 1024px) {
	.ncp-clipping {
		max-width: 92%;
	}

	.ncp-columns-3 {
		column-count: 2;
	}
}

@media (max-width: 767px) {
	.ncp-generate-clip-wrap {
		flex-direction: column;
		align-items: center;
		padding: 1rem;
	}

	.ncp-generate-clip-btn {
		width: 100%;
		min-width: 0;
	}

	.ncp-title {
		font-size: 38px;
	}

	.ncp-meta {
		flex-direction: column;
		align-items: flex-start;
	}

	.ncp-masthead {
		flex-direction: column;
		align-items: flex-start;
	}

	.ncp-banner-center {
		width: 100%;
		justify-content: flex-start;
		padding-left: 0;
	}

	.ncp-qr-block {
		align-self: flex-end;
	}

	.ncp-floating-actions {
		position: static;
		justify-content: flex-start;
		padding: 0.75rem;
	}

	.ncp-action-btn,
	.ncp-select-control {
		width: 100%;
		justify-content: center;
	}

	.ncp-clipping-canvas {
		padding: 0.95rem;
	}

	.ncp-article-body,
	.ncp-columns-1,
	.ncp-columns-2,
	.ncp-columns-3 {
		column-count: 1;
	}

	.ncp-footer {
		flex-direction: column;
		align-items: flex-start;
	}

	.ncp-clip-modal {
		padding: 0.35rem;
	}

	.ncp-clip-modal__dialog {
		width: calc(100vw - 0.7rem);
		height: calc(100vh - 0.7rem);
		border-radius: 14px;
	}
}

@media print {
	.ncp-floating-actions {
		display: none !important;
	}

	.ncp-clipping {
		margin: 0;
		max-width: 100%;
	}

	.ncp-clipping-canvas {
		border: 0;
		box-shadow: none;
		padding: 0;
	}
}
