/*
Theme Name: Analyst
Theme URI: https://example.com/analyst
Author: Taegan Goddard
Description: A clean, editorial analysis-blog theme. Customizable highlight color, widgetized right rail (300x250-ready), two header widget areas, content-top and after-third-post widget areas, and an after-article widget area.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: analyst
Tags: blog, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ---------------------------------------------------------------
   Design tokens (accent overridden from Customizer via wp_head)
--------------------------------------------------------------- */
:root {
	--an-accent: #1a3a5c;
	--an-accent-hover: #16314e;
	--an-text: #2b2b2b;
	--an-text-light: #7a7a7a;
	--an-border: #e5e5e5;
	--an-bg: #ffffff;
	--an-bg-alt: #f8f7f5;
	--an-serif: "Lora", Georgia, "Times New Roman", serif;
	--an-sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------
   Reset / base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--an-bg);
	color: var(--an-text);
	font-family: var(--an-serif);
	font-size: 17px;
	line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--an-accent); text-decoration: none; }
a:hover, a:focus { color: var(--an-accent-hover); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; color: var(--an-text); margin: 1.5em 0 0.5em; }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute; word-wrap: normal !important;
}

.an-container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
.site-header {
	background: var(--an-bg);
	border-bottom: 1px solid var(--an-border);
}
.site-header-inner {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 28px 0 22px;
}
.site-branding { flex: 0 0 auto; max-width: 320px; }
.site-branding img { max-height: 56px; width: auto; }
.site-title {
	margin: 0;
	font-family: var(--an-serif);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -0.5px;
	line-height: 1.1;
}
.site-title a { color: var(--an-text); }
.site-title a:hover { color: var(--an-accent); text-decoration: none; }
.site-title .an-dot { color: var(--an-accent); }
.site-description {
	margin: 4px 0 0;
	font-family: var(--an-sans);
	font-size: 14px;
	color: var(--an-text-light);
}

/* Two widget areas to the right of the logo */
.header-widgets {
	display: flex;
	flex: 1 1 auto;
	justify-content: flex-end;
	align-items: center;
	gap: 32px;
	min-width: 0;
}
.header-widget-area { font-family: var(--an-sans); font-size: 14px; }
.header-widget-area .widget { margin: 0; }
.header-widget-area .widget-title {
	margin: 0 0 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--an-text-light);
}

/* Primary navigation */
.main-navigation {
	border-top: 1px solid var(--an-border);
	font-family: var(--an-sans);
}
.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-navigation li { position: relative; }
.main-navigation a {
	display: block;
	padding: 12px 18px 12px 0;
	margin-right: 10px;
	color: var(--an-text);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.2px;
}
.main-navigation a:hover { color: var(--an-accent); text-decoration: none; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--an-accent); }
/* simple dropdowns */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%; left: 0;
	z-index: 99;
	min-width: 200px;
	background: var(--an-bg);
	border: 1px solid var(--an-border);
	box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.main-navigation ul ul a { padding: 10px 16px; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { display: block; }

/* ---------------------------------------------------------------
   Layout: content + right rail
--------------------------------------------------------------- */
.site-content { padding: 40px 0 64px; }
.site-content-inner {
	display: flex;
	gap: 56px;
	align-items: flex-start;
}
.content-area { flex: 1 1 auto; min-width: 0; }
/* Right rail: 340px accommodates 300x250 ads with breathing room */
.sidebar-right {
	flex: 0 0 340px;
	width: 340px;
	font-family: var(--an-sans);
	font-size: 15px;
}

/* ---------------------------------------------------------------
   Widget styling (rail + in-content areas)
--------------------------------------------------------------- */
.widget { margin: 0 0 40px; }
.widget-title {
	font-family: var(--an-sans);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--an-text);
	border-bottom: 3px solid var(--an-accent);
	padding-bottom: 8px;
	margin: 0 0 16px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--an-border); }
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--an-text); }
.widget a:hover { color: var(--an-accent); }

/* In-content widget areas (top of well, after 3rd post, after article) */
.content-widget-area { font-family: var(--an-sans); margin: 0 0 40px; }
.content-widget-area .widget { margin-bottom: 24px; }
.after-post-widgets {
	margin: 48px 0;
	padding-top: 32px;
	border-top: 1px solid var(--an-border);
}

/* ---------------------------------------------------------------
   Posts (home / archive)
--------------------------------------------------------------- */
.post-list .hentry {
	padding: 0 0 40px;
	margin: 0 0 40px;
	border-bottom: 1px solid var(--an-border);
}
.post-list .hentry:last-child { border-bottom: 0; }

.entry-kicker {
	font-family: var(--an-sans);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin: 0 0 6px;
}
.entry-kicker a { color: var(--an-accent); }

.entry-title {
	margin: 0 0 8px;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.3px;
}
.entry-title a { color: var(--an-text); }
.entry-title a:hover { color: var(--an-accent); text-decoration: none; }

.entry-meta {
	font-family: var(--an-sans);
	font-size: 13px;
	color: var(--an-text-light);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 18px;
}
.entry-meta a { color: var(--an-text-light); }

.entry-summary, .entry-content { font-size: 17px; }
.entry-content > *:first-child { margin-top: 0; }

.more-link, .an-readmore {
	font-family: var(--an-sans);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--an-accent);
}

/* Featured image */
.post-thumbnail { display: block; margin: 0 0 20px; }
.post-thumbnail img { display: block; width: 100%; }

/* Article content niceties */
.entry-content blockquote {
	margin: 1.5em 0;
	padding: 0 0 0 20px;
	border-left: 3px solid var(--an-accent);
	color: #555;
	font-style: italic;
}
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.wp-caption-text, figcaption {
	font-family: var(--an-sans);
	font-size: 13px;
	color: var(--an-text-light);
	text-align: center;
}

/* Single article */
.single .entry-title, .page .entry-title { font-size: 40px; }
.entry-footer {
	font-family: var(--an-sans);
	font-size: 13px;
	color: var(--an-text-light);
	margin-top: 32px;
}

/* Pagination / post nav */
.pagination, .post-navigation { font-family: var(--an-sans); margin: 40px 0 0; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--an-border);
	color: var(--an-text);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--an-accent); border-color: var(--an-accent); color: #fff; text-decoration: none; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; }

/* Comments */
.comments-area { margin-top: 56px; font-family: var(--an-sans); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { padding: 20px 0; border-top: 1px solid var(--an-border); }
.comment-list .children { list-style: none; margin: 0; padding-left: 32px; }
.comment-meta .fn { font-style: normal; font-weight: 700; }
.comment-metadata { font-size: 12px; color: var(--an-text-light); }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 8px 10px; border: 1px solid var(--an-border); font: inherit;
}
.comment-form input[type="submit"], button, input[type="submit"] {
	background: var(--an-accent);
	color: #fff;
	border: 0;
	padding: 10px 22px;
	font-family: var(--an-sans);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
}
.comment-form input[type="submit"]:hover, button:hover, input[type="submit"]:hover { background: var(--an-accent-hover); }

/* Search form */
.search-form { display: flex; gap: 8px; font-family: var(--an-sans); }
.search-form .search-field { flex: 1; padding: 8px 10px; border: 1px solid var(--an-border); font: inherit; }

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--an-border);
	background: var(--an-bg-alt);
	font-family: var(--an-sans);
	font-size: 13px;
	color: var(--an-text-light);
}
.site-footer-inner { padding: 32px 0; text-align: center; }
.footer-navigation ul {
	display: flex; justify-content: center; flex-wrap: wrap; gap: 20px;
	list-style: none; margin: 0 0 12px; padding: 0;
	text-transform: uppercase; letter-spacing: 1px; font-size: 12px;
}
.footer-navigation a { color: var(--an-text-light); }
.footer-navigation a:hover { color: var(--an-accent); }
.site-info a { color: var(--an-text-light); }

/* ---------------------------------------------------------------
   Alignment / WP core classes
--------------------------------------------------------------- */
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin: 12px auto; }
.sticky {}
.bypostauthor {}
.gallery-caption {}
.wp-caption { max-width: 100%; }

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1020px) {
	.site-content-inner { flex-direction: column; }
	.sidebar-right { width: 100%; flex-basis: auto; max-width: 680px; }
}
@media (max-width: 760px) {
	.site-header-inner { flex-wrap: wrap; gap: 16px; }
	.header-widgets { justify-content: flex-start; flex-wrap: wrap; gap: 16px; }
	.entry-title { font-size: 26px; }
	.single .entry-title, .page .entry-title { font-size: 30px; }
	.main-navigation a { padding: 10px 12px 10px 0; }
}
