/*
 * Design preset: Ledger — a broadsheet.
 *
 * Newsprint rather than sheets on a wall: the whole page is paper, blocks are
 * divided by hairlines and double rules instead of floating on a ground, and
 * headlines are set in Playfair Display in sentence case. Libre Franklin
 * carries the small print — folio, kickers, navigation — in tracked capitals.
 * Every colour comes from the palette tokens in main.css.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
body.st-design-ledger {
	--sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
	--display: "Playfair Display", Georgia, "Times New Roman", serif;
	--display-stretch: normal;
	--display-weight: 800;
	--display-case: none;
	--display-lh: 1.02;
	--display-ls: -.01em;
	--script: "Playfair Display", Georgia, serif;

	--wrap: 1240px;
	--lg-x: clamp(16px, 3vw, 32px);
	--rule: 3px double var(--navy);

	background: var(--paper);
	font-size: 1rem;
}

/* Playfair's old-style figures wobble in times and counts. */
.st-design-ledger [class*="__time"],
.st-design-ledger .statbox__item strong,
.st-design-ledger .hbars__value,
.st-design-ledger .line__result strong,
.st-design-ledger .melt__value,
.st-design-ledger .compare dd,
.st-design-ledger .donut__legend strong { font-variant-numeric: lining-nums tabular-nums; }

/* The script accent becomes an italic serif standfirst above the title. */
.st-design-ledger .script-over,
.st-design-ledger .st-modal__script {
	position: static;
	display: block;
	margin: 0 0 .25em;
	font-family: var(--display);
	font-style: italic;
	font-weight: 500;
	font-size: .3em;
	line-height: 1.1;
	letter-spacing: 0;
	transform: none;
}

.st-design-ledger .display:has(.script-over) { margin-top: 0; }
.st-design-ledger .st-modal__script { font-size: 1.5rem; }

.st-design-ledger .poster__script { font-family: var(--display); font-style: italic; font-weight: 500; transform: none; }
.st-design-ledger .spark { display: none; }

.st-design-ledger .btn { letter-spacing: .12em; font-size: .74rem; }

/* ── Header: folio, nameplate, ruled bar ────────────────────────────────── */
.lg-plate {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--lg-x);
}

.lg-folio {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 10px 0;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--text-2);
	border-bottom: 1px solid var(--navy);
}

.lg-folio__cta { color: var(--wine); font-weight: 700; }
.lg-folio__cta:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-nameplate {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 24px;
	padding: clamp(18px, 3vw, 34px) 0 clamp(14px, 2.4vw, 26px);
}

.lg-nameplate__brand { display: grid; justify-items: center; }

.lg-nameplate .custom-logo {
	max-height: clamp(44px, 6.4vw, 88px);
	max-width: min(560px, 60vw);
}

.lg-nameplate .site-logo {
	font-family: var(--display);
	font-size: clamp(2.6rem, 8vw, 5.8rem);
	font-weight: 900;
	letter-spacing: -.02em;
	text-transform: none;
}

.lg-ear {
	max-width: 24ch;
	font-family: var(--display);
	font-style: italic;
	font-size: .9rem;
	line-height: 1.35;
	color: var(--text-2);
}

.lg-ear--right { justify-self: end; text-align: right; }

/* The bar is the sticky <header>. */
.st-design-ledger .site-header {
	position: sticky;
	top: 0;
	padding: 0;
	background: var(--paper);
	border-top: 1px solid var(--navy);
	border-bottom: var(--rule);
	transition: box-shadow .25s ease;
}

.admin-bar.st-design-ledger .site-header { top: var(--wp-admin--admin-bar--height, 0px); }

.st-design-ledger .site-header.is-scrolled { box-shadow: 0 10px 24px -20px var(--deep); }

.lg-bar__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: var(--wrap);
	min-height: 50px;
	margin: 0 auto;
	padding: 0 var(--lg-x);
}

/* A small copy of the brand slides in once the nameplate has scrolled off. */
.lg-bar__brand {
	flex: none;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width .3s ease, opacity .3s ease;
}

.site-header.is-scrolled .lg-bar__brand { max-width: 220px; opacity: 1; }
.lg-bar__brand .custom-logo { max-height: 26px; max-width: 200px; }
.lg-bar__brand .site-logo { font-family: var(--display); font-size: 1.3rem; text-transform: none; }

.lg-nav { flex: 1; min-width: 0; }

.st-design-ledger .nav-primary .nav-list { gap: clamp(.4rem, 2vw, 2rem); }

.st-design-ledger .nav-primary .nav-list a {
	padding: .9rem .1rem;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .14em;
}

.st-design-ledger .nav-primary .nav-list > li > a::after { bottom: .5rem; background: var(--wine); }

.st-design-ledger .menu-toggle { height: 38px; margin-left: auto; border-width: 1px; }
.st-design-ledger .menu-toggle__icon { width: 24px; height: 24px; }

/* ── Main frame ─────────────────────────────────────────────────────────── */
.st-design-ledger .site-main {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--lg-x);
	gap: 0;
}

/* Inner pages: the sheets become ruled sections of newsprint. */
.st-design-ledger .site-main > .sheet:not(.sheet--navy) {
	padding: clamp(24px, 4vw, 44px) 0;
	background: transparent;
	border-bottom: 1px solid var(--line);
}

.st-design-ledger .sheet--soft { background: transparent; }

.st-design-ledger .archive-head { border-bottom: var(--rule); }
.st-design-ledger .card { border-color: transparent !important; padding: 0 0 14px; border-bottom: 1px solid var(--line) !important; }
.st-design-ledger .card__title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.st-design-ledger .card__rings { display: none; }
.st-design-ledger .card__top { grid-template-columns: 1fr auto; padding: 0; }
.st-design-ledger .card__desk { color: var(--wine); letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; }

.st-design-ledger .entry-content { font-family: var(--display); font-size: 1.16rem; line-height: 1.7; }
.st-design-ledger .entry-content h2 { text-transform: none; }

.st-design-ledger .panel { background: transparent; }
.st-design-ledger .panel__title { padding: 0; background: none; color: var(--navy); border-bottom: 2px solid var(--navy); }
.st-design-ledger .panel__dots,
.st-design-ledger .sheet__dots { display: none; }

/* Sessions: ruled rows instead of boxes. */
.st-design-ledger .session {
	padding: .55rem 0;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line);
}

.st-design-ledger .session__time { font-size: 1.3rem; font-weight: 700; }

/* ── Front: the top of the page ─────────────────────────────────────────── */
.st-design-ledger .lg-front { display: block; padding-top: clamp(20px, 3vw, 32px); }

.lg-front__top {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 6.2fr) minmax(0, 3fr);
}

.lg-front__top > * { padding: 0 clamp(16px, 2vw, 28px); }
.lg-front__top > * + * { border-left: 1px solid var(--line); }
.lg-front__top > :first-child { padding-left: 0; }
.lg-front__top > :last-child { padding-right: 0; }

.lg-label {
	margin-bottom: 14px;
	padding-bottom: 6px;
	font-family: var(--sans);
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--navy);
	border-bottom: 2px solid var(--navy);
}

.lg-label--rule { padding-top: 8px; border-top: var(--rule); border-bottom-width: 1px; }

.lg-kicker {
	display: inline-block;
	margin-bottom: 6px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wine);
}

.lg-kicker:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-meta {
	margin-top: 8px;
	font-size: .72rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--text-3);
}

.lg-brief + .lg-brief { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.lg-brief__title,
.lg-desk__title,
.lg-digest__title {
	font-family: var(--display);
	font-weight: 700;
	line-height: 1.18;
	color: var(--navy);
	text-wrap: pretty;
}

.lg-brief__title { font-size: 1.28rem; }
.lg-brief__dek { margin-top: 6px; font-size: .92rem; line-height: 1.5; color: var(--text-2); }

.lg-brief__title a:hover,
.lg-desk__title a:hover,
.lg-digest__title a:hover,
.lg-lead__title a:hover,
.lg-desk__more a:hover,
.lg-numbered a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.lg-lead__media {
	display: block;
	aspect-ratio: 3 / 2;
	margin-bottom: 14px;
	overflow: hidden;
	background: var(--mist);
}

.lg-lead__media img { width: 100%; height: 100%; object-fit: cover; }

.lg-lead__title {
	font-family: var(--display);
	font-size: clamp(2rem, 3.8vw, 3.4rem);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -.015em;
	color: var(--navy);
	text-wrap: balance;
}

.lg-lead.lead--medium .lg-lead__title { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
.lg-lead.lead--long .lg-lead__title { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }

.lg-lead__dek {
	margin-top: 12px;
	font-family: var(--display);
	font-style: italic;
	font-size: 1.14rem;
	line-height: 1.5;
	color: var(--text-2);
}

.lg-numbered { counter-reset: lg; }

.lg-numbered li {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	column-gap: 8px;
	padding: 10px 0;
	counter-increment: lg;
}

.lg-numbered li + li { border-top: 1px solid var(--line); }

.lg-numbered li::before {
	content: counter(lg);
	grid-row: span 2;
	font-family: var(--display);
	font-size: 1.7rem;
	font-weight: 900;
	line-height: 1;
	color: var(--wine);
}

.lg-numbered a { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.25; }
.lg-numbered time { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

.lg-floors { margin-top: 28px; }
.lg-floors .session { grid-template-columns: 24px 1fr auto; gap: 10px; }
.lg-floors .session__mark { width: 22px; height: 22px; }
.lg-floors .session__name { font-size: .88rem; }
.lg-floors .session__note { font-size: .72rem; }
.lg-floors .session__time { font-size: 1.1rem; }

/* ── Front: desks as newspaper columns ─────────────────────────────────── */
.lg-desks {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	margin: clamp(32px, 4vw, 48px) -20px 0;
	padding-top: 20px;
	background: var(--line);
	border-top: var(--rule);
	/* The line colour shows only through the 1px gaps between columns, not
	   behind the padding above them. */
	background-clip: content-box;
}

.lg-desk {
	flex: 1 1 220px;
	min-width: 0;
	padding: 0 20px 24px;
	background: var(--paper);
}

.lg-desk__name {
	margin-bottom: 12px;
	padding-bottom: 6px;
	font-family: var(--display);
	font-style: italic;
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.1;
	color: var(--navy);
	border-bottom: 1px solid var(--navy);
}

.lg-desk__media {
	display: block;
	aspect-ratio: 3 / 2;
	margin-bottom: 10px;
	overflow: hidden;
	background: var(--mist);
}

.lg-desk__media img { width: 100%; height: 100%; object-fit: cover; }

.lg-desk__title { font-size: 1.12rem; }
.lg-desk__dek { margin-top: 6px; font-size: .88rem; line-height: 1.5; color: var(--text-2); }

.lg-desk__more { margin-top: 12px; }

.lg-desk__more li {
	padding: 8px 0;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.3;
	border-top: 1px dotted var(--text-3);
}

/* ── Front: the special report ──────────────────────────────────────────── */
.lg-feature {
	margin-top: clamp(32px, 4vw, 48px);
	padding: clamp(20px, 3vw, 40px);
	border: var(--rule);
}

.lg-feature__head {
	max-width: 62ch;
	margin: 0 auto clamp(20px, 3vw, 32px);
	text-align: center;
}

.lg-feature__head .lg-label { display: inline-block; border: 0; margin-bottom: 4px; color: var(--wine); }

.lg-feature__title {
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(1.8rem, 3.4vw, 2.8rem);
	line-height: 1.06;
	color: var(--navy);
	text-wrap: balance;
}

.lg-feature__dek {
	margin-top: 10px;
	font-family: var(--display);
	font-style: italic;
	font-size: 1.08rem;
	line-height: 1.5;
	color: var(--text-2);
}

/* ── Front: digest ──────────────────────────────────────────────────────── */
.lg-digest { margin-top: clamp(32px, 4vw, 48px); }

.lg-digest__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 28px;
}

.lg-digest__item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}

.lg-digest__media { display: block; aspect-ratio: 1; overflow: hidden; background: var(--mist); }
.lg-digest__media img { width: 100%; height: 100%; object-fit: cover; }
.lg-digest__title { font-size: 1.02rem; }
.lg-digest__item--text { grid-template-columns: 1fr; }

/* ── Footer and newsletter ──────────────────────────────────────────────── */
.st-design-ledger .cta { margin-top: clamp(32px, 4vw, 48px); max-width: calc(var(--wrap) - 2 * var(--lg-x)); width: calc(100% - 2 * var(--lg-x)); }
.st-design-ledger .site-footer { padding: clamp(24px, 3vw, 40px) 0 0; }
.st-design-ledger .site-footer__inner { max-width: none; padding-inline: max(var(--lg-x), calc((100% - var(--wrap)) / 2 + var(--lg-x))); }
.st-design-ledger .footer-word { font-style: italic; text-transform: none; letter-spacing: -.03em; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
	.lg-front__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.lg-front__top > .lg-lead {
		grid-column: 1 / -1;
		order: -1;
		margin-bottom: 24px;
		padding: 0 0 24px;
		border-left: 0;
		border-bottom: 1px solid var(--line);
	}

	.lg-front__top > .lg-col--briefs { padding-left: 0; border-left: 0; }

	.lg-digest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.lg-folio__issue,
	.lg-ear { display: none; }

	.lg-nameplate { grid-template-columns: 1fr; padding: 16px 0 14px; }

	.lg-front__top { grid-template-columns: 1fr; }

	.lg-front__top > * { padding: 0 !important; border-left: 0 !important; }
	.lg-front__top > .lg-col--latest { margin-top: 24px; padding-top: 4px !important; border-top: var(--rule); }

	.lg-desks { margin-inline: 0; }
	.lg-desk { padding-inline: 0; }

	.lg-digest__grid { grid-template-columns: 1fr; }
	.lg-digest__item { grid-template-columns: 80px minmax(0, 1fr); }

}
