/* =========================================================================
   Ralph Jacobs Legal Hub — additions to the shared corporate shell
   -------------------------------------------------------------------------
   assets/css/main.css is byte-identical with the Ralph Jacobs Blog theme and
   must stay that way, so every hub-only rule lives here. Only add rules for
   markup the blog does not have; never restyle a shared .rj-* component.

   Uses the shell's own custom properties (--rj-*), so a palette change in
   main.css flows through here automatically.

   NOTE: styling for the PLUGIN's legal-document markup (.rj-legal-doc, .rj-toc,
   .rj-doc-layout, .rj-section, clauses, badges, tables, print) lives in
   assets/css/legal-content.css, next to the markup it targets. This file is
   only for the shared shell + the entry furniture the blog does not have.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Entry furniture. main.css styles .rj-entry and .rj-entry__title; the header
   and content wrappers are hub markup.
   ------------------------------------------------------------------------- */
.rj-entry__header {
	margin-block-end: 24px;
}

.rj-entry__content > * + * {
	margin-block-start: 1em;
}

/* Ordinary pages (contact, cookie preferences, 404) read as a single column at
   a comfortable measure. Legal documents opt out below (they lay out their own
   ToC + body). */
.rj-entry__content {
	max-width: 68ch;
}

.rj-entry__content h2,
.rj-entry__content h3 {
	margin-block-start: 1.8em;
}

.rj-entry--none {
	max-width: 68ch;
}

/* -------------------------------------------------------------------------
   Archive / search headers.
   ------------------------------------------------------------------------- */
.rj-archive__header {
	margin-block-end: 32px;
	padding-block-end: 20px;
	border-block-end: 1px solid var(--rj-border-subtle);
}

.rj-search__term {
	font-style: italic;
	color: var(--rj-text-secondary);
}

/* -------------------------------------------------------------------------
   Plain link list (404 recovery routes, simple index blocks).
   ------------------------------------------------------------------------- */
.rj-linklist {
	margin: 20px 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rj-linklist > li {
	padding-inline-start: 14px;
	border-inline-start: 2px solid var(--rj-gold-on-light);
}

/* -------------------------------------------------------------------------
   Footer standing note. Occupies the slot the blog gives its newsletter
   sign-up, so it inherits .rj-footer__aside alignment (end-aligned on
   desktop, centred on mobile) and only needs its own type treatment.
   ------------------------------------------------------------------------- */
.rj-footer__note {
	margin: 0;
	max-width: 46ch;
	font-size: 13px;
	line-height: 1.55;
	text-align: end;
	color: var(--rj-parchment);
}

@media (max-width: 767px) {
	.rj-footer__note {
		text-align: center;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.rj-footer__note {
		text-align: start;
	}
}

/* =========================================================================
   Deliberate divergences from the shared shell (hub only). See
   docs/HUB-THEME-PARITY.md § Deliberate differences. main.css / theme.json are
   untouched, so the Blog (which never loads this file) is unaffected. Only
   shell-level rules live here; legal *document* styling is in legal-content.css.
   ========================================================================= */

/* White "paper" across the hub — legal text reads best near-black on white. */
body {
	background: var(--rj-white, #ffffff);
}

/* Legal document pages use the full content container; legal-content.css lays
   out the ToC + document within it. Ordinary pages keep the 68ch measure above. */
.rj-entry__content:has(.rj-legal-doc) {
	max-width: none;
}

@media (min-width: 1200px) {
	.rj-content--page:has(.rj-legal-doc) { max-width: 1200px; }
}

@media (min-width: 1600px) {
	.rj-content--page:has(.rj-legal-doc) { max-width: 1320px; }
}
