/* NeoDeism Layout: keeps Minimalist Writer's look (Lato, Merriweather, black rules, maroon accent) */
:root { --nd-ink: #111; --nd-muted: #555; --nd-rule: #d9d9d9; --nd-accent: #5a1414; --nd-accent-soft: #f6efef; }

/* ----- Articles header and filters ----- */
.ndse-head { text-align: center; }
.ndse-intro { max-width: 620px; margin: 10px auto 0; color: var(--nd-muted); font-size: 15px; line-height: 1.6; }
.ndse-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.ndse-filter a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--nd-rule); border-radius: 20px; font-family: Lato, "helvetica neue", helvetica, arial, sans-serif; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--nd-ink); background: #fff; }
.ndse-filter a:hover { border-color: var(--nd-accent); color: var(--nd-accent); }
.ndse-filter a[aria-current="page"] { background: var(--nd-accent); border-color: var(--nd-accent); color: #fff; }

/* ----- Card grid ----- */
.ndse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 30px; }
.ndse-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 18px; background: #fff; border: 1px solid var(--nd-rule); border-top: 3px solid var(--nd-accent); }
.ndse-card__cat { align-self: flex-start; font-family: Lato, "helvetica neue", helvetica, arial, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--nd-accent) !important; text-decoration: none; }
.ndse-card__title { margin: 0 !important; font-family: Merriweather, Georgia, serif; font-size: 19px !important; line-height: 1.35 !important; text-align: left !important; }
.ndse-card__title a { color: var(--nd-ink); text-decoration: none; }
.ndse-card__title a:hover { color: var(--nd-accent); }
.ndse-card__excerpt { margin: 0; flex-grow: 1; font-size: 15px; line-height: 1.6; color: #333; }
.ndse-card__meta { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--nd-rule); font-size: 13px; color: var(--nd-muted); }
.ndse-card__meta a { font-weight: 700; color: var(--nd-accent); text-decoration: none; }

/* ----- Pagination ----- */
.ndse-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 40px; }
.ndse-pages .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--nd-rule); text-decoration: none; color: var(--nd-ink); }
.ndse-pages .current { background: var(--nd-accent); border-color: var(--nd-accent); color: #fff; }

/* ----- Latest (home) and Keep reading (single posts) ----- */
.ndse-latest, .ndse-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--nd-ink); clear: both; }
.ndse-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.ndse-section-head h2 { margin: 0 !important; font-family: Merriweather, Georgia, serif; font-size: 22px !important; text-align: left !important; }
.ndse-section-head h2 span { font-family: Lato, sans-serif; font-size: 14px; color: var(--nd-muted); }
.ndse-section-head a { font-weight: 700; color: var(--nd-accent); text-decoration: none; white-space: nowrap; }
.ndse-latest .ndse-grid, .ndse-related .ndse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ndse-latest .ndse-card__title, .ndse-related .ndse-card__title { font-size: 16px !important; }
.ndse-latest .ndse-card__excerpt, .ndse-related .ndse-card__excerpt { font-size: 14px; }

/* ----- Readability everywhere ----- */
.entry-content { line-height: 1.75; }
.entry-content img { max-width: 100%; height: auto; }

/* ----- Tablet ----- */
@media (max-width: 1024px) {
	.ndse-latest .ndse-grid, .ndse-related .ndse-grid { grid-template-columns: 1fr; }
}

/* ----- Phone: mobile first refinements ----- */
@media (max-width: 768px) {
	body { font-size: 17px; }
	.content-wrap { padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; }
	#primary, #secondary, .featured-content, .featured-sidebar { width: 100% !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	.fbox { padding: 18px !important; }
	.entry-title, .page-title { font-size: 24px !important; line-height: 1.3 !important; }
	.entry-content { font-size: 17px; }
	.custom-logo { max-width: 220px; height: auto; }
	/* Category chips scroll sideways instead of stacking */
	.ndse-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-left: -18px; margin-right: -18px; padding: 0 18px 6px; scrollbar-width: none; }
	.ndse-filter::-webkit-scrollbar { display: none; }
	.ndse-filter a { flex: 0 0 auto; min-height: 44px; }
	.ndse-grid { grid-template-columns: 1fr; gap: 14px; }
	.ndse-card { padding: 18px; }
	.ndse-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
	/* Bigger tap targets in menus and sidebar link lists */
	.main-navigation a, #secondary a, .site-info a { display: inline-block; padding-top: 6px; padding-bottom: 6px; }
}

/* ----- Sidebar: Recent Articles widget and link lists ----- */
.ndse-recent { list-style: none; margin: 4px 0 0 !important; padding: 0 !important; text-align: left; float: none !important; width: 100% !important; }
.ndse-recent li { float: none !important; width: 100% !important; margin: 0 !important; padding: 12px 0; border-bottom: 1px solid var(--nd-rule); }
.ndse-recent li:first-child { padding-top: 4px; }
.ndse-recent__title { display: block; font-family: Merriweather, Georgia, serif; font-size: 15px; line-height: 1.4; color: var(--nd-ink) !important; text-decoration: none !important; }
.ndse-recent__title:hover { color: var(--nd-accent) !important; }
.ndse-recent__meta { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--nd-muted); }
.ndse-recent__all { display: block; clear: both; margin-top: 18px; padding: 11px 0; text-align: center; border: 1px solid var(--nd-accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nd-accent) !important; text-decoration: none !important; }
.ndse-recent__all:hover { background: var(--nd-accent); color: #fff !important; }
.ndse-links { list-style: none; margin: 4px 0 0; padding: 0; text-align: left; }
.ndse-links li { padding: 10px 0; border-bottom: 1px solid var(--nd-rule); }
.ndse-links li:last-child { border-bottom: 0; }
.ndse-links a { font-size: 15px; color: var(--nd-ink) !important; text-decoration: none !important; }
.ndse-links a:hover { color: var(--nd-accent) !important; }
.ndse-links a::after { content: " \2192"; color: var(--nd-accent); }
