/*
Theme Name: Community News Theme
Theme URI: https://example.com/community-news-theme
Author: Your Team
Description: The Data Commenter — NYT-inspired newspaper theme for AI-assisted journalism and community discussion.
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: community-news-theme
*/

/* ==========================================================================
   0. CSS Custom Properties
   ========================================================================== */

:root {
	--tdc-white:       #ffffff;
	--tdc-paper:       #faf9f7;
	--tdc-ink:         #121212;
	--tdc-ink-light:   #333333;
	--tdc-meta:        #6b6b6b;
	--tdc-rule:        #e2e2e2;
	--tdc-rule-dark:   #aaaaaa;
	--tdc-accent:      #cc0000;   /* section labels / links */
	--tdc-accent-dark: #990000;
	--tdc-highlight:   rgba(255, 220, 0, 0.35);  /* inline comment highlight */

	/* Editorial type: self-hosted masthead font + system serif stacks
	   (no webfont downloads for body/headline text). */
	--tdc-font-masthead: "UnifrakturMaguntia", "Old English Text MT", "Blackletter", serif;
	--tdc-font-display:  Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
	--tdc-font-serif:    Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
	--tdc-font-pullquote:Georgia, "Iowan Old Style", Times, serif;
	--tdc-font-sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

	--tdc-wrap:        1280px;
	--tdc-article-w:   700px;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
	font-family: var(--tdc-font-serif);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--tdc-ink);
	background: var(--tdc-white);
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--tdc-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

/* ==========================================================================
   2. Layout wrapper
   ========================================================================== */

.tdc-wrap {
	max-width: var(--tdc-wrap);
	margin-inline: auto;
	padding-inline: 1.5rem;
}

/* ==========================================================================
   3. Utility bar (Tier 1)
   ========================================================================== */

.tdc-utility-bar {
	background: var(--tdc-white);
	border-bottom: 1px solid var(--tdc-rule);
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	letter-spacing: 0.02em;
	color: var(--tdc-meta);
}

.tdc-utility-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 32px;
}

.tdc-dateline { font-weight: 400; }

.tdc-utility-menu {
	display: flex;
	gap: 1.25rem;
	align-items: center;
}

.tdc-utility-menu a {
	color: var(--tdc-meta);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}

.tdc-utility-menu a:hover { color: var(--tdc-ink); text-decoration: none; }

/* Subscribe CTA — last item gets accent color */
.tdc-utility-menu li:last-child a {
	color: var(--tdc-white);
	background: var(--tdc-ink);
	padding: 3px 10px;
	border-radius: 2px;
}

.tdc-utility-menu li:last-child a:hover { background: var(--tdc-accent); }

/* ==========================================================================
   4. Masthead (Tier 2)
   ========================================================================== */

.tdc-masthead {
	background: var(--tdc-white);
	padding: 1.5rem 0 0.75rem;
	text-align: center;
	/* Three-rule border — mimics the NYT double-rule framing */
	border-top: 3px solid var(--tdc-ink);
	border-bottom: 1px solid var(--tdc-ink);
	box-shadow: 0 2px 0 0 var(--tdc-ink);
}

.tdc-masthead-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

/* Thin rule above and below the wordmark — classic newspaper framing */
.tdc-masthead-inner::before,
.tdc-masthead-inner::after {
	content: '';
	display: block;
	width: 100%;
	max-width: 680px;
	height: 1px;
	background: var(--tdc-rule-dark);
}

.tdc-masthead-title {
	/*
	 * UnifrakturMaguntia is a blackletter / Old English font — the same
	 * typographic family used by the New York Times wordmark.
	 * It renders best at 400 weight (the font has only one weight).
	 */
	font-family: var(--tdc-font-masthead);
	/* Min small enough that the wordmark never overflows a 360px viewport. */
	font-size: clamp(1.6rem, 7.5vw, 5.5rem);
	font-weight: 400;          /* blackletter fonts use regular weight */
	letter-spacing: 0.01em;
	line-height: 1;
	color: var(--tdc-ink);
	text-decoration: none;
	display: block;
	padding: 0.2rem 0;
}

.tdc-masthead-title:hover { text-decoration: none; opacity: 0.88; }

.tdc-masthead-tagline {
	font-family: var(--tdc-font-sans);
	font-size: 0.7rem;
	color: var(--tdc-meta);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin-top: 0.1rem;
}

.tdc-custom-logo img {
	max-height: 90px;
	width: auto;
	margin-inline: auto;
}

/* ==========================================================================
   5. Section nav (Tier 3)
   ========================================================================== */

.tdc-section-nav {
	background: var(--tdc-white);
	border-bottom: 1px solid var(--tdc-rule-dark);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.tdc-section-nav-inner {
	display: flex;
	align-items: center;
	position: relative;
}

.tdc-section-menu {
	display: flex;
	gap: 0;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 0;
}

.tdc-section-menu::-webkit-scrollbar { display: none; }

.tdc-section-menu li { flex-shrink: 0; }

.tdc-section-menu > li > a {
	display: block;
	padding: 0.7rem 1rem;
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tdc-ink);
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	transition: border-color 120ms, color 120ms;
}

.tdc-section-menu > li > a:hover,
.tdc-section-menu > li.current-menu-item > a,
.tdc-section-menu > li.current-cat > a {
	border-bottom-color: var(--tdc-ink);
	text-decoration: none;
}

/* Sub-menu dropdown */
.tdc-section-menu li { position: relative; }

.tdc-section-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--tdc-white);
	border: 1px solid var(--tdc-rule);
	border-top: 2px solid var(--tdc-ink);
	min-width: 160px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	z-index: 200;
}

.tdc-section-menu li:hover > .sub-menu { display: block; }

.tdc-section-menu .sub-menu a {
	display: block;
	padding: 0.5rem 1rem;
	font-family: var(--tdc-font-sans);
	font-size: 0.8rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--tdc-ink-light);
	border-bottom: 1px solid var(--tdc-rule);
}

.tdc-section-menu .sub-menu a:hover {
	background: var(--tdc-paper);
	color: var(--tdc-ink);
	text-decoration: none;
}

/* Hamburger toggle (mobile) */
.tdc-nav-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	padding: 0.6rem 0;
	cursor: pointer;
	margin-left: auto;
}

.tdc-nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--tdc-ink);
	border-radius: 1px;
	transition: opacity 120ms;
}

/* ==========================================================================
   6. Section label (inline category tag)
   ========================================================================== */

.tdc-section-label {
	display: inline-block;
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--tdc-accent);
	text-decoration: none;
	margin-bottom: 0.4rem;
}

.tdc-section-label:hover { text-decoration: underline; color: var(--tdc-accent-dark); }

/* ==========================================================================
   7. Front page — Lead zone
   ========================================================================== */

.tdc-front-page { padding: 0; }

.tdc-divider {
	border: none;
	border-top: 1px solid var(--tdc-rule);
	margin: 1.5rem 0;
}

.tdc-divider-heavy {
	border-top: 3px solid var(--tdc-ink);
	margin: 1.25rem 0 0;
}

.tdc-lead-zone {
	display: grid;
	grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
	gap: 0;
	border-top: 3px solid var(--tdc-ink);
	border-bottom: 1px solid var(--tdc-rule);
	padding: 1.5rem 0 1.5rem;
}

.tdc-lead-story {
	padding-right: 2rem;
	border-right: 1px solid var(--tdc-rule);
}

.tdc-lead-story .tdc-story-thumb {
	margin-bottom: 1rem;
}

.tdc-lead-story .tdc-story-thumb img {
	width: 100%;
	height: 420px;
	object-fit: cover;
}

.tdc-lead-headline {
	font-family: var(--tdc-font-display);
	font-size: clamp(1.7rem, 3.5vw, 2.85rem);
	font-weight: 700;
	line-height: 1.12;
	margin-bottom: 0.6rem;
	letter-spacing: -0.015em;
}

.tdc-lead-headline a { color: var(--tdc-ink); }
.tdc-lead-headline a:hover { text-decoration: none; color: var(--tdc-accent); }

.tdc-lead-excerpt {
	font-family: var(--tdc-font-serif);
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.65;
	color: var(--tdc-ink-light);
	margin-bottom: 0.6rem;
}

/* Side stack (stories 2-4) */
.tdc-side-stack {
	padding-left: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.tdc-side-item {
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--tdc-rule);
}

.tdc-side-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.tdc-side-item + .tdc-side-item { padding-top: 1rem; }

.tdc-side-item .tdc-story-thumb img {
	width: 100%;
	height: 130px;
	object-fit: cover;
	margin-bottom: 0.6rem;
}

/* ==========================================================================
   8. Story meta (shared)
   ========================================================================== */

.tdc-story-meta {
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
	display: flex;
	gap: 0.4rem;
	align-items: center;
	margin-top: 0.4rem;
}

.tdc-story-meta .sep { opacity: 0.5; }

/* ==========================================================================
   9. Story grid (below the fold)
   ========================================================================== */

.tdc-story-grid-section {
	padding: 1.5rem 0 2rem;
}

.tdc-section-heading {
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--tdc-meta);
	border-top: 3px solid var(--tdc-ink);
	padding-top: 0.5rem;
	margin-bottom: 1.25rem;
}

.tdc-story-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.tdc-grid-item {
	padding: 0 1.25rem 1.25rem 0;
	border-right: 1px solid var(--tdc-rule);
}

.tdc-grid-item:last-child,
.tdc-grid-item:nth-child(4n) { border-right: none; padding-right: 0; }

.tdc-grid-item:nth-child(n+2) { padding-left: 1.25rem; }
.tdc-grid-item:nth-child(4n+1) { padding-left: 0; }

.tdc-grid-item .tdc-story-thumb img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	margin-bottom: 0.6rem;
}

/* Card headline */
.tdc-card-headline {
	font-family: var(--tdc-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -0.01em;
	margin-bottom: 0.35rem;
}

.tdc-card-headline a { color: var(--tdc-ink); }
.tdc-card-headline a:hover { color: var(--tdc-accent); text-decoration: none; }

.tdc-card-excerpt {
	font-family: var(--tdc-font-serif);
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.6;
	color: var(--tdc-ink-light);
}

/* Smaller headline on side-stack items */
.tdc-side-headline {
	font-family: var(--tdc-font-display);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.01em;
	margin-bottom: 0.3rem;
}

.tdc-side-headline a { color: var(--tdc-ink); }
.tdc-side-headline a:hover { color: var(--tdc-accent); text-decoration: none; }

/* Pagination */
.tdc-pagination {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--tdc-rule);
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
}

.tdc-pagination .nav-links {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

.tdc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--tdc-rule);
	color: var(--tdc-ink);
	font-weight: 600;
}

.tdc-pagination .page-numbers.current {
	background: var(--tdc-ink);
	color: var(--tdc-white);
	border-color: var(--tdc-ink);
}

.tdc-pagination .page-numbers:hover:not(.current) {
	background: var(--tdc-paper);
	text-decoration: none;
}

/* ==========================================================================
   10. Archive / category page
   ========================================================================== */

.tdc-archive-header {
	border-top: 3px solid var(--tdc-ink);
	padding: 1rem 0 1.25rem;
	margin-bottom: 1.5rem;
}

.tdc-archive-label {
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--tdc-meta);
	margin-bottom: 0.25rem;
}

.tdc-archive-title {
	font-family: var(--tdc-font-display);
	font-size: 2.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.tdc-archive-desc {
	font-family: var(--tdc-font-serif);
	font-size: 0.95rem;
	color: var(--tdc-meta);
	margin-top: 0.4rem;
}

/* Archive grid: 3-col */
.tdc-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem 1.5rem;
	border-top: 1px solid var(--tdc-rule);
	padding-top: 1.5rem;
}

/* ==========================================================================
   11. Single article page
   ========================================================================== */

.tdc-article-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2.5rem;
	align-items: flex-start;
	padding: 2rem 0 3rem;
	max-width: var(--tdc-wrap);
	margin-inline: auto;
	padding-inline: 1.5rem;
}

.tdc-article-main { min-width: 0; }

.tdc-article-header {
	border-top: 3px solid var(--tdc-ink);
	padding-top: 1.25rem;
	margin-bottom: 1.5rem;
}

.tdc-article-title {
	font-family: var(--tdc-font-display);
	font-size: clamp(1.85rem, 4vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0.4rem 0 0.75rem;
}

.tdc-article-deck {
	font-family: var(--tdc-font-serif);
	font-size: 1.15rem;
	font-weight: 300;
	line-height: 1.6;
	color: var(--tdc-ink-light);
	border-bottom: 1px solid var(--tdc-rule);
	padding-bottom: 1rem;
	margin-bottom: 0.75rem;
}

.tdc-article-byline {
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	color: var(--tdc-meta);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.tdc-byline-author {
	font-weight: 700;
	color: var(--tdc-ink);
}

.tdc-article-lead-image {
	margin: 1.25rem 0 2rem;
}

.tdc-article-lead-image img {
	width: 100%;
	max-height: 520px;
	object-fit: cover;
}

.tdc-article-lead-image figcaption {
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
	border-top: 1px solid var(--tdc-rule);
	padding-top: 0.4rem;
	margin-top: 0.4rem;
}

/* Article body content */
.tdc-article-body {
	font-family: var(--tdc-font-serif);
	font-size: 1.08rem;
	font-weight: 300;
	line-height: 1.85;
	color: var(--tdc-ink);
}

.tdc-article-body p { margin-bottom: 1.4rem; }

.tdc-article-body h2 {
	font-family: var(--tdc-font-display);
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin: 2.25rem 0 0.75rem;
	line-height: 1.18;
}

.tdc-article-body h3 {
	font-family: var(--tdc-font-display);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 1.75rem 0 0.5rem;
}

.tdc-article-body a { color: var(--tdc-accent); text-decoration: underline; }
.tdc-article-body a:hover { color: var(--tdc-accent-dark); }

.tdc-article-body blockquote {
	border-left: 3px solid var(--tdc-ink);
	margin: 2rem 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	font-family: var(--tdc-font-pullquote);
	font-style: italic;
	font-size: 1.3rem;
	line-height: 1.55;
	color: var(--tdc-ink-light);
}

.tdc-article-body ul,
.tdc-article-body ol {
	list-style: revert;
	margin: 0 0 1.25rem 1.5rem;
}

.tdc-article-body li { margin-bottom: 0.4rem; }

.tdc-article-body img {
	width: 100%;
	margin: 1rem 0;
}

/* AI disclosure banner */
.aani-disclosure {
	background: var(--tdc-paper);
	border-left: 3px solid var(--tdc-rule-dark);
	padding: 0.75rem 1rem;
	margin-bottom: 1.5rem;
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	color: var(--tdc-meta);
	border-radius: 0 2px 2px 0;
}

.aani-disclosure a { color: var(--tdc-accent); }

/* Article tags footer */
.tdc-article-tags {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--tdc-rule);
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
}

.tdc-tag {
	display: inline-block;
	border: 1px solid var(--tdc-rule-dark);
	color: var(--tdc-meta);
	padding: 3px 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tdc-tag:hover {
	background: var(--tdc-ink);
	color: var(--tdc-white);
	border-color: var(--tdc-ink);
	text-decoration: none;
}

/* Standard comments area */
.tdc-standard-comments {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 3px solid var(--tdc-ink);
}

/* ==========================================================================
   12. Inline comment panel (light-mode overrides)
   ========================================================================== */

/* The panel sits in the right column of the article grid */
#cn-inline-comments-panel {
	background: var(--tdc-paper);
	border: 1px solid var(--tdc-rule);
	border-radius: 2px;
	padding: 1.25rem 1rem;
	position: sticky;
	top: 58px;         /* below sticky nav */
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	scrollbar-width: thin;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Override dark panel text colors for light background */
.icui-panel-title { color: var(--tdc-ink) !important; }
.icui-panel-empty p { color: var(--tdc-meta) !important; }
.icui-anchor-quote {
	background: rgba(0,0,0,0.04) !important;
	border-left-color: var(--tdc-ink) !important;
	color: var(--tdc-ink-light) !important;
}
.icui-comment { background: var(--tdc-white) !important; border-color: var(--tdc-rule) !important; }
.icui-comment-author { color: var(--tdc-ink) !important; }
.icui-comment-text { color: var(--tdc-ink-light) !important; }
.icui-comment-date { color: var(--tdc-meta) !important; }

.icui-composer textarea.icui-comment-input,
.icui-composer input.icui-guest-name,
.icui-composer input.icui-guest-email {
	background: var(--tdc-white) !important;
	border-color: var(--tdc-rule) !important;
	color: var(--tdc-ink) !important;
}

.icui-submit-btn {
	background: var(--tdc-ink) !important;
}

.icui-submit-btn:hover:not(:disabled) {
	background: var(--tdc-accent) !important;
}

/* Inline highlight — yellow for light background */
.cn-inline-anchor-highlight {
	background: var(--tdc-highlight);
	border-radius: 0;
	padding: 0;
	cursor: pointer;
	transition: background 120ms;
}

.cn-inline-anchor-highlight:hover {
	background: rgba(255, 200, 0, 0.55);
	box-shadow: none;
}

.cn-inline-anchor-highlight.icui-anchor-active {
	background: rgba(255, 200, 0, 0.7) !important;
	box-shadow: none !important;
}

.cn-inline-comment-badge {
	background: var(--tdc-accent) !important;
	color: var(--tdc-white) !important;
}

.cn-inline-comment-button {
	position: absolute;   /* REQUIRED — JS sets top/left to position near selection */
	z-index: 200;         /* Above all article content and sticky nav */
	background: var(--tdc-ink) !important;
	color: var(--tdc-white) !important;
	border: 1px solid var(--tdc-ink) !important;
	border-radius: 2px !important;
	padding: 0.3rem 0.85rem !important;
	font-size: 0.78rem !important;
	font-family: var(--tdc-font-sans) !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	cursor: pointer !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.18) !important;
	white-space: nowrap !important;
}

.cn-inline-comment-button:hover {
	background: var(--tdc-accent) !important;
	border-color: var(--tdc-accent) !important;
}

/* ==========================================================================
   13. Static page
   ========================================================================== */

.tdc-page-wrap {
	max-width: var(--tdc-article-w);
	margin-inline: auto;
	padding: 2rem 1.5rem 4rem;
}

.tdc-page-title {
	font-family: var(--tdc-font-display);
	font-size: 2.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	border-top: 3px solid var(--tdc-ink);
	padding-top: 1rem;
	margin-bottom: 1.5rem;
}

.tdc-page-body {
	font-family: var(--tdc-font-serif);
	font-size: 1.05rem;
	line-height: 1.8;
}

.tdc-page-body p { margin-bottom: 1.25rem; }
.tdc-page-body h2 { font-family: var(--tdc-font-display); font-size: 1.4rem; margin: 2rem 0 0.6rem; }
.tdc-page-body ul, .tdc-page-body ol { list-style: revert; margin: 0 0 1.25rem 1.5rem; }
.tdc-page-body a { color: var(--tdc-accent); text-decoration: underline; }

/* ==========================================================================
   14. Footer
   ========================================================================== */

.tdc-site-footer {
	background: var(--tdc-white);
	border-top: 3px double var(--tdc-ink);
	margin-top: 3rem;
	padding-top: 2rem;
}

.tdc-footer-masthead {
	text-align: center;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--tdc-rule);
	margin-bottom: 1.5rem;
}

.tdc-footer-masthead-title {
	/* Blackletter in the footer mirrors the masthead wordmark */
	font-family: var(--tdc-font-masthead);
	font-size: 1.9rem;
	font-weight: 400;
	color: var(--tdc-ink);
	text-decoration: none;
}

.tdc-footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--tdc-rule);
}

.tdc-footer-col-title {
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--tdc-ink);
	border-bottom: 1px solid var(--tdc-rule);
	padding-bottom: 0.5rem;
	margin-bottom: 0.75rem;
}

.tdc-footer-links {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.tdc-footer-links a,
.tdc-footer-menu a {
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
	color: var(--tdc-ink-light);
}

.tdc-footer-links a:hover,
.tdc-footer-menu a:hover { color: var(--tdc-accent); text-decoration: none; }

/* WordPress-generated footer menu */
.tdc-footer-menu { list-style: none; }
.tdc-footer-menu li { margin-bottom: 0.4rem; }

.tdc-footer-bottom {
	padding: 1.25rem 0;
	text-align: center;
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
}

/* ==========================================================================
   15. Responsive — Tablet (≤ 960px)
   ========================================================================== */

@media (max-width: 960px) {

	.tdc-lead-zone {
		grid-template-columns: 1fr;
	}

	.tdc-lead-story {
		padding-right: 0;
		border-right: none;
		border-bottom: 1px solid var(--tdc-rule);
		padding-bottom: 1.5rem;
		margin-bottom: 1.5rem;
	}

	.tdc-side-stack {
		padding-left: 0;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}

	.tdc-side-item {
		border-bottom: none;
		border-right: 1px solid var(--tdc-rule);
		padding: 0 1rem 0 0;
	}

	.tdc-side-item:last-child { border-right: none; padding-right: 0; }

	.tdc-story-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tdc-grid-item:nth-child(2n) { border-right: none; padding-right: 0; }
	.tdc-grid-item:nth-child(2n+1) { padding-left: 0; }
	.tdc-grid-item:nth-child(n+3) { padding-top: 1.25rem; border-top: 1px solid var(--tdc-rule); }

	.tdc-article-wrap {
		grid-template-columns: 1fr;
	}

	#cn-inline-comments-panel {
		position: static;
		max-height: none;
	}

	.tdc-footer-columns {
		grid-template-columns: repeat(2, 1fr);
	}

	.tdc-archive-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==========================================================================
   16. Responsive — Mobile (≤ 600px)
   ========================================================================== */

@media (max-width: 600px) {

	.tdc-utility-bar { display: none; }

	.tdc-masthead { padding: 0.75rem 0 0.6rem; }

	.tdc-nav-toggle { display: flex; }

	.tdc-section-menu {
		display: none;
		flex-direction: column;
		width: 100%;
		border-top: 1px solid var(--tdc-rule);
	}

	.tdc-section-menu.tdc-menu-open { display: flex; }

	.tdc-section-menu > li > a {
		padding: 0.75rem 0;
		border-bottom: 1px solid var(--tdc-rule);
		border-bottom-color: var(--tdc-rule) !important;
	}

	.tdc-side-stack { grid-template-columns: 1fr; }
	.tdc-side-item { border-right: none; padding-right: 0; }
	.tdc-side-item + .tdc-side-item { border-top: 1px solid var(--tdc-rule); padding-top: 1rem; }

	.tdc-story-grid { grid-template-columns: 1fr; }
	.tdc-grid-item { border-right: none; padding: 0 0 1.25rem; }
	.tdc-grid-item + .tdc-grid-item { border-top: 1px solid var(--tdc-rule); padding-top: 1.25rem; }

	.tdc-lead-story .tdc-story-thumb img { height: 220px; }

	.tdc-footer-columns { grid-template-columns: 1fr; gap: 1.5rem; }

	.tdc-archive-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ==========================================================================
   17. WordPress core overrides
   ========================================================================== */

.wp-caption { max-width: 100%; }
.wp-caption-text {
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
	margin-top: 0.35rem;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px; width: 1px;
	overflow: hidden;
}

/* Comment form */
.comment-form label {
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	font-weight: 600;
	display: block;
	margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--tdc-rule);
	padding: 0.5rem 0.75rem;
	font-family: var(--tdc-font-serif);
	font-size: 0.95rem;
	background: var(--tdc-white);
}

.comment-form input[type="submit"] {
	background: var(--tdc-ink);
	color: var(--tdc-white);
	border: none;
	padding: 0.6rem 1.5rem;
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.comment-form input[type="submit"]:hover { background: var(--tdc-accent); }

/* Comment list */
.comment-list { list-style: none; }
.comment-body {
	border-top: 1px solid var(--tdc-rule);
	padding: 1rem 0;
}
.comment-author .fn {
	font-family: var(--tdc-font-sans);
	font-weight: 700;
	font-size: 0.88rem;
}
.comment-metadata {
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
	margin-bottom: 0.5rem;
}
.comment-content { font-size: 0.95rem; line-height: 1.6; }

/* ==========================================================================
   14. Aggregated-story source attribution & excerpt (Phase 1 content policy)
   ========================================================================== */

.tdc-source-attribution {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem;
	margin: 0 0 1.25rem;
	padding: 0.55rem 0.85rem;
	border-left: 3px solid var(--tdc-accent);
	background: var(--tdc-paper);
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	color: var(--tdc-meta);
}

.tdc-source-label {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.72rem;
	color: var(--tdc-ink-light);
}

.tdc-source-link {
	font-weight: 700;
	color: var(--tdc-accent-dark);
	text-decoration: none;
}

.tdc-source-link:hover { text-decoration: underline; }

/* Quoted source excerpt inside the article body */
.tdc-article-body .aani-source-excerpt {
	margin: 1.5rem 0;
	padding: 0.75rem 1.25rem;
	border-left: 3px solid var(--tdc-rule-dark);
	font-family: var(--tdc-font-pullquote);
	font-style: italic;
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--tdc-ink-light);
}

.tdc-article-body .aani-source-excerpt cite {
	display: block;
	margin-top: 0.5rem;
	font-family: var(--tdc-font-sans);
	font-style: normal;
	font-size: 0.8rem;
	color: var(--tdc-meta);
}

/* Prominent outbound link */
.tdc-article-body .aani-read-more {
	margin: 1.5rem 0;
	font-family: var(--tdc-font-sans);
	font-weight: 700;
	font-size: 1rem;
}

.tdc-article-body .aani-read-more a {
	color: var(--tdc-accent-dark);
	text-decoration: none;
	border-bottom: 2px solid var(--tdc-accent);
}

.tdc-article-body .aani-read-more a:hover {
	color: var(--tdc-accent);
}

/* ==========================================================================
   15. Headline stacks & beat grid (link-dense front page)
   ========================================================================== */

.tdc-stack-title {
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-bottom: 2px solid var(--tdc-ink);
	padding-bottom: 0.35rem;
	margin: 0 0 0.75rem;
}

.tdc-stack-title a {
	color: inherit;
	text-decoration: none;
}

.tdc-stack-title a:hover { color: var(--tdc-accent); }

.tdc-headline-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tdc-headline-list li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--tdc-rule);
}

.tdc-headline-list li:last-child { border-bottom: 0; }

.tdc-headline-link {
	font-family: var(--tdc-font-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tdc-ink);
	text-decoration: none;
	display: block;
}

.tdc-headline-link:hover { color: var(--tdc-accent); }

.tdc-headline-meta {
	display: block;
	font-family: var(--tdc-font-sans);
	font-size: 0.72rem;
	color: var(--tdc-meta);
	margin-top: 0.15rem;
}

.tdc-headline-source { color: var(--tdc-meta); }

.tdc-beat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 2rem;
	margin: 2.5rem 0;
	border-top: 3px double var(--tdc-rule-dark);
	padding-top: 1.75rem;
}

.tdc-stack-more {
	margin: 0.5rem 0 0;
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
}

.tdc-stack-more a {
	color: var(--tdc-accent-dark);
	text-decoration: none;
	font-weight: 700;
}

.tdc-stack-empty {
	color: var(--tdc-meta);
	font-size: 0.85rem;
}

/* Related stories block on articles */
.tdc-related {
	margin: 2.5rem 0 1rem;
	border-top: 3px double var(--tdc-rule-dark);
	padding-top: 1.25rem;
}

/* ==========================================================================
   16. Persona byline
   ========================================================================== */

.tdc-article-byline {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.tdc-byline-avatar img {
	border-radius: 50%;
	display: block;
}

.tdc-byline-text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.tdc-byline-text a.tdc-byline-author {
	color: var(--tdc-ink);
	text-decoration: none;
	font-weight: 700;
}

.tdc-byline-text a.tdc-byline-author:hover { color: var(--tdc-accent); }

.tdc-byline-bio {
	font-family: var(--tdc-font-sans);
	font-size: 0.78rem;
	color: var(--tdc-meta);
}

.tdc-noscript-note {
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	color: var(--tdc-meta);
	padding: 0.75rem;
	border: 1px dashed var(--tdc-rule-dark);
}

/* ==========================================================================
   17. Newsletter capture
   ========================================================================== */

.tdcnl-form {
	border: 1px solid var(--tdc-rule-dark);
	background: var(--tdc-paper);
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.tdcnl-title {
	font-family: var(--tdc-font-display);
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
}

.tdcnl-desc {
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
	color: var(--tdc-meta);
	margin: 0 0 0.75rem;
}

.tdcnl-fields {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.tdcnl-fields input[type="email"] {
	flex: 1 1 220px;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--tdc-rule-dark);
	font-family: var(--tdc-font-sans);
	font-size: 0.9rem;
	background: var(--tdc-white);
	color: var(--tdc-ink);
}

.tdcnl-fields button {
	padding: 0.55rem 1.4rem;
	background: var(--tdc-ink);
	color: var(--tdc-white);
	border: none;
	font-family: var(--tdc-font-sans);
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.tdcnl-fields button:hover { background: var(--tdc-accent); }

.tdcnl-message {
	font-family: var(--tdc-font-sans);
	font-size: 0.85rem;
	margin: 0.5rem 0 0;
}

.tdcnl-message.is-success { color: #1a7a2e; }
.tdcnl-message.is-error   { color: var(--tdc-accent); }

/* Honeypot field: visually hidden, still in the accessibility tree trap. */
.tdcnl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tdc-site-footer .tdcnl-form {
	background: transparent;
	border-color: var(--tdc-rule);
	margin: 0;
}

/* ==========================================================================
   18. Dark mode
   ========================================================================== */

.tdc-theme-toggle {
	background: none;
	border: 1px solid var(--tdc-rule-dark);
	border-radius: 999px;
	color: var(--tdc-ink);
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1;
	padding: 0.2rem 0.55rem;
	margin-right: 0.75rem;
}

.tdc-theme-toggle:hover { color: var(--tdc-accent); border-color: var(--tdc-accent); }

/* Dark palette applied via explicit choice… */
:root[data-theme="dark"] {
	--tdc-white:       #191b1f;
	--tdc-paper:       #14161a;
	--tdc-ink:         #e8e6e3;
	--tdc-ink-light:   #c9c7c3;
	--tdc-meta:        #96938e;
	--tdc-rule:        #33363c;
	--tdc-rule-dark:   #4a4e55;
	--tdc-accent:      #ff5c5c;
	--tdc-accent-dark: #ff8080;
	--tdc-highlight:   rgba(255, 220, 0, 0.22);
}

:root[data-theme="dark"] body { background: #101215; }

/* …or via OS preference when no explicit choice is stored. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--tdc-white:       #191b1f;
		--tdc-paper:       #14161a;
		--tdc-ink:         #e8e6e3;
		--tdc-ink-light:   #c9c7c3;
		--tdc-meta:        #96938e;
		--tdc-rule:        #33363c;
		--tdc-rule-dark:   #4a4e55;
		--tdc-accent:      #ff5c5c;
		--tdc-accent-dark: #ff8080;
		--tdc-highlight:   rgba(255, 220, 0, 0.22);
	}

	:root:not([data-theme="light"]) body { background: #101215; }
}
