/*
Theme Name:  Hindsight
Theme URI:   https://politicalwire.com/
Author:      Political Wire
Author URI:  https://politicalwire.com/
Description: A newsprint-inspired theme built for the Hindsight daily political-history game. Modern civics with a retro-newsprint edge — election-night numerals, archival serif headlines, mid-century public-information typography, rendered cleanly. Designed as the companion to the Hindsight plugin: the front page hosts the daily puzzle under a newspaper masthead with a running issue number.
Version:     1.0.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hindsight-theme
Tags:        one-column, custom-menu, editor-style, news
*/

/* =====================================================================
 * Tokens
 * ===================================================================== */

:root {
	--paper-page: #F4EFE2;   /* page canvas — deep newsprint            */
	--paper-card: #FCFAF3;   /* card stock                               */
	--ink: #2C2C2A;
	--ink-soft: #5F5E5A;
	--rule: #B4B2A9;         /* aged hairline                            */
	--ballot-red: #A32D2D;
	--civic-blue: #185FA5;
	--archive-gold: #EF9F27;
	--font-serif: "Old Standard TT", "Iowan Old Style", "Times New Roman", Georgia, serif;
	--font-sans: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
	--measure: 720px;
}

/* =====================================================================
 * Base
 * ===================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper-page);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.55;
}

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

a { color: var(--civic-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ballot-red); }

h1, h2, h3, h4 {
	font-family: var(--font-serif);
	font-weight: 700;
	line-height: 1.2;
	color: var(--ink);
	margin: 1.4em 0 0.5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

blockquote {
	margin: 1.5em 0;
	padding: 0.2em 0 0.2em 1.2em;
	border-left: 3px double var(--ink);
	font-family: var(--font-serif);
	font-style: italic;
	color: var(--ink-soft);
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2em 0;
}

::selection { background: var(--civic-blue); color: var(--paper-card); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.site {
	max-width: var(--measure);
	margin: 0 auto;
	padding: 0 16px;
}

/* =====================================================================
 * Masthead
 * ===================================================================== */

.masthead {
	text-align: center;
	padding-top: 22px;
}

.masthead-dateline {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: baseline;
	gap: 12px;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-soft);
	padding-bottom: 8px;
}
.masthead-dateline .dateline-item { white-space: nowrap; }
.masthead-dateline .dateline-item:first-child { text-align: left; }
.masthead-dateline .dateline-item:nth-child(2) { text-align: center; }
.masthead-dateline .dateline-item:last-child { text-align: right; }
@media (max-width: 540px) {
	.masthead-dateline { display: flex; justify-content: center; flex-wrap: wrap; row-gap: 2px; }
}

.masthead-nameplate {
	border-top: 3px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	padding: 18px 0 14px;
}

.site-title {
	font-family: var(--font-serif);
	font-size: 52px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	margin: 0;
}
.site-title a {
	color: var(--ink);
	text-decoration: none;
}
.site-title a:hover { color: var(--ink); }
@media (max-width: 540px) {
	.site-title { font-size: 38px; }
}

.site-tagline {
	font-family: var(--font-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ballot-red);
	margin: 10px 0 0;
}

.masthead-hook {
	border-bottom: 3px double var(--ink);
	padding: 7px 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 14px;
	color: var(--ink-soft);
}

/* =====================================================================
 * Navigation
 * ===================================================================== */

.site-nav {
	padding: 10px 0 0;
}
.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	column-gap: 8px;
	row-gap: 4px;
}
.site-nav li {
	display: flex;
	align-items: center;
	gap: 8px;
}
/* Interpunct separators between items */
.site-nav li + li::before {
	content: "\00B7";
	color: var(--rule);
	font-weight: 700;
}
.site-nav a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink);
	text-decoration: none;
	padding: 4px 6px;
}
.site-nav a:hover { color: var(--ballot-red); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--civic-blue); }

/* =====================================================================
 * Content
 * ===================================================================== */

.site-main {
	padding: 26px 0 40px;
}

/* The game column — the plugin brings its own scoped styles; the theme
   just gives it room and quiets the page around it. */
.game-stage { margin: 0 auto; }
.game-stage .hindsight-app { padding-left: 0 !important; padding-right: 0 !important; }

.plugin-missing {
	border: 1px dashed var(--rule);
	border-radius: 6px;
	background: var(--paper-card);
	padding: 40px 24px;
	text-align: center;
	font-family: var(--font-serif);
	font-style: italic;
	color: var(--ink-soft);
}

/* Articles (about page, posts) — a newsprint clipping */
.article-card {
	background: var(--paper-card);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--ink);
	border-radius: 6px;
	padding: 30px 34px 34px;
}
@media (max-width: 540px) {
	.article-card { padding: 22px 18px 26px; }
}

.article-kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ballot-red);
	margin: 0 0 10px;
}

.article-title {
	font-size: 2.1rem;
	margin: 0 0 6px;
}

.article-meta {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.9rem;
	color: var(--ink-soft);
	margin: 0 0 18px;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 14px;
}

.article-body { font-size: 1.02rem; }
.article-body > p:first-child::first-letter {
	font-family: var(--font-serif);
	font-size: 3.1em;
	font-weight: 700;
	float: left;
	line-height: 0.85;
	padding: 4px 8px 0 0;
	color: var(--ink);
}

/* Post lists (index fallback) */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list-item {
	border-bottom: 1px solid var(--rule);
	padding: 18px 0;
}
.post-list-item h2 { margin: 0 0 4px; font-size: 1.35rem; }
.post-list-item h2 a { color: var(--ink); text-decoration: none; }
.post-list-item h2 a:hover { color: var(--ballot-red); }
.post-list-meta {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.85rem;
	color: var(--ink-soft);
}

/* 404 */
.correction-card {
	background: var(--paper-card);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--ballot-red);
	border-radius: 6px;
	padding: 36px 30px;
	text-align: center;
}
.correction-kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ballot-red);
	margin: 0 0 12px;
}
.correction-card h1 { margin: 0 0 10px; font-size: 1.8rem; }
.correction-card p {
	font-family: var(--font-serif);
	font-style: italic;
	color: var(--ink-soft);
	margin: 0 0 18px;
}
.correction-card .button-home {
	display: inline-block;
	background: var(--civic-blue);
	color: var(--paper-card);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px;
	padding: 11px 24px;
}
.correction-card .button-home:hover { filter: brightness(1.12); color: var(--paper-card); }

/* Buttons & forms (search, password, comments) */
button, input[type="submit"] {
	font-family: var(--font-sans);
	background: var(--civic-blue);
	color: var(--paper-card);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 0;
	border-radius: 4px;
	padding: 10px 20px;
	cursor: pointer;
}
button:hover, input[type="submit"]:hover { filter: brightness(1.12); }
input[type="text"], input[type="email"], input[type="search"],
input[type="password"], input[type="url"], textarea {
	font-family: var(--font-sans);
	font-size: 15px;
	color: var(--ink);
	background: var(--paper-card);
	border: 1px solid var(--rule);
	border-radius: 4px;
	padding: 9px 12px;
}
input:focus, textarea:focus {
	outline: 2px solid var(--civic-blue);
	outline-offset: 1px;
}

/* =====================================================================
 * Footer — the colophon
 * ===================================================================== */

.site-footer {
	border-top: 3px double var(--ink);
	margin-top: 20px;
	padding: 16px 0 34px;
	text-align: center;
}
.colophon-issue {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0 0 6px;
}
.colophon-line {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 13px;
	color: var(--ink-soft);
	margin: 0;
}
.colophon-line a { color: inherit; }
