/*
Theme Name: Niyama Vartha
Theme URI: https://niyamavartha.in/
Author: Niyama Vartha
Description: Malayalam legal news theme for Niyama Vartha – A Lawyers of Kerala Publication. Works with the Niyamavartha Members plugin: login, subscribe and member status in the header, locked-post labels and the members-only paywall.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: niyamavartha
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #15191c;          /* text */
	--paper: #f6f7f5;        /* page background, cool near-white */
	--sheet: #ffffff;        /* article surface */
	--gown: #000000;         /* advocate's gown: top bar, footer */
	--tape: #b3122e;         /* court red tape: the one accent */
	--tape-dark: #8c0e24;
	--muted: #5d656c;
	--rule: #d9ddd8;
	--file: #e6ece6;         /* case-file cover: member / quote boxes */
	--navy: #111c33;         /* menu bar, kickers, key figures */
	--navy-2: #1e3a5f;
	--bs-blue: #eef4fb;      /* broadsheet: statute / background boxes */
	--bs-blue-line: #b9d0ea;
	--bs-red: #fbeff0;       /* broadsheet: principles box */
	--bs-gold: #fcf6dc;      /* broadsheet: comparison box */
	--bs-gold-line: #e3c55a;

	--f-head: "Noto Serif Malayalam", "Noto Serif", Georgia, serif;
	--f-body: "Manjari", "Noto Sans Malayalam", system-ui, sans-serif;

	--wrap: 1200px;
	--gap: clamp(16px, 2.5vw, 28px);
	--article-size: 19px;
}

/* Dark mode (toggle in the top bar; remembered per device) */
html[data-theme="dark"] {
	--ink: #e7eaee;
	--paper: #0e1318;
	--sheet: #161c23;
	--muted: #9aa5b1;
	--rule: #2b343e;
	--file: #1f2730;
	--navy: #0b1426;
	--navy-2: #9cc3f0;
	--bs-blue: #15212f;
	--bs-blue-line: #2a3d55;
	--bs-red: #2a161b;
	--bs-gold: #2a2513;
	--bs-gold-line: #5c4d1d;
	color-scheme: dark;
}
html[data-theme="dark"] .search-form input[type="search"],
html[data-theme="dark"] .nv-login input, html[data-theme="dark"] .nv-register input, html[data-theme="dark"] .nv-account input { background: #0e1318; color: var(--ink); border-color: #3a4552; }
html[data-theme="dark"] .entry .nv-paywall, html[data-theme="dark"] .nv-subscribe { background: var(--file) !important; color: var(--ink); border-color: var(--rule) !important; }
html[data-theme="dark"] .tool { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
html[data-theme="dark"] .btn--light { background: var(--sheet); color: var(--ink); }
html[data-theme="dark"] .search-form button,
html[data-theme="dark"] .nv-login button, html[data-theme="dark"] .nv-register button, html[data-theme="dark"] .nv-account button { background: var(--tape); }
html[data-theme="dark"] img { filter: brightness(.92); }

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.75;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tape); }

:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--sheet); padding: 10px 14px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Top bar (gown black) ---------- */
.topbar { background: var(--gown); color: #e9ece9; font-size: 14px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.social { display: inline-flex; align-items: center; gap: 12px; }
.social a { display: inline-flex; color: #cfd5d1; }
.social a:hover { color: #fff; }
.social svg { width: 16px; height: 16px; }
.theme-toggle {
	display: inline-grid; place-items: center; width: 28px; height: 26px; padding: 0; cursor: pointer;
	background: #1d2229; color: #fff; border: 1px solid #3a424b; border-radius: 3px;
}
.theme-toggle svg { width: 15px; height: 15px; }
.topbar__account { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.topbar__hello { display: none; }
.badge {
	display: inline-block; padding: 1px 9px; border-radius: 3px; font-size: 13px; line-height: 1.6;
	background: #2b3330; color: #fff;
}
.badge--active { background: #1f6b3a; }
.badge--pending { background: #7a5b0f; }
.badge--inactive { background: var(--tape); }
.btn-subscribe {
	background: var(--tape); color: #fff !important; padding: 3px 12px; border-radius: 3px; font-weight: 700;
}
.btn-subscribe:hover { background: var(--tape-dark); text-decoration: none !important; }

/* ---------- Masthead + red tape ---------- */
.masthead { background: var(--sheet); }
.masthead__grid { display: grid; gap: 10px; padding-top: 16px; padding-bottom: 14px; text-align: center; justify-items: center; }
@media (min-width: 1000px) {
	.masthead__grid { grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; }
	.masthead__edition { justify-self: start; }
	.masthead__cta { justify-self: end; }
}
.masthead__edition { display: none; font-size: 14px; line-height: 1.55; color: var(--muted); }
.masthead__edition strong { display: block; color: var(--ink); font-size: 15px; }
@media (min-width: 1000px) { .masthead__edition { display: block; } }
.masthead__brand { text-align: center; }
.brand { text-decoration: none; display: inline-block; }
.brand:hover { color: var(--ink); }
.brand .custom-logo { max-height: 76px; width: auto; margin: 0 auto; }
.brand__name {
	font-family: var(--f-head); font-weight: 800; font-size: clamp(36px, 6vw, 58px);
	line-height: 1.12; letter-spacing: -0.01em; display: block;
}
.brand__domain { display: block; font-size: 13px; font-weight: 700; color: var(--tape); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.brand__tagline { display: block; font-size: 14px; color: var(--muted); }
.masthead__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cta {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 3px;
	font-size: 14px; font-weight: 700; text-decoration: none; color: #fff; line-height: 1.6;
}
.cta svg { width: 16px; height: 16px; }
.cta--wa { background: #1c8d46; }
.cta--wa:hover { background: #167238; color: #fff; }
.cta--journal { background: var(--navy); }
.cta--journal:hover { background: var(--navy-2); color: #fff; }
html[data-theme="dark"] .cta--journal { background: #24344f; }

.search-toggle {
	margin-left: auto; background: none; border: 0; width: 44px; height: 44px;
	display: grid; place-items: center; cursor: pointer; color: #fff; flex: none;
}
.search-toggle svg { width: 20px; height: 20px; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); }

/* The court red tape: a bundle tie running under the masthead. */
.tape {
	height: 10px;
	background:
		linear-gradient(to bottom, transparent 3px, rgba(255,255,255,.22) 3px, rgba(255,255,255,.22) 4px, transparent 4px, transparent 6px, rgba(0,0,0,.18) 6px, rgba(0,0,0,.18) 7px, transparent 7px),
		var(--tape);
}

.search-panel { background: var(--sheet); border-bottom: 1px solid var(--rule); position: absolute; left: 0; right: 0; top: 100%; z-index: 55; }
.search-panel[hidden] { display: none; }
.search-panel .wrap { padding-top: 14px; padding-bottom: 14px; }

.search-form { display: flex; gap: 8px; max-width: 620px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid #b9bfba; border-radius: 3px; background: #fff;
}
.search-form button {
	font: inherit; font-weight: 700; padding: 9px 18px; border: 0; border-radius: 3px; background: var(--ink); color: #fff; cursor: pointer;
}

/* ---------- Navigation ---------- */
.nav { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 0; } }
.nav .wrap { display: flex; align-items: center; }
.nav-toggle {
	display: flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-weight: 700;
	padding: 10px 0; cursor: pointer; color: #fff;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav__menu { display: none; }
.nav.is-open .nav__menu { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.12); padding: 6px var(--gap) 14px; }
.nav__menu a { display: block; padding: 9px 0; text-decoration: none; font-weight: 700; font-size: 16px; color: #e6ebf2; }
.nav__menu a:hover { color: #fff; }
.nav__menu .sub-menu a { padding-left: 16px; font-weight: 400; }
.nav__menu .current-menu-item > a,
.nav__menu .current-cat > a { color: #fff; text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 3px; }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.nav__menu { display: flex !important; flex-wrap: wrap; position: static !important; padding: 0 !important; border: 0 !important; }
	.nav__menu > li { position: relative; }
	.nav__menu > li > a { padding: 10px 14px; }
	.nav__menu > li > a:hover { background: rgba(255,255,255,.1); }
	.nav__menu > li.current-menu-item > a,
	.nav__menu > li.current-cat > a { background: var(--tape); text-decoration: none; }
	.nav__menu .sub-menu {
		display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--navy);
		border-top: 2px solid var(--tape); padding: 6px 0; z-index: 60;
	}
	.nav__menu li:hover > .sub-menu,
	.nav__menu li:focus-within > .sub-menu { display: block; }
	.nav__menu .sub-menu a { padding: 7px 16px; }
}

/* ---------- Breaking-news bar ---------- */
.breaking { background: #1a2436; color: #f1f4f8; font-size: 15px; }
.breaking .wrap { display: flex; align-items: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; }
.breaking__tag { flex: none; background: var(--tape); color: #fff; font-size: 13px; font-weight: 700; padding: 1px 10px; border-radius: 2px; }
.breaking__link { color: #f1f4f8; text-decoration: none; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.breaking__link:hover { color: #fff; text-decoration: underline; }

/* ---------- Common bits ---------- */
.site-main { padding: var(--gap) 0 56px; }
.cat-label { color: var(--tape); font-weight: 700; font-size: 14px; text-decoration: none; }
.cat-label:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: 14px; }
.lock {
	display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap;
}
.lock svg { width: 12px; height: 12px; }

.headline { font-family: var(--f-head); font-weight: 700; line-height: 1.45; margin: 4px 0 6px; }
.headline a { text-decoration: none; }
.headline a:hover { color: var(--tape); }

/* Section heading: a file label tied with red tape. */
.section-head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
	border-bottom: 2px solid var(--tape); margin: 0 0 16px;
}
.section-head h2 {
	margin: 0; font-family: var(--f-head); font-size: 18px; font-weight: 700; line-height: 1.5;
	background: var(--tape); color: #fff; padding: 5px 14px 3px; border-radius: 3px 3px 0 0;
}
.section-head h2 a { color: #fff; text-decoration: none; }
.section-head .more { font-size: 14px; font-weight: 700; text-decoration: none; padding-bottom: 4px; }

/* ---------- Home ---------- */
.home-top { display: grid; gap: var(--gap); margin-bottom: 40px; }
@media (min-width: 900px) { .home-top { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; } }

.lead { background: var(--sheet); }
.lead__img { aspect-ratio: 16 / 9; background: var(--file); overflow: hidden; }
.lead__img img { width: 100%; height: 100%; object-fit: cover; }
.lead__body { padding: 16px 20px 22px; }
.lead .headline { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.4; }
.lead__excerpt { color: #333a3f; margin: 6px 0 10px; }

.latest { background: var(--sheet); padding: 16px 20px 6px; }
.latest .section-head { margin-bottom: 4px; }
.latest ol { list-style: none; margin: 0; padding: 0; }
.latest li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.latest li:last-child { border-bottom: 0; }
.latest .headline { font-size: 17px; margin: 0 0 2px; }

.sections { display: grid; gap: 40px var(--gap); }
@media (min-width: 900px) { .sections { grid-template-columns: 1fr 1fr; } }
.cat-block__feature { display: grid; gap: 14px; grid-template-columns: 1fr; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
@media (min-width: 560px) { .cat-block__feature.has-thumb { grid-template-columns: 200px minmax(0, 1fr); } }
.cat-block__feature .thumb { aspect-ratio: 16 / 10; background: var(--file); overflow: hidden; }
.cat-block__feature .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-block__feature .headline { font-size: 20px; margin-top: 0; }
.cat-block ul { list-style: none; margin: 0; padding: 0; }
.cat-block li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.cat-block li .headline { font-size: 16px; margin: 0; }

/* Subscribe band (non-members) */
.join {
	background: var(--gown); color: #fff; margin: 48px 0; padding: 28px var(--gap);
	border-left: 10px solid var(--tape);
}
.join__inner { display: grid; gap: 16px; align-items: center; max-width: var(--wrap); margin: 0 auto; }
@media (min-width: 800px) { .join__inner { grid-template-columns: 1fr auto; } }
.join h2 { font-family: var(--f-head); font-size: clamp(22px, 3vw, 28px); margin: 0 0 4px; line-height: 1.45; }
.join p { margin: 0; color: #d7dbd8; }
.join__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.join a.btn { display: inline-block; padding: 10px 18px; border-radius: 3px; font-weight: 700; text-decoration: none; }
.btn--fb { background: #1877f2; color: #fff; }
.btn--fb:hover { background: #0f63d1; color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--file); color: var(--ink); }
.join__gpay { color: #d7dbd8; font-size: 15px; }

/* ---------- Lists (archive, search, related) ---------- */
.layout { display: grid; gap: 40px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } }

.archive-head { background: var(--sheet); padding: 20px; margin-bottom: var(--gap); border-top: 6px solid var(--tape); }
.archive-head h1 { font-family: var(--f-head); font-size: clamp(26px, 3.5vw, 36px); margin: 0; line-height: 1.4; }
.archive-head p { margin: 6px 0 0; color: var(--muted); }

.row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); padding: 18px 0; border-bottom: 1px solid var(--rule); }
.row:first-child { padding-top: 0; }
@media (min-width: 600px) { .row.has-thumb { grid-template-columns: 220px minmax(0, 1fr); } }
.row .thumb { aspect-ratio: 16 / 10; background: var(--file); overflow: hidden; }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .headline { font-size: 21px; }
.row p { margin: 0 0 6px; color: #333a3f; }

.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	min-width: 40px; padding: 6px 12px; text-align: center; border: 1px solid var(--rule); background: var(--sheet);
	text-decoration: none; border-radius: 3px;
}
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

.empty { background: var(--sheet); padding: 28px; }

/* Sidebar / widgets */
.sidebar .widget { background: var(--sheet); padding: 18px 20px; margin-bottom: var(--gap); }
.widget-title { font-family: var(--f-head); font-size: 18px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--tape); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.widget li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
/* Block widgets (WordPress default sidebar) */
.sidebar .widget h2, .sidebar .wp-block-heading, .sidebar .wp-block-search__label {
	font-family: var(--f-head); font-size: 18px; font-weight: 700; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--tape); display: block;
}
.sidebar .wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.sidebar .wp-block-search__input { font: inherit; padding: 8px 10px; border: 1px solid #b9bfba; border-radius: 3px; min-width: 0; }
.sidebar .wp-block-search__button { font: inherit; font-weight: 700; margin: 0; padding: 8px 14px; border: 0; border-radius: 3px; background: var(--ink); color: #fff; }
.sidebar .wp-block-latest-posts li, .sidebar .wp-block-categories li, .sidebar .wp-block-archives li { font-size: 16px; line-height: 1.6; }

/* ---------- Single article ---------- */
.article { background: var(--sheet); padding: clamp(18px, 4vw, 44px); }
.article__head { max-width: 760px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article h1 {
	font-family: var(--f-head); font-weight: 800; font-size: clamp(27px, 4.2vw, 42px); line-height: 1.38;
	margin: 6px 0 12px; letter-spacing: -0.005em;
}
.article__dek { font-size: 19px; color: #39414a; margin: 0 0 14px; }
.article__meta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
	padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 22px;
}
.article__meta .meta span + span::before { content: "/"; margin: 0 8px; color: var(--rule); }
.tools { display: flex; align-items: center; gap: 6px; }
.tool {
	font: inherit; font-size: 14px; font-weight: 700; min-width: 38px; height: 34px; padding: 0 10px;
	border: 1px solid var(--rule); border-radius: 3px; background: #fff; color: var(--ink); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.tool:hover { border-color: var(--ink); color: var(--ink); }
.tool svg { width: 16px; height: 16px; }
.tool--wa { background: #25d366; border-color: #25d366; color: #fff; }
.tool--wa:hover { background: #1eb455; color: #fff; border-color: #1eb455; }
.tool--fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.tool--fb:hover { background: #0f63d1; color: #fff; border-color: #0f63d1; }

.article__img { margin: 0 0 24px; }
.article__img figcaption { font-size: 14px; color: var(--muted); padding-top: 6px; }

.entry { max-width: 760px; font-size: var(--article-size); line-height: 1.95; }
.entry > * { margin-top: 0; margin-bottom: 1.1em; }
.entry h2, .entry h3, .entry h4 { font-family: var(--f-head); line-height: 1.5; margin-top: 1.6em; margin-bottom: .5em; }
.entry h2 { font-size: 1.35em; }
.entry h3 { font-size: 1.18em; }
.entry a { color: var(--tape); }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li { margin-bottom: .4em; }
/* Quoted passages from judgments read as an extract from the case file. */
.entry blockquote {
	margin-left: 0; margin-right: 0; padding: 14px 18px; background: var(--file); border-left: 4px solid var(--ink);
	font-size: .95em;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { border-collapse: collapse; width: 100%; font-size: .9em; display: block; overflow-x: auto; }
.entry th, .entry td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.entry th { background: var(--file); }
.entry hr { border: 0; border-top: 1px solid var(--rule); }
.entry .wp-block-image figcaption { font-size: 14px; color: var(--muted); }
.entry .alignwide { max-width: none; }

/* Members plugin boxes inside articles */
.entry .nv-teaser p { color: #333a3f; }
.entry .nv-paywall {
	border: 0 !important; border-top: 6px solid var(--tape) !important; background: var(--file) !important;
	border-radius: 0 !important; padding: 26px 20px !important;
}
.entry .nv-paywall a { color: inherit; }
.entry .nv-paywall a[style*="background"] { color: #fff !important; text-decoration: none; }

.article__foot { max-width: 760px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }
.tags a {
	display: inline-block; font-size: 14px; padding: 2px 10px; margin: 0 6px 6px 0; background: var(--file);
	border-radius: 3px; text-decoration: none;
}
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }

.related { margin-top: 40px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 700px) { .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.related li { background: var(--sheet); padding: 14px 16px; border-top: 3px solid var(--ink); }
.related .headline { font-size: 17px; margin: 2px 0 4px; }

.post-nav { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; background: var(--sheet); padding: 14px 16px; text-decoration: none; }
.post-nav small { display: block; color: var(--muted); }
.post-nav .next { text-align: right; }

/* Broadsheet posts: full width, no sidebar */
.article--broadsheet .article__head,
.article--broadsheet .entry,
.article--broadsheet .article__foot { max-width: none; }
.article--broadsheet .article__meta { margin-bottom: 18px; }
.article--broadsheet.is-locked .nvb-columns { column-count: 1; max-width: 760px; }
.article--broadsheet ~ .related ul { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Pages (login, signup, account, Elementor pages) */
.page-body { background: var(--sheet); padding: clamp(18px, 4vw, 40px); }
.page-body h1 { font-family: var(--f-head); font-size: clamp(26px, 3.5vw, 36px); line-height: 1.4; margin: 0 0 18px; }
.page-body .entry { max-width: 760px; }
.elementor-page .site-main { padding: 0; }

/* Members plugin forms */
.nv-login input, .nv-register input, .nv-account input { font: inherit; border: 1px solid #b9bfba; border-radius: 3px; }
.nv-login button, .nv-register button, .nv-account button {
	font: inherit; font-weight: 700; background: var(--ink); color: #fff; border: 0; border-radius: 3px; padding: 10px 22px; cursor: pointer;
}
.nv-login button:hover, .nv-register button:hover, .nv-account button:hover { background: var(--tape); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cdd5df; font-size: 15px; border-top: 10px solid var(--tape); }
.footer-social .social { gap: 16px; }
.footer-social .social svg { width: 20px; height: 20px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 24px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-family: var(--f-head); font-weight: 800; font-size: 30px; color: #fff; line-height: 1.3; }
.footer-grid h2, .site-footer .widget-title { font-family: var(--f-head); font-size: 17px; color: #fff; border: 0; padding: 0; margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 4px 0; border: 0; }
.site-footer .widget { background: none; padding: 0; margin: 0 0 18px; }
.site-footer .widget li { border-color: rgba(255,255,255,.12); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 28px; padding-top: 16px; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 599px) {
	.topbar .social { display: none; }
	.topbar__date { font-size: 13px; }
	.topbar__account { gap: 10px; }
	.topbar__account .hide-sm { display: none; }
	.lead__body, .latest { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 700px) { .topbar__hello { display: inline; } }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------- Print: judgments print cleanly ---------- */
@media print {
	.topbar, .nav, .search-panel, .tools, .share-row, .related, .post-nav, .site-footer, .join, .sidebar, .tape, .breaking, .masthead__cta, .masthead__edition { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.article { padding: 0; }
	.entry { font-size: 12pt; max-width: none; }
	a { text-decoration: none; color: #000; }
}

/* ======================================================================
   Homepage (front-page.php)
   ====================================================================== */
.fp { padding-top: 22px; }
.fp .section-head h3 {
	margin: 0; font-family: var(--f-head); font-size: 17px; font-weight: 700; line-height: 1.5;
	background: var(--tape); color: #fff; padding: 4px 12px 2px; border-radius: 3px 3px 0 0;
}
.fp .section-head h3 a { color: #fff; text-decoration: none; }

/* Cards */
.card .cat-label { display: inline-block; margin-bottom: 2px; }
.card .headline { margin: 2px 0 4px; }
.card__excerpt { color: #3a424a; font-size: 15px; line-height: 1.7; margin: 4px 0 8px; }
html[data-theme="dark"] .card__excerpt { color: var(--muted); }
.thumb { display: block; overflow: hidden; background: var(--file); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--empty { display: grid; place-items: center; text-decoration: none; }
.thumb--empty span { font-family: var(--f-head); font-weight: 700; font-size: 15px; color: var(--muted); padding: 8px; text-align: center; }

.card--lead { background: var(--sheet); }
.card--lead .thumb { aspect-ratio: 16 / 9; }
.card--lead .card__body { padding: 16px 20px 20px; }
.card--lead .headline { font-size: clamp(23px, 2.7vw, 31px); line-height: 1.42; }
.card--lead .card__excerpt { font-size: 16px; }

.card--side { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.card--side:last-child { border-bottom: 0; }
.card--side .thumb { aspect-ratio: 4 / 3; }
.card--side .headline { font-size: 16px; line-height: 1.55; }

.card--tile .thumb { aspect-ratio: 16 / 10; }
.card--tile .headline { font-size: 17px; line-height: 1.55; }

.card--line { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.card--line:last-child { border-bottom: 0; }
.card--line .headline { font-size: 16px; line-height: 1.55; }

/* 1. Top stories */
.top { display: grid; gap: var(--gap); margin-bottom: 26px; align-items: start; grid-template-areas: "lead" "second" "latest"; }
.top__lead { grid-area: lead; }
.top__second { grid-area: second; background: var(--sheet); padding: 4px 16px; display: grid; column-gap: 24px; }
.top__latest { grid-area: latest; }
@media (min-width: 700px) { .top__second { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .top__second .card--side:nth-last-child(2) { border-bottom: 0; } }
@media (min-width: 1050px) {
	.top { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); grid-template-areas: "lead latest" "second latest"; }
}
.top__latest { background: var(--sheet); padding: 14px 18px 6px; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.top__latest .section-head { margin-bottom: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 8px 0 10px 16px; border-left: 2px solid var(--rule); }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); }
.timeline time { display: block; font-size: 13px; font-weight: 700; color: var(--tape); line-height: 1.4; }
.timeline a { text-decoration: none; font-size: 15px; line-height: 1.6; font-weight: 700; }
.timeline a:hover { text-decoration: underline; }

/* 2. Topics */
.topics, .tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.topics { margin-bottom: 34px; }
.topics__label { font-family: var(--f-head); font-weight: 700; margin-right: 4px; }
.topics a, .tags a {
	display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 12px; border: 1px solid var(--rule);
	border-radius: 999px; background: var(--sheet); text-decoration: none; font-size: 14px; line-height: 1.7;
}
.topics a span { font-size: 12px; color: var(--muted); }
.topics a:hover, .tags a:hover { border-color: var(--tape); color: var(--tape); }

/* 3. Courts */
.courts { display: grid; gap: 28px var(--gap); margin-bottom: 36px; }
@media (min-width: 1000px) { .courts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.court { background: var(--sheet); padding: 16px 18px 6px; }
.court__grid { display: grid; gap: 4px 20px; }
@media (min-width: 600px) { .court__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.court__lead .card--tile .headline { font-size: 19px; }
.court__lead .card__excerpt { margin-top: 0; }
.court__list .card--line:first-child { padding-top: 0; }

/* 4. Case notes + most read */
.notes-row { display: grid; gap: 28px var(--gap); margin-bottom: 10px; align-items: start; }
@media (min-width: 1050px) { .notes-row { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); } }
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tiles .card--tile { background: var(--sheet); }
.tiles .card--tile .card__body { padding: 10px 12px 14px; }
.most-read { background: var(--sheet); padding: 16px 18px 8px; }
.most-read ol { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
	counter-increment: mr; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px;
	padding: 10px 0; border-bottom: 1px solid var(--rule);
}
.most-read li:last-child { border-bottom: 0; }
.most-read li::before { content: counter(mr); grid-row: span 2; font-family: var(--f-head); font-weight: 800; font-size: 26px; line-height: 1.2; color: var(--tape); }
.most-read li a { text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.6; }
.most-read li a:hover { text-decoration: underline; }

/* 6. Areas of law */
.band-title {
	font-family: var(--f-head); font-size: 22px; font-weight: 700; line-height: 1.5;
	margin: 8px 0 18px; padding-bottom: 6px; border-bottom: 2px solid var(--ink);
}
.areas { display: grid; gap: 22px var(--gap); margin-bottom: 40px; }
@media (min-width: 700px) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .areas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.area { background: var(--sheet); padding: 14px 16px 4px; }
.area .section-head { margin-bottom: 4px; }
.area .card--side { grid-template-columns: 96px minmax(0, 1fr); }

/* 7. Follow + trending */
.follow { display: grid; gap: 14px; margin-bottom: 36px; }
@media (min-width: 800px) { .follow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.follow__card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; text-decoration: none; color: #fff; }
.follow__card strong { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-size: 19px; line-height: 1.5; }
.follow__card strong svg { width: 20px; height: 20px; }
.follow__card span { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.86); }
.follow__card--journal { background: var(--navy); }
.follow__card--journal:hover { background: var(--navy-2); color: #fff; }
html[data-theme="dark"] .follow__card--journal { background: #24344f; }
.follow__card--wa { background: #1c8d46; }
.follow__card--wa:hover { background: #167238; color: #fff; }
.follow__card--social { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); }
.follow__card--social .social { gap: 16px; margin-top: 6px; }
.follow__card--social .social a { color: var(--ink); }
.follow__card--social .social a:hover { color: var(--tape); }
.follow__card--social .social svg { width: 24px; height: 24px; }
.trending { margin-bottom: 20px; }
.fp + .join, .fp .join { margin-top: 30px; }
@media (max-width: 699px) {
	.topics { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-left: calc(var(--gap) * -1); margin-right: calc(var(--gap) * -1); padding-left: var(--gap); padding-right: var(--gap); scrollbar-width: thin; }
	.topics a, .topics__label { flex: none; white-space: nowrap; }
}
