/* Legacy Journal.
 *
 * Scoped to .lj, plus a short list of body.lj-article overrides that have to
 * reach the theme's own markup. Nothing here is global: a site-wide color rule
 * once made the dark green sections of this site unreadable.
 *
 * Tokens match the guides and the district pages exactly, so the three sets of
 * pages read as one publication. #4A9456 is absent deliberately; it was retired
 * from the palette for failing contrast on light grounds.
 */

.lj {
	--paper: #F2EDE3;
	--surface: #F8F6F1;
	--ink: #1A1A1A;
	--ink-2: #4A4841;
	--muted: #6A6A6A;
	--rule: #D8D3C8;
	--green: #1D7A3F;      /* 5.0:1 on --paper */
	--green-deep: #162D1A;
	--green-soft: #DCEBDE;
	--brass: #7E6322;

	--display: "Zilla Slab", Georgia, serif;
	--body: "Karla", "Helvetica Neue", Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17.5px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	padding: 52px clamp(18px, 5vw, 64px) 64px;
}

.lj * { box-sizing: border-box; }

/* ---- theme overrides ------------------------------------------------
 *
 * Bridge prints the post title as <h2 class="entry_title"> with the day and
 * month inside the same element, and the site runs with Qode's title area
 * switched off, so a post has no H1 at all. The real H1 is injected into the
 * content; this hides the theme's version so the title does not appear twice.
 *
 * Kept to body.lj-article, which only single posts carry, so archives and
 * every other template are untouched.
 */

body.lj-article .blog_single .entry_title,
body.lj-article .blog_holder article .entry_title,
body.lj-article .blog_single .post_info {
	display: none !important;
}

/* Bridge uppercases headings theme-wide. On sentence-length headings that is
   shouting, and it breaks the descender rhythm Zilla Slab is chosen for. */
.lj h1,
.lj h2,
.lj h3 {
	text-transform: none !important;
	font-family: var(--display) !important;
}

.lj .lj-body h2,
.lj .lj-body h3 { color: var(--ink) !important; }

/* ---- head ---------------------------------------------------------- */

.lj .lj-kicker {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--brass);
	margin: 0 0 14px;
}

.lj .lj-kicker a { color: inherit; text-decoration: none; }
.lj .lj-kicker a:hover { text-decoration: underline; }

.lj .lj-title {
	font-weight: 700;
	font-size: clamp(31px, 4.2vw, 48px);
	line-height: 1.06 !important;
	letter-spacing: -0.022em;
	color: var(--ink) !important;
	margin: 0;
	max-width: 22ch;
	text-wrap: balance;
}

.lj .lj-standfirst {
	font-size: clamp(18px, 2.1vw, 21px);
	line-height: 1.5;
	color: var(--ink-2);
	max-width: 56ch;
	margin: 18px 0 0;
}

.lj .lj-meta {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 22px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--rule);
	display: flex;
	gap: 10px;
	max-width: 56ch;
}

/* ---- article body -------------------------------------------------- */

/* 66 characters is the measure prose is easiest to read at. The theme's
   container is far wider than that, so the limit is set here. */
.lj .lj-body {
	margin-top: 40px;
	max-width: 66ch;
}

.lj .lj-body p {
	margin: 0 0 20px;
	color: var(--ink-2);
}

.lj .lj-body h2 {
	font-size: clamp(22px, 2.5vw, 28px);
	font-weight: 700;
	line-height: 1.2 !important;
	letter-spacing: -0.012em;
	margin: 44px 0 14px;
	text-wrap: balance;
}

.lj .lj-body h3 {
	font-size: clamp(18px, 2vw, 21px);
	font-weight: 600;
	line-height: 1.3 !important;
	margin: 32px 0 10px;
}

.lj .lj-body ul,
.lj .lj-body ol {
	margin: 0 0 20px;
	padding-left: 22px;
	color: var(--ink-2);
}

.lj .lj-body li { margin-bottom: 9px; }

.lj .lj-body blockquote {
	margin: 28px 0;
	padding: 2px 0 2px 20px;
	border-left: 3px solid var(--green);
	font-size: 19px;
	color: var(--ink);
}

.lj .lj-body blockquote p:last-child { margin-bottom: 0; }

.lj .lj-body strong,
.lj .lj-body b { color: var(--ink); }

/* Tables turn up in anything explaining a deadline or a limit. They must not
   push the page sideways on a phone. */
.lj .lj-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 22px;
	font-size: 15.5px;
}

.lj .lj-body th,
.lj .lj-body td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}

.lj .lj-body th {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	border-bottom: 2px solid var(--ink);
}

.lj .lj-body tbody tr:last-child td { border-bottom: 0; }

/* ---- links --------------------------------------------------------- */

.lj a {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(29, 122, 63, .45);
}

.lj a:hover { text-decoration-color: var(--green); }

.lj a:focus-visible {
	outline: 2px solid var(--green);
	outline-offset: 2px;
}

/* ---- tail ---------------------------------------------------------- */

.lj .lj-tail {
	margin-top: 52px;
	padding: 28px 30px;
	background: var(--green-soft);
	max-width: 70ch;
}

.lj .lj-tail h2 {
	font-size: clamp(20px, 2.3vw, 25px);
	font-weight: 700;
	line-height: 1.2 !important;
	color: var(--green-deep) !important;
	margin: 0 0 10px;
	text-wrap: balance;
}

.lj .lj-tail p { margin: 0 0 14px; color: var(--ink-2); }
.lj .lj-tail p:last-child { margin-bottom: 0; }

.lj .lj-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.lj .lj-btn {
	display: inline-block;
	font-weight: 600;
	font-size: 16px;
	padding: 13px 24px;
	border: 2px solid var(--green);
	background: var(--green);
	color: #FFFFFF;             /* 4.8:1 on #1D7A3F */
	text-decoration: none;
}

.lj .lj-btn:hover { background: var(--green-deep); border-color: var(--green-deep); }

.lj .lj-btn-ghost { background: transparent; color: var(--green); }
.lj .lj-btn-ghost:hover { background: #FFFFFF; color: var(--green-deep); }

.lj .lj-foot {
	margin-top: 46px;
	padding-top: 18px;
	border-top: 1px solid var(--rule);
	font-family: var(--mono);
	font-size: 11px;
	line-height: 1.85;
	color: var(--muted);
	max-width: 74ch;
}

/* ---- the index ----------------------------------------------------- */

.lj-index .lj-group { margin-top: 56px; }

.lj-index .lj-group-title {
	font-size: clamp(23px, 2.6vw, 30px);
	font-weight: 700;
	line-height: 1.15 !important;
	color: var(--ink) !important;
	margin: 0 0 10px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--ink);
}

.lj-index .lj-group-blurb {
	color: var(--ink-2);
	max-width: 64ch;
	margin: 14px 0 0;
}

.lj-index .lj-list {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	display: grid;
	gap: 0;
}

.lj-index .lj-item {
	padding: 22px 0;
	border-top: 1px solid var(--rule);
	max-width: 68ch;
}

.lj-index .lj-item:first-child { border-top: 0; padding-top: 4px; }

.lj-index .lj-item-title {
	display: inline-block;
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(19px, 2.1vw, 23px);
	line-height: 1.25;
	color: var(--ink);
	text-decoration: none;
	text-wrap: balance;
}

.lj-index .lj-item-title:hover {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.lj-index .lj-item-dek {
	margin: 8px 0 0;
	color: var(--ink-2);
	font-size: 16.5px;
}

.lj-index .lj-item-meta {
	margin: 10px 0 0;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
}

.lj-index .lj-empty,
.lj .lj-empty-all {
	color: var(--muted);
	font-style: italic;
	margin-top: 20px;
}

@media (max-width: 640px) {
	.lj { padding: 34px 18px 48px; font-size: 17px; }
	.lj .lj-body { margin-top: 30px; }
	.lj .lj-tail { padding: 20px 18px; }
	.lj .lj-actions .lj-btn { flex: 1 1 100%; text-align: center; }
	.lj-index .lj-group { margin-top: 42px; }
	.lj .lj-body table { display: block; overflow-x: auto; }
}

/* ---- guides beside the posts ---------------------------------------
 *
 * Long-form guides are pages, not posts, so they never appear in a category
 * listing. They are listed here explicitly and styled as a distinct kind of
 * thing -- a standing reference rather than something published on a date --
 * which is why they carry a rule and a label instead of a timestamp.
 */

.lj-index .lj-guides {
	list-style: none;
	margin: 24px 0 0;
	padding: 18px 0 0;
	border-top: 1px solid var(--rule);
	display: grid;
	gap: 18px;
	max-width: 68ch;
}

.lj-index .lj-guides::before {
	content: "Guides";
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--brass);
}

.lj-index .lj-guide { margin: 0; }

.lj-index .lj-guide-title {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(18px, 2vw, 21px);
	line-height: 1.25;
	color: var(--ink);
	text-decoration: none;
}

.lj-index .lj-guide-title:hover {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.lj-index .lj-guide-dek {
	margin: 6px 0 0;
	color: var(--ink-2);
	font-size: 16px;
	max-width: 64ch;
}
