/*
Theme Name:   PhotonSleep
Theme URI:    https://photonsleep.com
Description:  GeneratePress child theme for PhotonSleep – evidence-based guides to light, sleep and recovery technology. Design system from the project playbook (section 8).
Author:       PhotonSleep
Template:     generatepress
Version: 1.0.1
Text Domain:  photonsleep
*/

/* =========================================================
 * 1. DESIGN TOKENS (playbook section 8)
 * ========================================================= */
:root {
	--ps-navy: #0f172a;
	--ps-navy-2: #1e293b;
	--ps-text: #1e293b;
	--ps-muted: #475569;
	--ps-amber: #d97706;
	--ps-amber-hover: #b45309;
	--ps-amber-text: #92400e; /* amber for text links: 7.1:1 on white */
	--ps-red: #b91c1c;
	--ps-surface: #f8fafc;
	--ps-border: #cbd5e1;
	--ps-tint: #fffbeb;
	--ps-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
 * 2. BASE TYPOGRAPHY
 * ========================================================= */
body,
button,
input,
select,
textarea {
	font-family: var(--ps-font);
	color: var(--ps-text);
}
body {
	background: #ffffff;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
	font-family: var(--ps-font);
	color: var(--ps-navy);
	letter-spacing: -0.01em;
}
h1 { font-weight: 800; line-height: 1.2; }
h2 { font-weight: 750; line-height: 1.3; }
h3 { font-weight: 700; line-height: 1.35; }

a { color: var(--ps-amber-text); }
a:hover, a:focus { color: var(--ps-red); }

/* Reading column: 18px / 1.65 / 740px */
.single .inside-article,
.page .inside-article {
	max-width: 788px; /* 740px text + padding */
	margin-left: auto;
	margin-right: auto;
}
.entry-content {
	max-width: 740px;
	font-size: 18px;
	line-height: 1.65;
	color: var(--ps-text);
}
.entry-content p { margin-bottom: 1.25em; }
.entry-content h2 {
	color: var(--ps-navy);
	margin-top: 2.2rem;
	margin-bottom: 0.8rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--ps-border);
	font-size: 1.6rem;
}
.entry-content h3 {
	margin-top: 1.6rem;
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
}
.entry-content ul,
.entry-content ol { margin-left: 1.3em; margin-bottom: 1.4em; }
.entry-content li { margin-bottom: 0.45em; }
.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

/* =========================================================
 * 3. HEADER, NAVIGATION, FOOTER (navy)
 * ========================================================= */
.site-header {
	background: var(--ps-navy);
	color: #e2e8f0;
}
.site-header .inside-header { padding-top: 18px; padding-bottom: 18px; }
.site-header .header-image { height: auto; }
.site-description { color: #94a3b8; font-size: 14px; }
.main-title a, .main-title a:hover { color: #ffffff; }

.main-navigation,
.main-navigation ul ul {
	background: var(--ps-navy-2);
}
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
	color: #e2e8f0;
	font-weight: 600;
	font-size: 15px;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	color: #ffffff;
	background: #334155;
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	box-shadow: inset 0 -3px 0 var(--ps-amber);
}

.site-footer,
.site-info {
	background: var(--ps-navy);
	color: #cbd5e1;
}
.site-info a { color: #fbbf24; }
.site-info a:hover { color: #ffffff; }
.ps-footer-links { margin: 0 0 8px; font-size: 14px; }
.ps-footer-links a { margin: 0 8px; white-space: nowrap; }
.ps-footer-note { font-size: 13px; color: #94a3b8; margin: 0; }

/* =========================================================
 * 4. PLAYBOOK COMPONENTS
 * ========================================================= */

/* 4.1 Affiliate disclosure (top of commercial articles) */
.ps-disclosure {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ps-muted);
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 1.5rem;
}
.ps-disclosure a { color: var(--ps-muted); }

/* 4.2 AEO / Quick Answer / TL;DR box */
.ps-tldr {
	background: var(--ps-tint);
	border-left: 4px solid var(--ps-amber);
	padding: 16px 20px;
	margin: 1.5rem 0;
	border-radius: 0 6px 6px 0;
}
.ps-tldr p:last-child { margin-bottom: 0; }
.ps-tldr-title {
	font-weight: 700;
	color: var(--ps-navy);
	margin-bottom: 6px;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.05em;
}

/* 4.3 Comparison and protocol tables */
.entry-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
}
.wp-block-table,
.ps-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.5rem 0;
	border: 1px solid var(--ps-border);
	border-radius: 8px;
}
.entry-content table thead th,
.entry-content table th {
	background: var(--ps-navy);
	color: #ffffff;
	text-align: left;
	font-weight: 600;
	padding: 12px 14px;
	border: none;
}
.entry-content table td {
	padding: 11px 14px;
	border: none;
	border-bottom: 1px solid var(--ps-border);
	vertical-align: top;
}
.entry-content table tbody tr:nth-child(even) { background: var(--ps-surface); }
.entry-content table tbody tr:last-child td { border-bottom: none; }

/* 4.4 Pros / cons */
.ps-proscons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin: 1.25rem 0 1.5rem;
}
.ps-pros,
.ps-cons {
	border: 1px solid var(--ps-border);
	border-radius: 8px;
	padding: 14px 16px;
	font-size: 16px;
}
.ps-pros { border-top: 4px solid #15803d; }
.ps-cons { border-top: 4px solid var(--ps-red); }
.ps-pros strong,
.ps-cons strong {
	display: block;
	margin-bottom: 6px;
	color: var(--ps-navy);
}
.ps-pros ul,
.ps-cons ul { margin: 0 0 0 1.1em; }
@media (max-width: 640px) {
	.ps-proscons { grid-template-columns: 1fr; }
}

/* 4.5 Affiliate CTA button */
.entry-content a.ps-btn,
.ps-btn {
	display: inline-block;
	background: var(--ps-amber-hover);
	color: #ffffff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	padding: 12px 22px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s ease;
}
.entry-content a.ps-btn:hover,
.entry-content a.ps-btn:focus,
.ps-btn:hover {
	background: #92400e;
	color: #ffffff;
}
.ps-btn-small { font-size: 14px; padding: 8px 14px; }

/* 4.6 Badges ("Top Pick", wavelength marks) */
.ps-badge {
	display: inline-block;
	background: var(--ps-red);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	vertical-align: middle;
}
.ps-nm {
	font-variant-numeric: tabular-nums;
	color: var(--ps-red);
	font-weight: 600;
}

/* 4.7 Info / note box */
.ps-note {
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 8px;
	padding: 14px 18px;
	margin: 1.5rem 0;
	font-size: 16px;
}

/* 4.8 Medical note + author box after content */
.ps-medical-note {
	margin-top: 2rem;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ps-muted);
	border-top: 1px solid var(--ps-border);
	padding-top: 14px;
}
.ps-author-box {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 8px;
	padding: 16px 18px;
	margin-top: 1.25rem;
	font-size: 15px;
	line-height: 1.55;
}
.ps-author-box img { flex: 0 0 48px; width: 48px; height: 48px; }
.ps-author-box strong { color: var(--ps-navy); }
.ps-author-box p { margin: 4px 0 0; }

/* =========================================================
 * 5. META, BREADCRUMBS, ARCHIVES, HOME
 * ========================================================= */
.entry-meta { color: var(--ps-muted); font-size: 14px; }
.entry-meta a { color: var(--ps-muted); }
.rank-math-breadcrumb { font-size: 14px; color: var(--ps-muted); margin-bottom: 10px; }
.rank-math-breadcrumb a { color: var(--ps-muted); }

.ps-hero {
	background: var(--ps-navy);
	color: #e2e8f0;
	border-radius: 12px;
	padding: 40px 32px;
	margin-bottom: 2rem;
}
.ps-hero h1,
.entry-content .ps-hero h2 { color: #ffffff; border: none; margin-top: 0; }
.ps-hero p { color: #cbd5e1; font-size: 19px; }
.ps-hero .ps-hero-kicker {
	color: #fbbf24;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}
.ps-silos {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 1.5rem 0 2rem;
}
.ps-silo {
	border: 1px solid var(--ps-border);
	border-top: 4px solid var(--ps-amber);
	border-radius: 8px;
	padding: 18px 20px;
	background: #ffffff;
}
.entry-content .ps-silo h3 { margin-top: 0; }
.ps-silo p { font-size: 16px; margin-bottom: 0.6em; }
@media (max-width: 640px) {
	.ps-silos { grid-template-columns: 1fr; }
	.ps-hero { padding: 28px 20px; }
}

.home .entry-header,
.page-template-default.home .entry-title { display: none; }

/* Hide default "Uncategorized" style leftovers */
.cat-links a[href*="/uncategorized/"] { display: none; }

/* Explicit footer background (contrast checkers) */
.site-info, .inside-site-info, .copyright-bar { background-color: #0f172a; }
