/* =========================================================
   TPWonder Theme — Main Stylesheet
   NYT-inspired editorial design, minimal, bilingual & responsive
   ========================================================= */

:root {
	--tpw-accent: #b0121a;
	--tpw-ink: #121212;
	--tpw-ink-soft: #333333;
	--tpw-muted: #6b6b6b;
	--tpw-border: #e2e2e2;
	--tpw-bg: #ffffff;
	--tpw-bg-alt: #f7f5f0;
	--tpw-box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	--tpw-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--tpw-font-serif-body: 'Source Serif 4', Georgia, serif;
	--tpw-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--tpw-font-devanagari: 'Noto Sans Devanagari', 'Noto Serif Devanagari', sans-serif;
	--tpw-font-devanagari-heading: 'Noto Serif Devanagari', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
	margin: 0;
	font-family: var(--tpw-font-serif-body);
	color: var(--tpw-ink);
	background: var(--tpw-bg-alt);
	line-height: 1.55;
	overflow-x: hidden;
}

body.lang-hi, .lang-hi { font-family: var(--tpw-font-devanagari); }

img { max-width: 100%; height: auto; display: block; }
video, embed, object { max-width: 100%; }
.entry-content video, .entry-content embed, .entry-content object {
	width: 100%;
	height: auto;
}

/* ---- Responsive video/embeds (YouTube, Vimeo, pasted oEmbed URLs, etc.) ----
   WordPress wraps oEmbeds in a .wp-embed-aspect-16-9 (or the block editor's
   .wp-block-embed__wrapper) div and renders the <iframe> inside it with
   inline position:absolute + width/height:100%. That only works if the
   WRAPPER has real height, so we give the wrapper an aspect-ratio here —
   this is what keeps the video visible and correctly sized on every
   screen size, including phones, instead of collapsing to 0 height. */
.entry-content .wp-embed-aspect-16-9,
.entry-content .wp-block-embed__wrapper,
.tpw-video-wrapper .wp-embed-aspect-16-9,
.tpw-video-wrapper .wp-block-embed__wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
}
.entry-content .wp-embed-aspect-16-9 iframe,
.entry-content .wp-block-embed__wrapper iframe,
.tpw-video-wrapper .wp-embed-aspect-16-9 iframe,
.tpw-video-wrapper .wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
/* Plain, unwrapped iframes (embed code pasted directly, no WP wrapper div) */
.entry-content iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 4px;
	max-width: 100%;
}
figure { margin: 0 0 22px; max-width: 100%; }
figure img, figure video { width: 100%; height: auto; }
table { max-width: 100%; display: block; overflow-x: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tpw-accent); }
/* UI chrome (menus, cards, widgets) is unstyled by default; real bulleted/
   numbered lists inside article content keep their bullets — see the
   .entry-content ul/ol rules below. */
ul, ol { list-style: none; margin: 0; padding: 0; }
.entry-content ul { list-style: disc; margin: 0 0 22px 1.4em; padding: 0; }
.entry-content ol { list-style: decimal; margin: 0 0 22px 1.4em; padding: 0; }
.entry-content ul ul { list-style: circle; margin-bottom: 0; }
.entry-content ol ol, .entry-content ul ol { margin-bottom: 0; }
.entry-content li { margin-bottom: 8px; }

.tpw-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
	width: 100%;
}

.screen-reader-text { position: absolute; left: -9999px; }

/* Topbar */
/* Topbar — NYT-style slim utility strip: search icon + date on the left,
   language switch on the right, light background with a hairline rule. */
.tpw-topbar { background: var(--tpw-bg); color: var(--tpw-ink-soft); font-family: var(--tpw-font-sans); font-size: 12px; border-bottom: 1px solid var(--tpw-border); }
.tpw-topbar__inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; flex-wrap: wrap; gap: 10px; }
.tpw-topbar__left { display: flex; align-items: center; gap: 14px; }
.tpw-topbar__search-icon { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--tpw-ink); padding: 2px; line-height: 1; }
.tpw-topbar__date { color: var(--tpw-muted); }
.tpw-topbar__lang-switch a { color: var(--tpw-ink-soft); padding: 0 4px; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .5px; }
.tpw-topbar__lang-switch a.is-active { color: var(--tpw-ink); border-bottom: 2px solid var(--tpw-accent); }
.tpw-topbar__sep { color: var(--tpw-border); }

/* Collapsible search bar, revealed by the topbar search icon */
.tpw-search-form--collapsed { max-height: 0; overflow: hidden; background: var(--tpw-bg-alt); border-bottom: 0 solid var(--tpw-border); transition: max-height .22s ease, border-bottom-width .22s ease; }
.tpw-search-form--collapsed.is-open { max-height: 70px; border-bottom-width: 1px; }
.tpw-search-form__inner { display: flex; align-items: center; gap: 8px; padding: 12px 20px; }
.tpw-search-form__inner .tpw-search-input { flex: 1; border: 1px solid var(--tpw-border); padding: 9px 12px; font-size: 14px; font-family: var(--tpw-font-sans); outline: none; }
.tpw-search-form__inner .tpw-search-submit { border: 0; background: var(--tpw-ink); color: #fff; padding: 9px 16px; cursor: pointer; font-size: 14px; }

/* Masthead */
.tpw-masthead { border-bottom: 1px solid var(--tpw-ink); background: var(--tpw-bg); }
.tpw-masthead__inner { text-align: center; padding: 28px 20px 18px; }
.tpw-brand-link { display: inline-block; max-width: 100%; }
.tpw-brand-wordmark {
	font-family: var(--tpw-font-serif);
	font-weight: 900;
	font-size: clamp(28px, 7vw, 52px);
	letter-spacing: -1px;
	color: var(--tpw-ink);
	line-height: 1;
}
.tpw-brand-wordmark.is-hindi {
	font-family: var(--tpw-font-devanagari-heading);
	font-weight: 700;
	letter-spacing: 0;
	font-size: clamp(26px, 6.5vw, 48px);
}
.tpw-brand-logo-img { max-height: 80px; margin: 0 auto; }
.tpw-brand-tagline { font-family: var(--tpw-font-sans); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--tpw-muted); margin-top: 6px; }
.lang-hi .tpw-brand-tagline { font-family: var(--tpw-font-devanagari); text-transform: none; letter-spacing: 0; }

/* Primary nav — a double hairline underneath, NYT-style */
.tpw-primary-nav { border-top: 1px solid var(--tpw-border); border-bottom: 3px double var(--tpw-ink); background: var(--tpw-bg); position: relative; z-index: 20; }
.tpw-primary-nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; flex-wrap: wrap; gap: 8px; }
.primary-menu { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--tpw-font-sans); }
.primary-menu > li { position: relative; }
.primary-menu > li > a {
	display: block;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: var(--tpw-ink-soft);
}
.lang-hi .primary-menu > li > a { text-transform: none; font-family: var(--tpw-font-devanagari); font-weight: 600; }
.primary-menu > li > a:hover { color: var(--tpw-accent); }
.primary-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--tpw-bg); border: 1px solid var(--tpw-border); min-width: 200px; box-shadow: var(--tpw-box-shadow); }
.primary-menu li:hover > .sub-menu { display: block; }
.primary-menu .sub-menu a { padding: 10px 14px; white-space: nowrap; }

/* Icon-only menu button, styled to match the search icon button next to it */
.tpw-menu-toggle {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 32px;
	height: 32px;
	font-size: 18px;
	line-height: 1;
	color: var(--tpw-ink);
}
.tpw-menu-toggle__icon { display: none; }
.tpw-menu-toggle__icon--open { display: inline-block; }
.tpw-menu-toggle[aria-expanded="true"] .tpw-menu-toggle__icon--open { display: none; }
.tpw-menu-toggle[aria-expanded="true"] .tpw-menu-toggle__icon--close { display: inline-block; }

/* Breaking scroll — static NYT "LIVE"-style row: bold red label + the
   single latest headline from a configured category. Exactly one
   headline, so it always fits and stays on ONE horizontal line on every
   device — the headline itself truncates with an ellipsis if it's too
   long for the available width, rather than wrapping or overflowing. */
.tpw-breaking-scroll { background: var(--tpw-bg); border-bottom: 1px solid var(--tpw-border); }
.tpw-breaking-scroll__inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 14px; padding: 10px 0; min-width: 0; }
.tpw-breaking-scroll__label { flex: 0 0 auto; font-family: var(--tpw-font-sans); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 13px; color: var(--tpw-accent); white-space: nowrap; }
.tpw-breaking-scroll__label::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tpw-accent); margin-right: 7px; vertical-align: middle; }
.tpw-breaking-scroll__headline { flex: 1 1 auto; min-width: 0; font-family: var(--tpw-font-sans); font-weight: 600; font-size: 14px; color: var(--tpw-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpw-breaking-scroll__headline:hover { text-decoration: underline; }
.lang-hi .tpw-breaking-scroll__headline { font-family: var(--tpw-font-devanagari); }
@media (max-width: 640px) {
	.tpw-breaking-scroll__inner { gap: 10px; padding: 8px 0; }
	.tpw-breaking-scroll__label { font-size: 12px; }
	.tpw-breaking-scroll__headline { font-size: 13px; }
}

/* Hero */
.tpw-hero { border-bottom: 1px solid var(--tpw-border); padding: 30px 0; background: var(--tpw-bg); }
.tpw-hero__thumb { display: block; margin-bottom: 18px; overflow: hidden; border-radius: 2px; }
.tpw-hero__thumb img { width: 100%; }
.tpw-hero__title { font-family: var(--tpw-font-serif); font-size: clamp(26px, 4.4vw, 42px); line-height: 1.1; margin: 8px 0 14px; }
.lang-hi .tpw-hero__title { font-family: var(--tpw-font-devanagari-heading); }
.tpw-hero__excerpt { font-size: clamp(16px, 2vw, 19px); color: var(--tpw-ink-soft); max-width: 760px; margin-bottom: 12px; }

.tpw-card__kicker {
	display: inline-block;
	font-family: var(--tpw-font-sans);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--tpw-accent);
	margin-bottom: 6px;
}
.lang-hi .tpw-card__kicker { text-transform: none; font-family: var(--tpw-font-devanagari); font-weight: 600; }

.entry-meta { font-family: var(--tpw-font-sans); font-size: 12px; color: var(--tpw-muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ Featured strip (image-led row under hero) ============ */
.tpw-featured-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	padding: 24px 0;
}
.tpw-card--featured { background: var(--tpw-bg); border: 1px solid var(--tpw-border); overflow: hidden; display: flex; flex-direction: column; }
.tpw-card--featured .tpw-card__thumb { margin-bottom: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.tpw-card--featured .tpw-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpw-card--featured .tpw-card__body { padding: 12px 14px 16px; }
.tpw-card--featured .tpw-card__title { font-size: 17px; }

/* Placeholder block for posts without a featured image, so grids stay tidy */
.tpw-card__thumb--placeholder { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--tpw-bg-alt), var(--tpw-border)); }

/* ============ Boxed sections (front page + category pages) ============ */
.tpw-front-grid { display: grid; grid-template-columns: 2.4fr 1fr; gap: 30px; padding: 10px 20px 50px; align-items: start; }
.tpw-front-sidebar { position: sticky; top: 20px; }

.tpw-box {
	background: var(--tpw-bg);
	border: 1px solid var(--tpw-border);
	padding: 20px;
	margin-bottom: 28px;
}
.tpw-box__head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 3px solid var(--tpw-ink); padding-bottom: 10px; margin-bottom: 16px; flex-wrap: wrap; gap: 6px; }
.tpw-box__title { font-family: var(--tpw-font-serif); font-size: 22px; margin: 0; }
.lang-hi .tpw-box__title { font-family: var(--tpw-font-devanagari-heading); }
.tpw-box__more { font-family: var(--tpw-font-sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--tpw-accent); }

.tpw-box__grid { display: grid; grid-template-columns: 1.3fr repeat(2, 1fr); gap: 20px; }
.tpw-box__grid .tpw-card--featured { grid-row: span 2; }
.tpw-box__grid .tpw-card--featured .tpw-card__thumb { aspect-ratio: 16 / 11; }
.tpw-box__grid .tpw-card--featured .tpw-card__title { font-size: 21px; }
.tpw-box__grid .tpw-card--medium { display: flex; flex-direction: column; }
.tpw-box__grid .tpw-card--medium .tpw-card__thumb { aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 8px; }
.tpw-box__grid .tpw-card--medium .tpw-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.tpw-card__title { font-family: var(--tpw-font-serif); font-size: 19px; line-height: 1.25; margin: 0 0 8px; }
.lang-hi .tpw-card__title { font-family: var(--tpw-font-devanagari-heading); font-size: 18px; }
.tpw-card__excerpt { font-size: 14px; color: var(--tpw-ink-soft); margin-bottom: 8px; }
.tpw-card__meta { font-family: var(--tpw-font-sans); font-size: 11px; color: var(--tpw-muted); text-transform: uppercase; }
.tpw-card__thumb { display: block; margin-bottom: 10px; overflow: hidden; }
.tpw-card__thumb img { transition: transform .3s ease; }
.tpw-card__thumb:hover img { transform: scale(1.04); }
.tpw-card--list { display: flex; gap: 20px; border-bottom: 1px solid var(--tpw-border); padding-bottom: 20px; margin-bottom: 20px; }
.tpw-card--list .tpw-card__thumb { flex: 0 0 220px; margin-bottom: 0; aspect-ratio: 4/3; overflow: hidden; }
.tpw-card--list .tpw-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpw-card--list .tpw-card__body { flex: 1; min-width: 0; }

.tpw-card--list-compact { display: flex; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--tpw-border); }
.tpw-card--list-compact:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tpw-card--list-compact .tpw-card__thumb { flex: 0 0 110px; margin-bottom: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: 3px; }
.tpw-card--list-compact .tpw-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpw-card--list-compact .tpw-card__body { flex: 1; min-width: 0; }
.tpw-card--list-compact .tpw-card__title { font-size: 15px; margin: 0; }

/* ============ Featured category boxes (legacy, still used where called) ============ */
.tpw-featured-categories { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 0 6px; }
.tpw-featured-categories--one { grid-template-columns: 1fr; }
.tpw-box--featured-cat { margin-bottom: 0; }
.tpw-featured-cat__layout { display: flex; flex-direction: column; gap: 4px; }
.tpw-featured-cat__layout .tpw-card--featured { box-shadow: none; border: 0; margin-bottom: 14px; }
.tpw-featured-cat__layout .tpw-card--featured .tpw-card__thumb { aspect-ratio: 16 / 10; }
.tpw-featured-cat__layout .tpw-card--featured .tpw-card__title { font-size: 20px; }

/* ============ Digest sections (front-page standard format) ============
   1 image-led lead post + 2 headline links (with author/date), per category. */
.tpw-box--digest { margin-bottom: 22px; }
.tpw-digest__layout .tpw-card--featured,
.tpw-digest__layout .tpw-card--video,
.tpw-digest__layout .tpw-card--medium {
	box-shadow: none;
	border: 0;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--tpw-border);
}
.tpw-digest__layout .tpw-card--featured .tpw-card__thumb,
.tpw-digest__layout .tpw-card--video .tpw-card__thumb,
.tpw-digest__layout .tpw-card--medium .tpw-card__thumb { aspect-ratio: 16 / 9; margin-bottom: 10px; }
.tpw-digest__layout .tpw-card--featured .tpw-card__title,
.tpw-digest__layout .tpw-card--video .tpw-card__title { font-size: 20px; }
.tpw-digest__layout .tpw-card--medium .tpw-card__title { font-size: 17px; }

.tpw-digest__headlines { display: flex; flex-direction: column; }
.tpw-digest__headlines li { padding: 10px 0; border-bottom: 1px solid var(--tpw-border); }
.tpw-digest__headlines li:last-child { border-bottom: 0; padding-bottom: 0; }
.tpw-digest__headlines a { font-family: var(--tpw-font-serif-body); font-size: 15px; line-height: 1.35; display: block; }
.lang-hi .tpw-digest__headlines a { font-family: var(--tpw-font-devanagari); }

/* Compact author/date/updated line — used inside cards and headline items */
.tpw-compact-meta { font-family: var(--tpw-font-sans); font-size: 11px; color: var(--tpw-muted); text-transform: uppercase; letter-spacing: .2px; display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.tpw-compact-meta__sep { color: var(--tpw-border); }
.tpw-compact-meta__updated { color: var(--tpw-accent); }
.tpw-digest__headline-meta { margin-top: 4px; }

/* Sidebar digest box (e.g. "Opinion"): single column, tighter type */
.tpw-box--digest-sidebar .tpw-digest__layout .tpw-card--medium .tpw-card__title { font-size: 16px; }
.tpw-box--digest-sidebar .tpw-digest__headlines a { font-size: 14px; }

/* Front page main column lays digest boxes out two-up on wide screens for
   a magazine feel, but each box itself still reads top-to-bottom. */
.tpw-front-main { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-content: start; }
.tpw-front-main > .tpw-box { grid-column: span 1; }

/* ============ Video card + badge ============ */
.tpw-card__thumb--video { position: relative; }
.tpw-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(18,18,18,0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.tpw-video-badge {
	display: inline-block;
	background: var(--tpw-ink);
	color: #fff;
	font-family: var(--tpw-font-sans);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	padding: 3px 8px;
	border-radius: 2px;
	margin-left: 8px;
	vertical-align: middle;
}
.tpw-box__grid--video { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tpw-box__grid--video .tpw-card--video .tpw-card__thumb { aspect-ratio: 16 / 9; }

/* Video single post: full-width responsive embed. Wrapped oEmbeds/blocks
   are handled by the .tpw-video-wrapper .wp-embed-aspect-16-9 rules above;
   this covers a plain, unwrapped iframe/video pasted straight into the
   post, and general spacing so the video reads as the page's hero. */
.tpw-video-wrapper { margin: 20px 0; }
.tpw-video-wrapper iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 4px;
	display: block;
	max-width: 100%;
}
.tpw-video-wrapper video {
	width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
}
.tpw-video-wrapper p:empty { margin: 0; }

.tpw-box--sidebar { margin-bottom: 28px; }

/* ============ NYT-style top grid (Breaking, category-page top) ============
   Left column: 1 wide-image lead + 2 small-thumb items, stacked with
   horizontal hairlines. Right column: 2 small-thumb items. A vertical
   hairline separates the two columns — modeled on the New York Times
   homepage's top story grid. */
.tpw-nyt-grid-section { padding: 28px 0; border-bottom: 1px solid var(--tpw-border); background: var(--tpw-bg); }
.tpw-nyt-grid-section__head { border-bottom: 3px solid var(--tpw-ink); margin-bottom: 20px; padding-bottom: 8px; }
/* Featured section: no heading bar, so a top hairline demarcates it instead. */
.tpw-nyt-grid-section--no-heading { border-top: 1px solid var(--tpw-border); padding-top: 24px; }
.tpw-nyt-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0; }
/* Fewer than 4 posts in the category: single stacked column, no vertical
   divider, no empty right-hand gap. */
.tpw-nyt-grid--single { grid-template-columns: 1fr; max-width: 640px; }
.tpw-nyt-grid--single .tpw-nyt-grid__col--left { border-right: 0; padding-right: 0; }
.tpw-nyt-grid__col--left { padding-right: 28px; border-right: 1px solid var(--tpw-border); }
.tpw-nyt-grid__col--right { padding-left: 28px; }

.tpw-nyt-item { padding: 18px 0; border-bottom: 1px solid var(--tpw-border); display: flex; gap: 16px; align-items: flex-start; }
.tpw-nyt-grid__col > .tpw-nyt-item:first-child { padding-top: 0; }
.tpw-nyt-grid__col > .tpw-nyt-item:last-child { border-bottom: 0; padding-bottom: 0; }

.tpw-nyt-item--wide { flex-direction: column; }
.tpw-nyt-item--wide .tpw-nyt-item__thumb { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.tpw-nyt-item--wide .tpw-nyt-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpw-nyt-item--wide .tpw-nyt-item__title { font-size: 26px; }

.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__thumb { flex: 0 0 110px; aspect-ratio: 4 / 3; overflow: hidden; }
.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__body { flex: 1; min-width: 0; }
.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__title { font-size: 17px; }

.tpw-nyt-item__title { font-family: var(--tpw-font-serif); line-height: 1.2; margin: 6px 0 8px; }
.lang-hi .tpw-nyt-item__title { font-family: var(--tpw-font-devanagari-heading); }
.tpw-nyt-item__meta { margin-top: 4px; }

.widget { margin-bottom: 34px; }
.widget-title { font-family: var(--tpw-font-sans); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--tpw-ink); padding-bottom: 8px; margin-bottom: 14px; }
.tpw-list li, .tpw-list--numbered li { padding: 10px 0; border-bottom: 1px solid var(--tpw-border); font-size: 15px; }
.tpw-list--numbered { counter-reset: tpw-counter; }
.tpw-list--numbered li { counter-increment: tpw-counter; display: flex; gap: 10px; }
.tpw-list--numbered li::before { content: counter(tpw-counter); font-family: var(--tpw-font-serif); font-weight: 700; color: var(--tpw-accent); font-size: 18px; flex: 0 0 auto; }

/* ============ Category page ============ */
.tpw-archive-header--cat { background: var(--tpw-bg); border-bottom: 3px solid var(--tpw-ink); padding: 20px 0; margin: 0; }
.tpw-archive-grid--cat { display: grid; grid-template-columns: 2.4fr 1fr; gap: 30px; align-items: start; }

/* ============ Generic archive/single ============ */
.tpw-archive-grid { display: grid; grid-template-columns: 2.4fr 1fr; gap: 40px; padding: 30px 0 50px; align-items: start; }
.tpw-page-title { font-family: var(--tpw-font-serif); font-size: clamp(24px, 4vw, 34px); border-bottom: 3px solid var(--tpw-ink); padding-bottom: 14px; margin-bottom: 10px; }

/* ============ Single post — centered column ============ */
.tpw-single--centered { padding: 30px 20px 60px; }
.tpw-single-main {
	max-width: 760px;
	margin: 0 auto;
	background: var(--tpw-bg);
	padding: 30px clamp(16px, 4vw, 50px) 40px;
	border-radius: 4px;
	box-shadow: var(--tpw-box-shadow);
}
.tpw-single-header { text-align: left; margin-bottom: 20px; }
.tpw-single-main .entry-title { font-family: var(--tpw-font-serif); font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 10px 0; }
.tpw-single-thumb { margin: 20px 0; border-radius: 4px; overflow: hidden; }
.tpw-single-thumb img { width: 100%; }
.entry-content { font-size: clamp(17px, 2vw, 19px); line-height: 1.7; word-wrap: break-word; }
.entry-content p { margin: 0 0 22px; }
.entry-content img { border-radius: 3px; margin: 0 auto; }
.entry-content h2, .entry-content h3 { font-family: var(--tpw-font-serif); }
.entry-content blockquote { border-left: 3px solid var(--tpw-accent); padding-left: 20px; font-style: italic; color: var(--tpw-ink-soft); margin: 24px 0; }
.tpw-tags a { display: inline-block; border: 1px solid var(--tpw-border); padding: 4px 10px; font-size: 12px; font-family: var(--tpw-font-sans); margin: 4px 4px 0 0; }
.tpw-related { max-width: 900px; margin: 30px auto 0; padding: 0 20px; }

/* Comments */
.tpw-comments { margin-top: 40px; border-top: 1px solid var(--tpw-border); padding-top: 24px; }
.tpw-comments-title { font-family: var(--tpw-font-serif); }
.comment-list { padding: 0; }
.comment-list li { border-bottom: 1px solid var(--tpw-border); padding: 16px 0; }

/* Footer */
.tpw-footer { background: var(--tpw-ink); color: #ccc; margin-top: 40px; padding: 50px 0 20px; font-family: var(--tpw-font-sans); }
.tpw-footer__columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 30px; }
.tpw-footer__brand { font-family: var(--tpw-font-serif); color: #fff; font-size: 24px; }
.tpw-footer .widget-title { color: #fff; border-bottom-color: #444; }
.tpw-footer a { color: #ccc; }
.tpw-footer__menu { display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid #333; padding-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tpw-footer__bottom { margin-top: 20px; font-size: 12px; color: #888; }

/* Pagination */
.pagination { display: flex; gap: 10px; justify-content: center; margin: 30px 0; font-family: var(--tpw-font-sans); font-size: 13px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--tpw-border); background: var(--tpw-bg); }
.pagination .page-numbers.current { background: var(--tpw-ink); color: #fff; }

/* =========================================================
   Responsive breakpoints
   ========================================================= */

/* Large tablets / small laptops */
@media (max-width: 1080px) {
	.tpw-featured-strip { grid-template-columns: repeat(2, 1fr); }
	.tpw-box__grid { grid-template-columns: 1fr 1fr; }
	.tpw-box__grid .tpw-card--featured { grid-column: span 2; grid-row: auto; }
	.tpw-box__grid--video { grid-template-columns: repeat(2, 1fr); }
	.tpw-nyt-item--wide .tpw-nyt-item__title { font-size: 22px; }
}

/* Tablets */
@media (max-width: 900px) {
	.tpw-front-grid, .tpw-archive-grid, .tpw-archive-grid--cat { grid-template-columns: 1fr; }
	.tpw-front-main { grid-template-columns: 1fr; }
	.tpw-front-sidebar { position: static; border-top: 1px solid var(--tpw-border); padding-top: 20px; }
	.tpw-featured-categories { grid-template-columns: 1fr; }
	.tpw-footer__columns { grid-template-columns: repeat(2, 1fr); }
	.tpw-menu-toggle { display: inline-flex; }
	.primary-menu { display: none; width: 100%; flex-direction: column; }
	.primary-menu.is-open { display: flex; }
	.primary-menu .sub-menu { position: static; border: 0; box-shadow: none; padding-left: 14px; }
	.tpw-primary-nav__inner { flex-wrap: wrap; }

	/* NYT top grid: right column drops below the left, vertical hairline
	   becomes a horizontal one, matching how the NYT grid restacks on
	   narrower screens/mobile. */
	.tpw-nyt-grid { grid-template-columns: 1fr; }
	.tpw-nyt-grid__col--left { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--tpw-border); padding-bottom: 8px; margin-bottom: 8px; }
	.tpw-nyt-grid__col--right { padding-left: 0; }
	.tpw-nyt-item--wide .tpw-nyt-item__title { font-size: 24px; }
}

/* Phones */
@media (max-width: 640px) {
	.tpw-featured-strip { grid-template-columns: 1fr; }
	.tpw-box__grid { grid-template-columns: 1fr; }
	.tpw-box__grid .tpw-card--featured { grid-column: auto; }
	.tpw-box { padding: 14px; }
	.tpw-card--list { flex-direction: column; }
	.tpw-card--list .tpw-card__thumb { flex: none; }
	.tpw-card--list-compact { gap: 10px; }
	.tpw-card--list-compact .tpw-card__thumb { flex: 0 0 84px; }
	.tpw-card--list-compact .tpw-card__title { font-size: 14px; }
	.tpw-topbar__inner { flex-wrap: wrap; }
	.tpw-topbar__date { display: none; }
	.tpw-single-main { padding: 20px 16px 30px; }
	.tpw-hero { padding: 18px 0; }
	.tpw-container { padding: 0 14px; }
	.tpw-box__grid--video { grid-template-columns: 1fr; }
	.tpw-play-icon { width: 42px; height: 42px; }
	.tpw-digest__layout .tpw-card--featured .tpw-card__title,
	.tpw-digest__layout .tpw-card--video .tpw-card__title { font-size: 18px; }

	.tpw-nyt-item--wide .tpw-nyt-item__title { font-size: 21px; }
	.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__thumb { flex: 0 0 84px; }
	.tpw-nyt-item:not(.tpw-nyt-item--wide) .tpw-nyt-item__title { font-size: 15px; }
	.tpw-nyt-item { gap: 12px; padding: 14px 0; }
	.tpw-nyt-grid-section { padding: 18px 0; }
}

@media (max-width: 420px) {
	.tpw-brand-wordmark { font-size: 26px; }
	.tpw-box__title { font-size: 18px; }
}

/* ---- Media (images/video/embeds) — guaranteed to fit any viewport ---- */
img, video, iframe, embed, object, canvas, svg {
	max-width: 100%;
	height: auto;
}
.tpw-card__thumb img,
.tpw-hero__thumb img,
.tpw-single-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.wp-caption, .wp-block-image { max-width: 100%; }
.wp-caption img { width: 100%; height: auto; }
.alignleft, .alignright, .aligncenter { max-width: 100%; }
@media (max-width: 640px) {
	.alignleft, .alignright { float: none; display: block; margin: 0 auto 16px; }
}
