/*
Theme Name: JobMarg
Theme URI: https://jobmarg.in/
Author: JobMarg
Description: Fast, SEO and Google Discover friendly theme for Hindi Sarkari Naukri / Result / Yojana sites. Ink-and-gold "Marg" design, readable Hindi typography, category boards homepage, auto TOC, AdSense slots with reserved space, schema fallback (auto-off with RankMath/Yoast), dark mode.
Version: 1.0.2
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jobmarg
Tags: news, blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== Tokens ===== */
:root {
	--bg: #ffffff;
	--paper: #ffffff;
	--ink: #121316;
	--text: #1f2226;
	--muted: #5d636b;
	--line: #e7e8ec;
	--soft: #f6f7f9;
	--gold: #b8860b;
	--gold-d: #85600a;
	--gold-l: #fbf1d6;
	--maroon: #9b1c1c;
	--link: #1847b8;
	--ok: #0f7b46;
	--wa: #128c4a;
	--tg: #1f8fd6;
	--r: 14px;
	--r-s: 9px;
	--shadow: 0 1px 2px rgba(17, 18, 22, .04), 0 6px 20px -8px rgba(17, 18, 22, .12);
	--font: "Mukta", "Noto Sans Devanagari", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1200px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #0e0f11;
	--paper: #17191c;
	--ink: #0a0b0c;
	--text: #e9e7e2;
	--muted: #a7abb1;
	--line: #2a2d32;
	--soft: #1c1e22;
	--gold: #e2b34a;
	--gold-d: #e8c26e;
	--gold-l: #2b2412;
	--maroon: #f08a8a;
	--link: #8db4ff;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e0f11;
		--paper: #17191c;
		--ink: #0a0b0c;
		--text: #e9e7e2;
		--muted: #a7abb1;
		--line: #2a2d32;
		--soft: #1c1e22;
		--gold: #e2b34a;
		--gold-d: #e8c26e;
		--gold-l: #2b2412;
		--maroon: #f08a8a;
		--link: #8db4ff;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3);
		color-scheme: dark;
	}
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 var(--font);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	overflow-x: clip; /* clip keeps position: sticky working */
}
.jm-wrap, .jm-post, .jm-content { max-width: 100%; }
.jm-content * { max-width: 100%; }
.jm-content .jm-table table { max-width: none; }
.jm-content img, .jm-content video { height: auto !important; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 800; color: var(--text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jm-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.jm-skip:focus { left: 8px; }
.jm-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.jm-i { flex: none; }
.jm-h { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin-bottom: 16px; }
.jm-h::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--gold), var(--maroon)); flex: none; }
.jm-h .jm-i { color: var(--maroon); }
.jm-h:has(.jm-i)::before { display: none; }
.jm-new { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--maroon); border-radius: 4px; padding: 1px 6px; line-height: 1.5; vertical-align: middle; }
:root[data-theme="dark"] .jm-new { background: #b91c1c; }
.jm-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: jm-pulse 2s infinite; vertical-align: middle; }
@keyframes jm-pulse { 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ===== Header ===== */
.jm-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.jm-head-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.jm-brand { flex: 0 1 auto; min-width: 0; }
.jm-brand .custom-logo-link { display: block; }
.jm-brand img { width: auto; max-height: 50px; }
:root[data-theme="dark"] .jm-brand img { background: #fff; border-radius: 8px; padding: 3px 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jm-brand img { background: #fff; border-radius: 8px; padding: 3px 8px; } }
.jm-wordmark { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.jm-wordmark span { color: var(--gold); }
.jm-hsearch { flex: 1; max-width: 460px; margin-left: auto; position: relative; display: flex; align-items: center; }
.jm-hsearch .jm-i { position: absolute; left: 14px; color: var(--muted); }
.jm-hsearch input { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 0 16px 0 42px; outline: none; transition: border-color .2s, background .2s; }
.jm-hsearch input:focus { border-color: var(--gold); background: var(--paper); }
.jm-head-act { display: flex; align-items: center; gap: 8px; }
.jm-hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--text); font-weight: 700; font-size: .92rem; }
.jm-hbtn:hover { border-color: var(--gold); }
.jm-hbtn--join { background: var(--tg); border-color: var(--tg); color: #fff; padding: 0 16px; }
.jm-hbtn--join:hover { filter: brightness(1.07); border-color: var(--tg); }
.jm-sun { display: none; }
:root[data-theme="dark"] .jm-sun { display: inline-flex; }
:root[data-theme="dark"] .jm-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .jm-sun { display: inline-flex; }
	:root:not([data-theme="light"]) .jm-moon { display: none; }
}
.jm-only-m { display: none; }

/* Old GeneratePress-era header printed by a snippet on wp_body_open: never show it. */
.jobmarg-header, .jobmarg-menu-overlay, .jobmarg-offcanvas, .jobmarg-header + .jobmarg-menu-overlay { display: none !important; }

.jm-nav { background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px -6px rgba(17, 18, 22, .15); position: sticky; top: 0; z-index: 40; }
.admin-bar .jm-nav { top: 32px; }
.jm-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.jm-menu::-webkit-scrollbar { display: none; }
.jm-menu li { flex: none; }
.jm-menu a { display: block; padding: 13px 14px; color: var(--text); font-weight: 600; font-size: .98rem; white-space: nowrap; position: relative; }
.jm-menu a:hover { color: var(--gold-d); }
.jm-menu a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s; }
.jm-menu a:hover::after, .jm-menu .current-menu-item > a::after, .jm-menu .current-post-ancestor > a::after, .jm-menu .current-menu-parent > a::after { transform: scaleX(1); }
.jm-menu .current-menu-item > a { color: var(--gold-d); }

.jm-spop { position: fixed; inset: 0; z-index: 90; background: rgba(10, 11, 12, .55); backdrop-filter: blur(3px); padding: 70px 16px; }
.jm-spop[hidden] { display: none; }
.jm-spop form { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: var(--r); padding: 8px 8px 8px 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.jm-spop input { flex: 1; border: 0; outline: 0; background: none; height: 46px; font-size: 1.1rem; }
.jm-spop button { border: 0; background: var(--soft); width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; }

.jm-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.jm-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--maroon)); transform: scaleX(0); transform-origin: 0 50%; }

/* ===== Ads (space reserved → no CLS) ===== */
.jm-ad { margin: 22px auto; text-align: center; overflow: hidden; clear: both; }
.jm-ad-label { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.jm-ad--header { max-width: var(--wrap); padding: 0 16px; min-height: 120px; margin-top: 14px; margin-bottom: 0; }
.jm-ad--home { min-height: 280px; }
.jm-ad--before, .jm-ad--in-content, .jm-ad--after { min-height: 300px; }
.jm-ad--archive { min-height: 280px; }
.jm-ad--rail { min-height: 600px; margin-top: 0; }
.jm-content .code-block { margin: 22px 0 !important; min-height: 280px; }
.jm-boards .jm-board-ad { grid-column: 1 / -1; margin: 6px 0; }
.jm-list > .jm-ad, .jm-boards > .jm-ad, .jm-content .jm-ad { width: 100%; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
@media (min-width: 768px) { .jm-ad--header { min-height: 100px; } .jm-ad--before, .jm-ad--in-content, .jm-ad--after { min-height: 280px; } }

/* ===== Hero ===== */
.jm-hero {
	background:
		radial-gradient(600px 300px at 85% 0%, rgba(226, 179, 74, .14), transparent 70%),
		radial-gradient(500px 280px at 0% 100%, rgba(24, 71, 184, .06), transparent 70%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='420' viewBox='0 0 1200 420' fill='none'%3E%3Cpath d='M-20 380C180 380 240 250 420 250S640 360 820 300 1020 90 1220 70' stroke='%23b8860b' stroke-opacity='.22' stroke-width='2' stroke-dasharray='10 12'/%3E%3C/svg%3E") center bottom / cover no-repeat,
		var(--paper);
	color: var(--text);
	border-bottom: 1px solid var(--line);
	padding: 34px 0 30px;
}
.jm-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.jm-hero-grid > *, .jm-stories > *, .jm-duo > *, .jm-boards > * { min-width: 0; }
.jm-eyebrow { margin: 0 0 10px; font-size: .9rem; color: var(--gold-d); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.jm-hero h1 { color: var(--text); font-size: clamp(1.7rem, 4.6vw, 2.6rem); letter-spacing: -.01em; line-height: 1.22; }
.jm-hero-intro { color: var(--muted); font-size: 1.06rem; margin: 12px 0 20px; max-width: 640px; line-height: 1.7; }
.jm-hero-search { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 5px 5px 16px; max-width: 600px; box-shadow: 0 10px 28px -14px rgba(17, 18, 22, .35); }
.jm-hero-search:focus-within { border-color: var(--gold); }
.jm-hero-search .jm-i { color: #6b7280; }
.jm-hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 44px; padding: 0 10px; color: #111; font-size: 1rem; }
.jm-hero-search button { border: 0; height: 44px; padding: 0 22px; border-radius: 999px; background: var(--gold); color: #111; font-weight: 800; }
:root[data-theme="dark"] .jm-hero-search button { color: #111; }
.jm-chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jm-chips a { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); color: var(--gold-d); font-size: .92rem; font-weight: 700; background: var(--gold-l); transition: background .2s, color .2s; }
.jm-chips a:hover { background: var(--gold); color: #111; border-color: var(--gold); }

.jm-hero-feed { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r); padding: 16px 18px; }
.jm-feed-h { margin: 0 0 10px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* Timeline ("मार्ग"): latest posts as stops on a route. */
.jm-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.jm-tl li { position: relative; padding: 0 0 12px 22px; }
.jm-tl li::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: -6px; border-left: 2px dashed var(--gold); opacity: .55; }
.jm-tl li:last-child::before { display: none; }
.jm-tl li::after { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(226, 179, 74, .2); }
.jm-tl time { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.jm-tl a { display: block; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-tl a:hover { color: var(--gold-d); }

/* ===== Sections ===== */
.jm-sec { margin: 30px 0; }
.jm-sec-head { display: flex; align-items: center; justify-content: space-between; }

/* Cards */
.jm-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.jm-card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.jm-card-link { position: absolute; inset: 0; z-index: 2; }
.jm-media { aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.jm-media img { width: 100%; height: 100%; object-fit: cover; }
.jm-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #18191c, #2b2414); color: #f3d58a; text-align: center; padding: 10px; }
.jm-ph b { font-size: 1.05rem; border: 1px dashed rgba(243, 213, 138, .5); padding: 4px 12px; border-radius: 999px; }
.jm-card-body { padding: 12px 14px 14px; }
.jm-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.jm-kicker { font-size: .78rem; font-weight: 800; color: var(--gold-d); text-transform: uppercase; letter-spacing: .04em; }
.jm-card-title { font-size: 1.04rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jm-card:hover .jm-card-title { color: var(--link); }
.jm-card-ex { color: var(--muted); margin: 6px 0 0; font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-card-time { display: block; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.jm-card--row { display: grid; grid-template-columns: 112px 1fr; gap: 0; align-items: start; }
.jm-card--row .jm-media { border-radius: 10px; margin: 12px 0 12px 12px; }
.jm-card--row .jm-card-body { padding: 10px 12px; }
.jm-card--row .jm-card-title { font-size: 1rem; -webkit-line-clamp: 3; }
.jm-card--row .jm-card-ex { display: none; }
.jm-grid { display: grid; gap: 14px; }

/* Top stories */
.jm-stories { display: grid; gap: 14px; }
.jm-lead { position: relative; border-radius: var(--r); overflow: hidden; background: #111; color: #fff; }
.jm-lead .jm-media { aspect-ratio: 16 / 9; width: 100%; }
@media (max-width: 899px) {
	/* Phones: image on top, text below (no overlay hiding the image). */
	.jm-lead .jm-lead-body { position: static; padding: 14px 16px 16px; background: #121316; }
}
.jm-lead .jm-media img { opacity: .92; }
.jm-lead-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, .88) 55%); }
.jm-lead h3 { color: #fff; font-size: clamp(1.15rem, 2.8vw, 1.6rem); line-height: 1.35; }
.jm-lead p { margin: 8px 0 0; color: #ddd; display: none; }
.jm-lead time { display: block; font-size: .82rem; color: #cfcfcf; margin-top: 8px; }
.jm-lead .jm-kicker { color: #f3d58a; }
.jm-top-list { display: grid; gap: 10px; }

/* Category boards */
.jm-boards { display: grid; gap: 16px; }
.jm-board { --ac: var(--gold); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; border-top: 4px solid var(--ac); }
.jm-board-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.jm-board-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, transparent); flex: none; }
.jm-board-head h2 { font-size: 1.2rem; flex: 1; }
.jm-board-head h2 a:hover { color: var(--ac); }
.jm-board-count { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.jm-board-list { list-style: none; margin: 0; padding: 0 16px; counter-reset: b; flex: 1; }
.jm-board-list li { counter-increment: b; display: grid; grid-template-columns: 26px 1fr; column-gap: 4px; padding: 10px 0; border-top: 1px dashed var(--line); }
.jm-board-list li:first-child { border-top: 0; }
.jm-board-list li::before { content: counter(b, decimal-leading-zero); grid-row: span 2; font-size: .8rem; font-weight: 800; color: var(--ac); padding-top: 3px; }
.jm-board-list a { font-weight: 600; line-height: 1.5; font-size: 1rem; }
.jm-board-list a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.jm-board-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.jm-board-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 16px 16px; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--ac); background: color-mix(in srgb, var(--ac) 9%, transparent); transition: background .2s, color .2s; }
.jm-board-all:hover { background: var(--ac); color: #fff; }

/* Trending + join + tags */
.jm-duo { display: grid; gap: 16px; }
.jm-trend, .jm-searches, .jm-about, .jm-faq { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.jm-trend-list { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.jm-trend-list li { counter-increment: t; display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.jm-trend-list li:first-child { border-top: 0; padding-top: 0; }
.jm-trend-list li::before { content: counter(t); font-size: 1.6rem; line-height: 1; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--gold); min-width: 26px; }
.jm-trend-list a { font-weight: 600; line-height: 1.5; }
.jm-trend-list a:hover { color: var(--link); }
.jm-duo-side { display: grid; gap: 16px; align-content: start; }
.jm-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jm-tags a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.jm-tags a:hover { border-color: var(--gold); color: var(--text); }

/* Join CTA */
.jm-join { margin: 18px 0; }
.jm-join--card { background: linear-gradient(135deg, var(--gold-l), var(--paper)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: var(--r); padding: 16px; }
.jm-join-t { margin: 0 0 12px; }
.jm-join-t b { display: block; font-size: 1.08rem; }
.jm-join-t span { color: var(--muted); font-size: .92rem; }
.jm-join-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jm-jb { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; border-radius: 10px; color: #fff; font-weight: 700; font-size: .95rem; }
.jm-jb--wa { background: var(--wa); }
.jm-jb--tg { background: var(--tg); }
.jm-jb:hover { filter: brightness(1.08); }
.jm-join--strip .jm-join-btns:has(> :only-child) { grid-template-columns: 1fr; }

/* Homepage SEO article + FAQ */
.jm-prose { font-size: 1.06rem; line-height: 1.85; }
.jm-prose h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.jm-prose p { margin: 0 0 14px; }
.jm-prose a { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; }
.jm-prose ul { padding-left: 0; list-style: none; }
.jm-prose li { position: relative; padding-left: 28px; margin: 6px 0; }
.jm-prose li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800; }
.jm-note { background: var(--gold-l); border-left: 4px solid var(--gold); padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: .98rem; }
.jm-faq details { border-top: 1px solid var(--line); }
.jm-faq details:first-of-type { border-top: 0; }
.jm-faq summary { list-style: none; cursor: pointer; padding: 14px 34px 14px 0; font-weight: 700; font-size: 1.04rem; position: relative; }
.jm-faq summary::-webkit-details-marker { display: none; }
.jm-faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; color: var(--gold-d); font-weight: 400; }
.jm-faq details[open] summary::after { content: "\2212"; }
.jm-faq details p { margin: 0 0 16px; color: var(--muted); line-height: 1.8; }

/* ===== Single post ===== */
.jm-post-wrap { display: grid; gap: 28px; padding-top: 18px; padding-bottom: 30px; }
.jm-post { min-width: 0; }
.jm-crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .86rem; color: var(--muted); }
.jm-crumbs li:not(:last-child)::after { content: "\203A"; margin-left: 6px; color: var(--gold); }
.jm-crumbs a:hover { color: var(--link); }
.jm-pill { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .03em; color: var(--gold-d); background: var(--gold-l); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 999px; padding: 2px 12px; }
.jm-post-title { font-size: clamp(1.55rem, 4.2vw, 2.3rem); line-height: 1.3; letter-spacing: -.01em; margin: 6px 0 10px; }
.jm-dek { font-size: 1.12rem; color: var(--muted); margin: 0 0 12px; line-height: 1.65; }
.jm-byline { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0 18px; }
.jm-byline img { border-radius: 50%; width: 40px; height: 40px; }
.jm-by-name { display: block; font-weight: 700; }
.jm-by-name:hover { color: var(--link); }
.jm-by-meta { display: block; font-size: .86rem; color: var(--muted); }
.jm-hero-img { margin: 0 0 18px; border-radius: var(--r); overflow: hidden; background: var(--soft); aspect-ratio: 16 / 9; }
.jm-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.jm-rail { display: none; }
.jm-rail-in { position: sticky; top: 64px; display: grid; gap: 16px; }
.jm-rail-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.jm-rail-title { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ----- Article typography (overrides classic-editor inline styles) ----- */
.jm-content { font-size: 1.125rem; line-height: 1.85; overflow-wrap: break-word; }
.jm-content > * { margin-top: 0; margin-bottom: 1.15em; }
.jm-content p { margin: 0 0 1.15em; }
.jm-content strong, .jm-content b { font-weight: 700; color: var(--text); }
.jm-content a { color: var(--link) !important; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; }
.jm-content a:hover { text-decoration-color: currentColor; }
.jm-content span[style*="color"] { color: inherit !important; }
.jm-content span[style*="#ff0000"], .jm-content span[style*="#FF0000"], .jm-content span[style*="#e74c3c"], .jm-content span[style*="rgb(255, 0, 0)"] { color: var(--maroon) !important; }
.jm-content span[style*="#008000"], .jm-content span[style*="#339966"], .jm-content span[style*="#00ff00"] { color: var(--ok) !important; }
.jm-content [style*="background-color"] { background-color: transparent !important; }
.jm-content h2, .jm-content h3, .jm-content h4 { text-align: left !important; scroll-margin-top: 70px; }
.jm-content h2 { font-size: 1.42rem; margin: 1.8em 0 .7em; padding: 0 0 10px; border-bottom: 2px solid var(--line); position: relative; }
.jm-content h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--gold); }
.jm-content h3 { font-size: 1.2rem; margin: 1.5em 0 .6em; padding-left: 12px; border-left: 4px solid var(--maroon); }
.jm-content h4 { font-size: 1.08rem; margin: 1.3em 0 .5em; color: var(--gold-d); }
.jm-content h2 strong, .jm-content h3 strong, .jm-content h4 strong { font-weight: inherit; color: inherit; }
.jm-content ul, .jm-content ol { padding-left: 1.4em; }
.jm-content li { margin: .4em 0; padding-left: 2px; }
.jm-content ul li::marker { color: var(--gold); }
.jm-content ol li::marker { color: var(--maroon); font-weight: 700; }
.jm-content blockquote { margin: 1.4em 0; padding: 14px 18px; background: var(--soft); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; font-style: normal; }
.jm-content blockquote p:last-child { margin-bottom: 0; }
.jm-content img { border-radius: 10px; }
.jm-content figure { margin: 1.4em 0; }
.jm-content figcaption { font-size: .88rem; color: var(--muted); text-align: center; margin-top: 6px; }
.jm-content iframe { width: 100%; border: 0; border-radius: 10px; }
.jm-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.jm-content .alignleft, .jm-content .alignright { float: none; margin: 1em auto; }
.jm-content .aligncenter { margin-left: auto; margin-right: auto; }
.jm-content pre, .jm-content code { white-space: pre-wrap; background: var(--soft); border-radius: 6px; }

/* Tables: scroll wrapper, readable rows, link cells become buttons */
.jm-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.3em 0 1.5em; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.jm-table table { width: 100% !important; height: auto !important; border-collapse: collapse; font-size: 1rem; line-height: 1.55; min-width: 100%; margin: 0; border: 0 !important; }
.jm-table td, .jm-table th { padding: 11px 14px; border: 0 !important; border-bottom: 1px solid var(--line) !important; text-align: left; vertical-align: top; height: auto !important; width: auto !important; background: transparent !important; }
.jm-table tr:last-child td { border-bottom: 0 !important; }
.jm-table tr:nth-child(even) td { background: var(--soft) !important; }
.jm-table th, .jm-table thead td { background: var(--ink) !important; color: #fff; font-weight: 700; }
.jm-table td:first-child { font-weight: 600; color: var(--text); }
.jm-table tr:first-child td[colspan], .jm-table td[colspan] { text-align: center; font-weight: 800; background: var(--gold-l) !important; color: var(--text); }
.jm-table td a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; background: var(--link); color: #fff !important; text-decoration: none !important; font-size: .92rem; font-weight: 700; line-height: 1.4; }
:root[data-theme="dark"] .jm-table td a { color: #0e0f11 !important; }
.jm-table td a:hover { filter: brightness(1.1); }
.jm-table td a * { color: inherit !important; }
.jm-table td ul, .jm-table td ol { list-style: none; margin: 6px 0 0; padding: 0; }
.jm-table td li { margin: 6px 0; padding: 0; }
.jm-table td p { margin: 0 0 6px; }
@media (max-width: 600px) { .jm-table table { font-size: .95rem; } .jm-table td, .jm-table th { padding: 9px 11px; } }

/* Gutenberg buttons */
.jm-content .wp-block-button__link { border-radius: 10px; font-weight: 700; padding: 10px 20px; text-decoration: none !important; color: #fff !important; background: var(--ink); }
.jm-content .wp-block-buttons { gap: 10px; }

/* TOC */
.jm-toc { margin: 1.4em 0 1.6em; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.jm-toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 800; }
.jm-toc summary::-webkit-details-marker { display: none; }
.jm-toc summary .jm-i { color: var(--gold-d); }
.jm-toc summary em { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; color: var(--muted); }
.jm-toc summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform .2s; }
.jm-toc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.jm-toc > ol { margin: 0; padding: 4px 16px 14px 38px; counter-reset: none; font-size: 1rem; line-height: 1.5; }
.jm-toc ol ol { padding-left: 18px; margin: 4px 0; list-style: disc; font-size: .95rem; }
.jm-toc li { margin: 6px 0; }
.jm-content .jm-toc a { color: var(--text) !important; text-decoration: none; font-weight: 600; }
.jm-content .jm-toc ol ol a { font-weight: 500; color: var(--muted) !important; }
.jm-content .jm-toc a:hover { color: var(--link) !important; }

/* "Read also" paragraph + auto card */
.jm-content .jm-also { background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 1rem; line-height: 1.6; }
.jm-ra { margin: 1.4em 0; }
.jm-content .jm-ra a { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text) !important; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.jm-ra-img { flex: none; width: 104px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; }
.jm-ra-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.jm-ra-t em { display: block; font-style: normal; font-size: .76rem; font-weight: 800; letter-spacing: .06em; color: var(--maroon); text-transform: uppercase; }
.jm-ra-t b { display: block; line-height: 1.45; font-size: 1rem; }

/* Post footer */
.jm-post-foot { margin-top: 26px; }
.jm-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.jm-share-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-right: 4px; }
.jm-sh { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: #fff; border: 0; }
.jm-sh--wa { background: var(--wa); }
.jm-sh--tg { background: var(--tg); }
.jm-sh--fb { background: #1877f2; }
.jm-sh--copy { background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.jm-sh--copy.is-done { background: var(--ok); color: #fff; border-color: var(--ok); }
.jm-post-foot .jm-tags { margin: 16px 0; }
.jm-author { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 18px 0; }
.jm-author img { border-radius: 50%; flex: none; }
.jm-author p { margin: 0; }
.jm-author-k { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-d); }
.jm-author-n { font-weight: 800; font-size: 1.1rem; }
.jm-author-b { color: var(--muted); font-size: .95rem; line-height: 1.6; margin-top: 4px !important; }
.jm-pn { display: grid; gap: 10px; margin: 18px 0; }
.jm-pn a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 700; line-height: 1.45; }
.jm-pn a:hover { border-color: var(--gold); }
.jm-pn em { display: block; font-style: normal; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.jm-pn-next { text-align: right; }
.jm-related { margin: 30px 0; }

/* Comments */
.jm-comments { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-top: 24px; }
.jm-clist { list-style: none; padding: 0; margin: 0 0 20px; }
.jm-clist .children { list-style: none; padding-left: 18px; border-left: 2px solid var(--line); }
.jm-clist .comment-body { padding: 12px 0; border-bottom: 1px solid var(--line); }
.jm-clist .avatar { border-radius: 50%; float: left; margin-right: 10px; }
.jm-clist .comment-meta { font-size: .85rem; color: var(--muted); }
.jm-clist .fn { font-weight: 700; color: var(--text); font-style: normal; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--soft); }
.comment-form .submit, .jm-sform button { border: 0; background: var(--ink); color: #fff; border-radius: 10px; padding: 11px 20px; font-weight: 700; }
:root[data-theme="dark"] .comment-form .submit, :root[data-theme="dark"] .jm-sform button { background: var(--gold); color: #111; }

/* ===== Archive ===== */
.jm-archive { padding-top: 18px; padding-bottom: 30px; }
.jm-arch-head { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 18px; border-top: 4px solid var(--gold); }
.jm-arch-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.jm-arch-head h1 small { font-size: .6em; color: var(--muted); font-weight: 600; }
.jm-arch-desc { color: var(--muted); margin-top: 8px; line-height: 1.7; }
.jm-arch-desc p { margin: 0 0 8px; }
.jm-arch-head .jm-sform { margin-top: 12px; }
.jm-list { display: grid; gap: 12px; }
.jm-pages ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.jm-pages a, .jm-pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-weight: 700; }
.jm-pages .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.jm-pages a:hover { border-color: var(--gold); }
.jm-sform { display: flex; gap: 8px; max-width: 560px; }
.jm-sform input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--paper); }
.jm-sform button { display: grid; place-items: center; padding: 0 16px; }
.jm-empty { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }

/* Pages + 404 */
.jm-page { max-width: 820px; padding-top: 18px; padding-bottom: 30px; }
.jm-404 { max-width: 720px; padding-top: 40px; padding-bottom: 40px; text-align: center; }
.jm-404-code { font-size: 5rem; font-weight: 800; margin: 0; color: var(--gold); line-height: 1; }
.jm-404 .jm-sform { margin: 18px auto 26px; }
.jm-404 .jm-rail-box { text-align: left; }

/* ===== Footer ===== */
.jm-foot { background: var(--ink); color: #c9c6be; margin-top: 40px; font-size: .96rem; }
.jm-foot-grid { display: grid; gap: 26px; padding-top: 36px; padding-bottom: 26px; }
.jm-foot-brand { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 0 0 8px; }
.jm-foot-about p { line-height: 1.75; margin: 0 0 14px; }
.jm-foot-h { color: #f3d58a; font-weight: 800; margin: 0 0 10px; letter-spacing: .03em; }
.jm-flinks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.jm-flinks a:hover, .jm-social a:hover { color: #fff; text-decoration: underline; }
.jm-social { display: flex; flex-wrap: wrap; gap: 8px; }
.jm-social a { padding: 5px 12px; border: 1px solid #34363b; border-radius: 999px; font-size: .88rem; }
.jm-foot-bottom { border-top: 1px solid #26282c; padding: 16px 0 20px; font-size: .86rem; color: #9a978f; }
.jm-foot-bottom p { margin: 0 0 4px; }
.jm-top { position: fixed; right: 16px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #f3d58a; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.jm-top[hidden] { display: none; }

/* Mobile bottom app bar (optional) */
.jm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
.jm-bar a, .jm-bar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: .74rem; font-weight: 600; color: var(--muted); background: none; border: 0; }
.jm-bar [aria-current="page"] { color: var(--gold-d); }
.jm-has-bar { padding-bottom: 64px; }
.jm-has-bar .jm-top { bottom: 80px; }
@media (min-width: 900px) { .jm-bar { display: none; } .jm-has-bar { padding-bottom: 0; } .jm-has-bar .jm-top { bottom: 20px; } }

/* ===== Responsive ===== */
@media (max-width: 767px) {
	.jm-hsearch, .jm-hbtn--join { display: none; }
	.jm-only-m { display: inline-flex; }
	.jm-head-act { margin-left: auto; }
	.jm-head-row { min-height: 60px; gap: 10px; }
	.jm-brand img { max-height: 42px; }
	.jm-menu a { padding: 12px 12px; font-size: .95rem; }
	.jm-hero { padding: 24px 0 22px; }
	.jm-hero-search button { padding: 0 16px; }
	.jm-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
	.jm-chips::-webkit-scrollbar { display: none; }
	.jm-chips li { flex: none; }
	.jm-hero .jm-tl li:nth-child(n+5) { display: none; }
	.jm-hero .jm-tl li:nth-child(4)::before { display: none; }
	.jm-content { font-size: 1.1rem; line-height: 1.82; }
	.jm-content h2 { font-size: 1.3rem; }
	.jm-content h3 { font-size: 1.14rem; }
	.jm-join--strip .jm-join-btns { grid-template-columns: 1fr 1fr; }
	.jm-jb { font-size: .88rem; padding: 10px 6px; }
}
@media (min-width: 640px) {
	.jm-grid--3, .jm-boards { grid-template-columns: repeat(2, 1fr); }
	.jm-card--row { grid-template-columns: 200px 1fr; }
	.jm-card--row .jm-card-ex { display: -webkit-box; }
	.jm-card--row .jm-card-body { padding: 14px 16px; }
	.jm-card--row .jm-card-title { font-size: 1.1rem; -webkit-line-clamp: 2; }
	.jm-lead p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.jm-pn { grid-template-columns: 1fr 1fr; }
	.jm-foot-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (min-width: 900px) {
	.jm-hero { padding: 48px 0 44px; }
	.jm-hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; }
	.jm-stories { grid-template-columns: 1.25fr 1fr; align-items: stretch; }
	.jm-lead .jm-media { aspect-ratio: auto; height: 100%; min-height: 380px; }
	.jm-top-list .jm-card--row { grid-template-columns: 150px 1fr; }
	.jm-top-list .jm-card--row .jm-card-ex { display: none; }
	.jm-top-list .jm-card--row .jm-card-title { font-size: 1.02rem; -webkit-line-clamp: 3; }
	.jm-top-list .jm-card--row .jm-card-body { padding: 10px 14px; }
	.jm-duo { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 1024px) {
	.jm-boards, .jm-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.jm-post-wrap { grid-template-columns: minmax(0, 760px) 320px; justify-content: center; gap: 40px; }
	.jm-rail { display: block; }
	.jm-content { font-size: 1.15rem; }
	.jm-related .jm-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) and (max-width: 1180px) {
	.jm-post-wrap { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
}

/* WordPress core classes */
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { }
.alignwide, .alignfull { max-width: 100%; }

@media print {
	.jm-head, .jm-nav, .jm-foot, .jm-rail, .jm-ad, .jm-share, .jm-join, .jm-related, .jm-comments, .jm-top, .jm-bar, .jm-progress { display: none !important; }
	body { background: #fff; color: #000; }
}
