/*
Theme Name: NE Times
Theme URI: https://thenetimes.in/
Author: Dhanvi Gupta
Description: Newsroom theme for The NE Times, carrying the design of the original Next.js build into WordPress — the house red, Playfair Display headlines and Inter body. Serves thenetimes.in and thenetimes.com, which ship an identical stylesheet. Pairs with the Sitecraft Blocks plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ne-times
*/

/* Read back out of the live Tailwind build rather than guessed. The masthead red
   is rgb(200 16 46) and appears as background, text and rule colour throughout. */
:root {
	--red:        #c8102e;
	--red-dark:   #a30d26;
	--red-bright: #e11d33;
	--ink:        #16161a;
	--ink-black:  #0b0b0d;
	--muted:      #696973;
	--muted-2:    #84848f;
	--line:       #d1d1d6;
	--line-soft:  #e7e7e9;
	--paper:      #ffffff;
	--cream:      #fbfaf7;
	--grey:       #f6f6f7;

	--font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-sans:  Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

	--wrap: 1200px;
	--measure: 68ch;
	--radius: 4px;   /* newsprint, not app chrome - keep corners tight */
}

/* Retune the plugin's blocks to the newsroom palette. */
:root {
	--sc-ink:    var(--ink);
	--sc-deep:   var(--ink-black);
	--sc-accent: var(--red);
	--sc-muted:  var(--muted);
	--sc-paper:  var(--cream);
	--sc-line:   var(--line);
	--sc-wrap:   var(--wrap);
	--sc-r:      var(--radius);
}
.sc-tone-light { background: var(--paper);     color: var(--ink); }
.sc-tone-paper { background: var(--cream);     color: var(--ink); }
.sc-tone-dark  { background: var(--ink-black); color: #fff; }
.sc-tone-dark .sc-stat__v { color: var(--red-bright); }
.sc-card { background: var(--paper); border-color: var(--line); }
.sc-btn  { color: #fff; }
.sc-hero__title, .sc-head__title, .sc-cta__title { font-family: var(--font-serif); }

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-sans);
	background: var(--paper);
	color: var(--ink);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

.container {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 20px;
}

a { color: var(--red-dark); }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
pre {
	padding: 16px 18px;
	overflow-x: auto;
	border: 1px solid var(--line);
	background: var(--grey);
}
code { padding: 2px 6px; background: var(--grey); }
pre code { padding: 0; background: none; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 10px 16px;
	background: var(--red);
	color: #fff;
	font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* masthead ----------------------------------------------------------------- */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(255, 255, 255, .95);
	backdrop-filter: blur(10px);
	border-bottom: 2px solid var(--ink);
}
.site-nav .container {
	display: flex;
	align-items: center;
	gap: 26px;
	height: 64px;
}
.site-nav .nm {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -.02em;
	text-decoration: none;
	color: var(--ink);
	white-space: nowrap;
}
.site-nav .nm span { color: var(--red); }

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	color: var(--ink);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.site-nav a:hover { color: var(--red); }

.site-nav .mail {
	margin-left: auto;
	color: var(--red);
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none;
	white-space: nowrap;
	text-transform: none;
}

@media (max-width: 900px) {
	.site-nav ul { display: none; }
}

/* article ------------------------------------------------------------------ */

.site-main { padding-block: 40px 72px; }

.entry-title {
	font-family: var(--font-serif);
	font-size: clamp(32px, 5.2vw, 52px);
	line-height: 1.08;
	letter-spacing: -.02em;
	margin: 0 0 14px;
	max-width: 22ch;
	color: var(--ink);
}
.entry-meta {
	margin-bottom: 30px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
	font-size: 13.5px;
	letter-spacing: .02em;
}

.entry-content { max-width: var(--measure); font-size: 17.5px; }
.is-home .entry-content { max-width: none; }

.entry-content > * + * { margin-top: 1.25em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--font-serif);
	color: var(--ink);
	letter-spacing: -.015em;
	margin-bottom: .4em;
}
.entry-content h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; }
.entry-content h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.2; margin-top: 1.9em; }
.entry-content h3 { font-size: 21px; line-height: 1.3; margin-top: 1.6em; }
.entry-content p  { color: #2a2a30; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; color: #2a2a30; }
.entry-content li + li { margin-top: .4em; }
.entry-content a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--ink); }

/* pull-quote styling - standard in a news column */
.entry-content blockquote {
	margin-inline: 0;
	padding: 6px 0 6px 22px;
	border-left: 4px solid var(--red);
	font-family: var(--font-serif);
	font-size: 1.22em;
	line-height: 1.45;
	color: var(--ink);
}
.entry-content blockquote p { margin: 0; }

.entry-content hr { margin-block: 2.6em; border: 0; border-top: 1px solid var(--line); }

.entry-content table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.entry-content th, .entry-content td {
	padding: 10px 13px;
	border: 1px solid var(--line);
	text-align: left;
}
.entry-content th { background: var(--grey); font-weight: 600; }

.btn {
	display: inline-block;
	padding: 12px 24px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: .02em;
	text-decoration: none;
	cursor: pointer;
	transition: .15s;
}
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); color: #fff; }
.btn.outline { border-color: var(--ink); color: var(--ink); }

/* listings ----------------------------------------------------------------- */

.card-list {
	display: grid;
	gap: 0;
	grid-template-columns: 1fr;
	margin-top: 24px;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--line);
}
.card-list li {
	padding: 20px 0;
	border-bottom: 1px solid var(--line-soft);
}
.card-list h2 {
	font-family: var(--font-serif);
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.24;
	letter-spacing: -.01em;
}
.card-list h2 a { text-decoration: none; color: var(--ink); }
.card-list h2 a:hover { color: var(--red); }
.card-list p { margin: 0; color: var(--muted); font-size: 15.5px; }

@media (min-width: 820px) {
	.card-list { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
}

.pagination { margin-top: 36px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
	font-size: 14.5px;
	color: var(--ink);
}
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* footer ------------------------------------------------------------------- */

.site-footer {
	margin-top: 60px;
	padding-block: 30px;
	border-top: 3px solid var(--ink);
	background: var(--cream);
	color: var(--muted);
	font-size: 14px;
}

/* WordPress core bits ------------------------------------------------------ */

.alignwide   { max-width: 1320px; margin-inline: auto; }
.alignfull   { max-width: none; margin-inline: calc(50% - 50vw); width: 100vw; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, .wp-element-caption {
	color: var(--muted);
	font-size: 13px;
	text-align: left;
	padding-top: 6px;
}
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

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