/*
Theme Name: Constellation
Author: Ilyas
Description: A constellation-themed block theme for Letters from Ilyas. A live star-map header that can shrink and follow you, postcard-style posts that are clickable all over, live search, posts that load as you scroll, a Thoughts timeline, light and dark color schemes, simple settings in Appearance › Customize, and a black hole.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: constellation
Update URI: false
Tags: blog, dark, two-columns, right-sidebar, custom-logo, custom-menu, full-site-editing
*/

/* Colors and setting values are added after this file from Appearance › Customize. */

/* ---------- Basics ---------- */
body {
	margin: 0;
	--cst-text: 17px;
	--cst-hh: 230;
	--cst-logo: 88px;
	--cst-cols: 2;
	--cst-card-title: 26px;
	--cst-radius: 12px;
	--cst-content: 1240px;
	--cst-side-w: 280px;
	--cst-post-size: 19px;
	--cst-read-w: 720px;
	--cst-lh: 1.75;
	--cst-head-scale: 1;
	--cst-post-font: var(--wp--preset--font-family--body);
	-webkit-font-smoothing: antialiased;
}
.wp-site-blocks > * + * { margin-block-start: 0; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
mark.lt-hit { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); border-radius: 3px; padding: 0 2px; }

/* Smooth page changes: the header stays put while the rest fades (supporting browsers only). */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	.lt-header { view-transition-name: cst-header; }
	::view-transition-group(cst-header),
	::view-transition-old(cst-header),
	::view-transition-new(cst-header) { animation: none; }
	::view-transition-old(root),
	::view-transition-new(root) { animation-duration: 120ms; }
}

/* ---------- Header ---------- */
.lt-header {
	position: relative;
	overflow: visible;
	padding: 0;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.lt-header > * { margin: 0 !important; }
.lt-constellation {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	display: block;
	pointer-events: none;
}
.lt-headinner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
}
.lt-headinner > * { margin: 0 !important; }
.lt-lockup {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: calc(16px + var(--cst-logo) * 0.12);
	min-height: calc(var(--cst-hh) * 1px);
	padding: 24px;
	box-sizing: border-box;
}
.lt-lockup > * { margin: 0 !important; }

/* Sticky menu bar: the header scrolls up until only the menu bar is left, then stays.
   Pure CSS scrolling, so it moves exactly with your finger or wheel. */
.cst-sticky-shrink .wp-site-blocks > .wp-block-template-part:has(> .lt-header),
.cst-sticky-menu .wp-site-blocks > .wp-block-template-part:has(> .lt-header) {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--cst-sticky-off, calc(var(--cst-hh) * 1px)));
	z-index: 50;
}
.cst-header-slim .wp-site-blocks > .wp-block-template-part:has(> .lt-header) { --cst-sticky-off: 0px; }
html:has(body.cst-sticky-shrink), html:has(body.cst-sticky-menu) { scroll-padding-top: 96px; }
.lt-header::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 18px;
	transform: translateY(100%);
	background: linear-gradient(rgba(0, 0, 0, 0.22), transparent);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}
.lt-header { overflow: visible; }
.lt-constellation { clip-path: inset(0); }
.cst-pinned .lt-header::after { opacity: 1; }

/* Small title (and tagline) that slides into the pinned menu bar */
.lt-nav { position: relative; }
.lt-mini {
	position: absolute;
	top: 50%;
	left: max(24px, calc((100% - var(--cst-content)) / 2 + 24px));
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-8px, -50%);
	pointer-events: none;
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .7, .2, 1);
}
.lt-mini-text { display: flex; flex-direction: column; gap: 3px; }
.lt-mini-title { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: 0.05em; text-transform: uppercase; }
.lt-mini-tagline { font-size: 12px; line-height: 1.1; color: var(--wp--preset--color--soft); }
.cst-no-tagline .lt-mini-tagline { display: none; }
.lt-mini-logo { width: 30px; height: 30px; object-fit: contain; }
.lt-menu-list { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.cst-pinned .lt-mini-fits .lt-mini { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.cst-pinned .lt-mini-fits .lt-menu-list { transform: translateX(var(--cst-mini-w, 0px)); }
@media (prefers-reduced-motion: reduce) {
	.lt-mini, .lt-menu-list, .lt-header::after { transition: none; }
}
.lt-logo img {
	display: block;
	width: var(--cst-logo) !important;
	height: auto !important;
	max-height: var(--cst-logo);
	object-fit: contain;
}
.lt-divider { display: block; width: 1px; height: calc(var(--cst-logo) * 0.9); background: var(--wp--preset--color--accent); }
.lt-lockup:not(:has(.wp-block-site-logo img)) .lt-divider { display: none; }
.lt-lockup:has(.wp-block-site-logo img:not([src])) .lt-divider,
.wp-block-site-logo:has(img:not([src])) { display: none; }
.lt-lockup:has(.custom-logo-link[style*="none"]) .lt-divider,
.wp-block-site-logo:has(.custom-logo-link[style*="none"]) { display: none; }
.lt-titles { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.lt-titles > * { margin: 0 !important; }
.lt-site-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(36px, calc(36px + (var(--cst-hh) - 130) * 0.24px), 76px);
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.lt-site-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.lt-tagline { font-size: clamp(15px, calc(16px + (var(--cst-hh) - 130) * 0.017px), 20px); color: var(--wp--preset--color--soft); }
.cst-no-tagline .lt-tagline { display: none; }

/* Menu bar (under the title, or beside it in the slim header).
   Desktop: links, then the round buttons, then Subscribe, all on one row.
   Phones: title and buttons on the first row, links and Subscribe on the second. */
.lt-nav {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "links gap tools sub";
	align-items: center;
	column-gap: 10px;
	row-gap: 4px;
	padding: 10px max(24px, calc((100% - var(--cst-content)) / 2 + 24px));
	box-sizing: border-box;
	border-top: 1px solid var(--wp--preset--color--line);
	background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent);
}
.lt-menu-list { grid-area: links; display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.lt-menu-list li { margin: 0; }
.lt-menu-list a {
	display: block;
	padding: 10px 12px;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: var(--cst-menu-size, 15px);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
	border-bottom: 2px solid transparent;
}
.lt-menu-list a:hover { color: var(--wp--preset--color--contrast); }
.lt-menu-list .current-menu-item > a,
.lt-menu-list a[aria-current="page"] {
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}
.lt-nav-tools { grid-area: tools; display: flex; align-items: center; gap: 8px; }
.lt-size-btn svg { width: 20px; height: 20px; }
.lt-icon-btn[aria-expanded="true"] { color: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--accent); }

/* Text size panel (opens under the "Aa" button) */
.lt-size-wrap { position: relative; }
.lt-size-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: -56px;
	z-index: 60;
	width: 236px;
	box-sizing: border-box;
	padding: 14px 14px 10px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
	font-family: var(--wp--preset--font-family--body);
	text-align: center;
}
.lt-size-panel[hidden] { display: none; }
.lt-size-label { display: block; margin-bottom: 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.lt-size-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lt-size-row button {
	width: 44px; height: 40px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--display);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.lt-size-row button[data-lt-size="1"] { font-size: 20px; }
.lt-size-row button:hover:not(:disabled) { border-color: var(--wp--preset--color--accent); }
.lt-size-row button:disabled { opacity: 0.35; cursor: default; }
.lt-size-dots { display: flex; align-items: flex-end; gap: 6px; }
.lt-size-dots i { display: block; box-sizing: border-box; border: 1px solid var(--wp--preset--color--accent); border-radius: 50%; }
.lt-size-dots i:nth-child(1) { width: 6px; height: 6px; }
.lt-size-dots i:nth-child(2) { width: 8px; height: 8px; }
.lt-size-dots i:nth-child(3) { width: 10px; height: 10px; }
.lt-size-dots i:nth-child(4) { width: 12px; height: 12px; }
.lt-size-dots i:nth-child(5) { width: 14px; height: 14px; }
.lt-size-dots i.on { background: var(--wp--preset--color--accent); }
.lt-size-reset { margin-top: 8px; min-height: 32px; padding: 0 10px; border: 0; background: none; color: var(--wp--preset--color--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.lt-icon-btn {
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 50%;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease;
}
.lt-icon-btn:hover { color: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--accent); }
.lt-icon-btn svg { width: 19px; height: 19px; display: block; }
.lt-blackhole-btn svg { width: 21px; height: 21px; }
.lt-theme-toggle .lt-moon { display: none; }
html[data-theme="light"] .lt-theme-toggle .lt-sun { display: none; }
html[data-theme="light"] .lt-theme-toggle .lt-moon { display: block; }
.lt-subscribe {
	grid-area: sub;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 999px;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.lt-subscribe svg { width: 16px; height: 16px; }
.lt-subscribe:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }

/* Slim header: title and menu share one bar */
.cst-header-slim .lt-headinner {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	max-width: var(--cst-content);
	margin: 0 auto;
	padding: 12px 24px;
	box-sizing: border-box;
}
.cst-header-slim .lt-lockup {
	min-height: calc(var(--cst-hh) * 1px - 24px);
	padding: 0;
	gap: 14px;
	justify-content: flex-start;
}
.cst-header-slim .lt-logo img { width: min(var(--cst-logo), calc(var(--cst-hh) * 1px - 36px)) !important; }
.cst-header-slim .lt-divider { height: calc(var(--cst-hh) * 1px - 50px); }
.cst-header-slim .lt-titles { gap: 4px; }
.cst-header-slim .lt-site-title { font-size: clamp(22px, calc(var(--cst-hh) * 0.28px), 32px); }
.cst-header-slim .lt-tagline { font-size: 13px; }
.cst-header-slim .lt-nav { flex: 1 1 auto; border-top: 0; background: transparent; padding: 0; }
.cst-header-slim .lt-mini { display: none; }

/* ---------- Main layout: posts + sidebar ---------- */
.lt-main {
	max-width: var(--cst-content);
	margin: 0 auto !important;
	padding: 40px 24px 72px;
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 36px;
}
.lt-main > * { margin: 0 !important; }
.lt-content { flex: 999 1 480px; min-width: 0; }
.lt-content > * { margin-block: 0; }
.lt-main > .wp-block-template-part { flex: 1 1 var(--cst-side-w); max-width: 100%; min-width: 0; }
.cst-side-left .lt-main > .wp-block-template-part { order: -1; }
.cst-side-off .lt-main > .wp-block-template-part { display: none; }
.lt-top-search { display: none; margin-bottom: 22px !important; }
.cst-side-off .lt-top-search { display: block; }
.lt-eyebrow, .lt-search-summary {
	margin: 0 0 22px !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 15px !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--muted);
}
.lt-eyebrow { letter-spacing: 0.14em; text-transform: uppercase; }
.lt-empty { color: var(--wp--preset--color--muted); }

/* Live search status line */
.lt-search-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; }
.lt-search-status[hidden] { display: none; }
.lt-search-line { margin: 0; font-family: var(--wp--preset--font-family--display); font-size: 15px; font-weight: 700; color: var(--wp--preset--color--muted); }
.lt-search-clear {
	min-height: 34px;
	padding: 0 14px;
	background: transparent;
	color: var(--wp--preset--color--soft);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.lt-search-clear:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--contrast); }
body.lt-searching .lt-loader,
body.lt-searching .lt-query .wp-block-query-pagination { display: none !important; }

/* ---------- Post cards: the whole card is the link ---------- */
.lt-query .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(max(220px, calc((100% - (var(--cst-cols) - 1) * var(--cst-gap, 32px)) / var(--cst-cols))), 1fr));
	gap: var(--cst-gap, 32px);
	padding: 0 var(--cst-back-off, 12px) var(--cst-back-off, 12px) 0;
}
.cst-no-backing .lt-query .wp-block-post-template { padding: 0; }
.lt-query .wp-block-post-template > li { margin: 0 !important; }
.lt-card {
	position: relative;
	height: 100%;
	min-height: 220px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 26px;
	background: var(--wp--preset--color--base);
	border: 2px solid var(--pc-frame, var(--wp--preset--color--border));
	border-radius: var(--cst-radius);
	/* The backing: a solid block offset behind the card. */
	box-shadow: var(--cst-back-off, 12px) var(--cst-back-off, 12px) 0 0 var(--pc-back);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.lt-card > * { margin: 0 !important; }
.lt-card:hover {
	transform: translate(-3px, -3px);
	box-shadow: calc(var(--cst-back-off, 12px) + 3px) calc(var(--cst-back-off, 12px) + 3px) 0 0 var(--pc-back);
}
.cst-style-cards .lt-card:hover { border-color: var(--wp--preset--color--accent); }
.cst-no-backing .lt-card { box-shadow: none; }
.cst-no-backing .lt-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22); }
.lt-card:has(.lt-card-title a:focus-visible) { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
.lt-card-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: calc(var(--cst-card-title) * var(--cst-user-scale, 1)) !important;
	font-weight: 700;
	line-height: 1.2;
}
.lt-card-title a { color: var(--wp--preset--color--contrast); text-decoration: none; outline: none; }
.lt-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--cst-radius); }
.lt-card-excerpt { font-size: calc((var(--cst-text) - 1px) * var(--cst-user-scale, 1)); line-height: 1.6; color: var(--wp--preset--color--muted); }
.lt-card-excerpt p { margin: 0; }
.lt-card-excerpt .wp-block-post-excerpt__more-text { display: none; }
.cst-no-excerpts .lt-card-excerpt { display: none; }
.cst-no-tags .lt-card .lt-tag { display: none; }

.lt-tag { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-tag .wp-block-post-terms__separator { display: none; }
.lt-tag a {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}
.lt-meta {
	margin-top: auto !important;
	padding-top: 14px;
	border-top: 1px dashed var(--wp--preset--color--border);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}
.lt-meta .lt-comments { display: inline-flex; align-items: center; gap: 6px; }
.lt-meta .lt-comments::before,
.lt-meta::before {
	content: "";
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lt-meta .lt-comments::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lt-meta { column-gap: 14px; }
.lt-meta time { margin-left: -6px; }

/* ---------- Postcard style ---------- */
.cst-style-postcard .lt-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto 1fr;
	grid-template-areas: "title stamp" "excerpt excerpt" "meta meta";
	align-items: start;
	column-gap: 16px;
	row-gap: 10px;
	min-height: 206px;
	padding: 16px 18px 14px;
	border: 6px solid transparent;
	border-radius: 0;
	background:
		linear-gradient(var(--wp--preset--color--base), var(--wp--preset--color--base)) padding-box,
		repeating-linear-gradient(135deg, var(--wp--preset--color--accent) 0 11px, var(--wp--preset--color--base) 11px 16px, var(--pc-s2) 16px 27px, var(--wp--preset--color--base) 27px 32px) border-box;
	color: var(--wp--preset--color--contrast);
}
.cst-style-postcard .lt-card-title { grid-area: title; padding-top: 6px; }
.cst-style-postcard .lt-card-title a::after { border-radius: 0; }
.cst-style-postcard .lt-card .lt-tag {
	grid-area: stamp;
	display: block;
	padding: 4px;
	background: radial-gradient(circle, var(--wp--preset--color--base) 2px, var(--wp--preset--color--accent) 2.6px) -2px -2px / 7px 7px;
	transform: rotate(3deg);
}
.cst-style-postcard .lt-card .lt-tag a {
	display: block;
	max-width: 76px;
	padding: 9px 9px;
	border-radius: 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	outline: 1px solid rgba(0, 0, 0, 0.28);
	outline-offset: -4px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.25;
}
.cst-style-postcard .lt-card .lt-tag a ~ a { display: none; }
.cst-no-tags.cst-style-postcard .lt-card .lt-tag { display: none; }
.cst-style-postcard .lt-card-excerpt { grid-area: excerpt; color: var(--wp--preset--color--soft); font-size: calc(15.5px * var(--cst-user-scale, 1)); }
.cst-style-postcard .lt-card-excerpt p {
	--lt-rule: calc(28px * var(--cst-user-scale, 1));
	line-height: var(--lt-rule);
	background-image: linear-gradient(to bottom, transparent calc(var(--lt-rule) - 1px), var(--pc-rule) calc(var(--lt-rule) - 1px));
	background-size: 100% var(--lt-rule);
}
.cst-style-postcard .lt-meta {
	grid-area: meta;
	align-self: end;
	margin-top: 0 !important;
	padding-top: 6px;
	border-top: 0;
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}
.cst-style-postcard .lt-card mark.lt-hit { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }

/* Pagination: shown only if the auto-loader can't run */
.lt-pager { margin-top: 36px !important; display: flex; justify-content: center; gap: 16px; }
.lt-pager a {
	padding: 12px 24px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.lt-pager a:hover { border-color: var(--wp--preset--color--accent); }

/* Auto-loading */
.lt-loader {
	margin-top: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}
.lt-dots { display: flex; gap: 6px; }
.lt-dots i {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	animation: lt-pulse 1.2s ease-in-out infinite;
}
.lt-dots i:nth-child(2) { animation-delay: .2s; }
.lt-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes lt-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.lt-card--skel { background: var(--wp--preset--color--surface-2); border-color: var(--wp--preset--color--surface); box-shadow: none; }
.lt-card--skel:hover { transform: none; box-shadow: none; border-color: var(--wp--preset--color--surface); }
.lt-sk {
	display: block;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--wp--preset--color--surface) 0%, var(--wp--preset--color--border) 50%, var(--wp--preset--color--surface) 100%);
	background-size: 200% 100%;
	animation: lt-shimmer 1.4s linear infinite;
}
@keyframes lt-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

/* ---------- Sidebar ---------- */
.lt-sidebar { display: flex; flex-direction: column; gap: 22px; }
.lt-sidebar > * { margin: 0 !important; }
.lt-box {
	padding: 22px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--cst-radius);
}
.lt-box > * { margin-block: 0; }
.lt-box-title {
	margin: 0 0 8px !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 17px !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.lt-box-title::after {
	content: "";
	display: block;
	width: 52px;
	height: 3px;
	margin-top: 8px;
	background: var(--wp--preset--color--accent);
}
.lt-cats { list-style: none; margin: 0; padding: 0; }
.lt-cats li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	min-height: 36px;
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--wp--preset--color--muted);
}
.lt-cats li:last-child { border-bottom: 0; }
.lt-cats a {
	flex: 1;
	display: flex;
	align-items: center;
	min-height: 36px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	color: var(--wp--preset--color--soft);
	text-decoration: none;
}
.lt-cats a:hover { color: var(--wp--preset--color--accent); }
.lt-cats .children { list-style: none; padding-left: 16px; }

.lt-search, .lt-top-search { padding: 18px; }
.lt-top-search { padding: 0; }
.lt-search .wp-block-search__inside-wrapper,
.lt-top-search .wp-block-search__inside-wrapper { display: flex; gap: 8px; border: 0; padding: 0; }
.lt-search .wp-block-search__input,
.lt-top-search .wp-block-search__input {
	flex: 1;
	min-width: 0;
	height: 46px;
	box-sizing: border-box;
	padding: 0 14px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	font: inherit;
	font-size: 16px;
}
.lt-top-search .wp-block-search__input { background: var(--wp--preset--color--surface); }
.lt-search .wp-block-search__input::placeholder,
.lt-top-search .wp-block-search__input::placeholder { color: var(--wp--preset--color--muted); }
.lt-search .wp-block-search__button,
.lt-top-search .wp-block-search__button {
	width: 50px;
	height: 46px;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}
.lt-search .wp-block-search__button svg,
.lt-top-search .wp-block-search__button svg { width: 24px; height: 24px; fill: currentColor; }

.lt-latest { position: relative; display: flex; flex-direction: column; gap: 10px; transition: border-color .18s ease; }
.lt-latest > * { margin: 0 !important; }
.lt-latest:hover { border-color: var(--wp--preset--color--accent); }
.lt-latest-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 12px !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.lt-latest-link { font-size: 17px; line-height: 1.5; color: var(--wp--preset--color--contrast); text-decoration: none; }
.lt-latest-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--cst-radius); }
.lt-latest-time, .lt-latest-empty { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--muted); }
.lt-annoy p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--wp--preset--color--muted); }
.lt-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--accent);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 8px;
	padding: 10px 18px;
}
.lt-outline .wp-block-button__link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }

/* ---------- Single posts and pages ---------- */
.lt-single { max-width: calc(var(--cst-read-w) + 48px); width: 100%; margin: 0 auto !important; padding: 40px 24px 88px; box-sizing: border-box; }
/* WordPress caps post text at its own width (and posts written in another theme can carry
   their own widths). Inside posts and pages, everything follows the Reading width instead. */
.lt-single {
	--wp--style--global--content-size: var(--cst-read-w);
	--wp--style--global--wide-size: var(--cst-read-w);
}
.lt-single .lt-post-content > :not(.alignleft):not(.alignright):not(.alignfull),
.lt-single .lt-post-content :is(.is-layout-constrained, .is-layout-flow) > :not(.alignleft):not(.alignright):not(.alignfull) {
	max-width: min(var(--cst-read-w), 100%);
}
.lt-single .lt-post-content .alignwide { max-width: min(var(--cst-read-w), 100%); }
.lt-single > * { margin-block: 0; }
.lt-article > * { margin-block: 0; }
.lt-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 14px 0 10px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--soft);
	font-size: 14px;
	text-decoration: none;
}
.lt-back svg { width: 16px; height: 16px; }
.lt-back:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--contrast); }
.lt-back + .lt-article { margin-top: 40px !important; }
.lt-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.lt-post-meta > * { margin: 0 !important; }
.lt-post-tag { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-post-tag .wp-block-post-terms__separator { display: none; }
.lt-post-tag a {
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.lt-post-title {
	margin: 14px 0 32px !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: calc(clamp(32px, 5vw, 46px) * var(--cst-head-scale) * var(--cst-user-scale, 1)) !important;
	line-height: 1.12;
}
.lt-post-date { font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: var(--wp--preset--color--muted); }
.wp-block-post-featured-image { margin-bottom: 32px !important; }
.wp-block-post-featured-image img { border-radius: var(--cst-radius); }
.lt-post-content { font-family: var(--cst-post-font); font-size: calc(var(--cst-post-size) * var(--cst-user-scale, 1)); line-height: var(--cst-lh); }
.lt-post-content h2 { font-size: calc(1.55em * var(--cst-head-scale)); line-height: 1.2; }
.lt-post-content h3 { font-size: calc(1.25em * var(--cst-head-scale)); line-height: 1.25; }
.lt-post-content h4 { font-size: calc(1.05em * var(--cst-head-scale)); }
.lt-post-content a { color: var(--wp--preset--color--accent); }
.lt-post-content blockquote {
	margin-left: 0;
	padding-left: 20px;
	border-left: 3px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--soft);
}
.cst-dropcap .lt-post-content > p:first-of-type::first-letter {
	float: left;
	padding: 6px 10px 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 3.5em;
	font-weight: 700;
	line-height: 0.85;
	color: var(--wp--preset--color--accent);
}
.lt-intro { margin: 12px 0 40px !important; font-size: var(--cst-text); line-height: 1.6; color: var(--wp--preset--color--muted); }

/* Comments */
.lt-comments-area { margin-top: 64px !important; padding-top: 32px; border-top: 1px solid var(--wp--preset--color--line); }
.lt-comments-area h2 { font-size: 22px; }
.lt-comments-area .comment-reply-title { margin-top: 40px; }
.lt-comment {
	padding: 18px 20px;
	margin-bottom: 16px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
}
.lt-comment > * { margin-block: 0 8px; }
.lt-comment .wp-block-comment-date { font-size: 13px; color: var(--wp--preset--color--muted); }
.lt-comment .wp-block-comment-date a { color: inherit; }
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	font: inherit;
}

/* ---------- Thoughts timeline ---------- */
.lt-thoughts-page { max-width: 828px; margin: 0 auto !important; padding: 56px 24px 96px; box-sizing: border-box; }
.lt-thoughts-page > * { margin-block: 0; }
.lt-page-title { margin: 0 !important; font-family: var(--wp--preset--font-family--display); font-size: calc(46px * var(--cst-head-scale)) !important; font-weight: 700; }
.lt-thoughts { margin: 0; }
.lt-month {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 8px !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 14px !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.lt-month::after { content: ""; flex-grow: 1; height: 1px; background: var(--wp--preset--color--line); }
.lt-thought + .lt-month { margin-top: 28px !important; }
.lt-thought {
	position: relative;
	margin: 0 0 0 7px;
	padding: 18px 18px 22px 34px;
	border-left: 1px solid var(--wp--preset--color--spark);
	border-radius: 0 10px 10px 0;
	transition: background .18s ease;
	scroll-margin-top: 24px;
}
.lt-thought:hover, .lt-thought:target { background: var(--wp--preset--color--surface); }
.lt-thought::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 24px;
	width: 13px;
	height: 13px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--accent);
}
.lt-thought-text { font-size: calc((var(--cst-text) + 2px) * var(--cst-user-scale, 1)); line-height: 1.6; }
.lt-thought-text > * { margin: 0 0 0.6em; }
.lt-thought-text > :last-child { margin-bottom: 8px; }
.lt-thought time { font-family: var(--wp--preset--font-family--mono); font-size: 13px; color: var(--wp--preset--color--muted); }
.lt-end { margin: 28px 0 0 !important; text-align: center; font-family: var(--wp--preset--font-family--mono); font-size: 13px; color: var(--wp--preset--color--muted); }

/* ---------- Thoughts page styles (Customize › Thoughts page) ---------- */

/* Sticky notes: taped to a wall, a little crooked. */
.cst-th-notes .lt-thoughts-page { max-width: 1080px; }
.cst-th-notes .lt-thoughts { columns: 3 220px; column-gap: 28px; }
.cst-th-notes .lt-month { column-span: all; margin: 0 0 24px !important; }
.cst-th-notes .lt-thought + .lt-month { margin-top: 10px !important; }
.cst-th-notes .lt-thought {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 32px;
	padding: 28px 18px 16px;
	break-inside: avoid;
	border: 0;
	border-radius: 0;
	background: #efe2a2;
	color: #23262a;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 12px 22px rgba(0, 0, 0, 0.28);
	transform: rotate(-1.6deg);
	transition: transform .2s ease;
}
.cst-th-notes .lt-thought:nth-of-type(5n+2) { background: #c7e6d3; transform: rotate(1.2deg); }
.cst-th-notes .lt-thought:nth-of-type(5n+3) { background: #d3def0; transform: rotate(-0.7deg); }
.cst-th-notes .lt-thought:nth-of-type(5n+4) { background: #f0d3c4; transform: rotate(1.8deg); }
.cst-th-notes .lt-thought:nth-of-type(5n+5) { background: #e6d6ef; transform: rotate(-1.2deg); }
.cst-th-notes .lt-thought:hover,
.cst-th-notes .lt-thought:target { transform: rotate(0deg) translateY(-3px); }
.cst-th-notes .lt-thought::before {
	left: 50%;
	top: -9px;
	width: 74px;
	height: 22px;
	margin-left: -37px;
	border: 0;
	border-radius: 0;
	background: rgba(255, 255, 255, 0.42);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transform: rotate(-4deg);
}
.cst-th-notes .lt-thought:nth-of-type(even)::before { transform: rotate(3deg); }
.cst-th-notes .lt-thought-text { line-height: 1.5; }
.cst-th-notes .lt-thought time { color: #4b5057; font-size: 12px; }
.cst-th-notes .lt-thought a { color: #1d5b48; }
html[data-theme="light"] .cst-th-notes .lt-thought { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 8px 18px rgba(0, 0, 0, 0.13); }

/* Notebook page: one long ruled sheet, dates in the margin. */
.cst-th-notebook .lt-thoughts {
	--nb-paper: var(--wp--preset--color--surface);
	--nb-rule: color-mix(in srgb, var(--wp--preset--color--surface) 88%, var(--wp--preset--color--contrast));
	position: relative;
	padding: 32px 32px 32px 132px;
	border-radius: 4px;
	background-color: var(--nb-paper);
	background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--nb-rule) 31px 32px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] .cst-th-notebook .lt-thoughts { --nb-paper: #fffdf6; --nb-rule: #dbe3ea; color: #22262b; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12); }
.cst-th-notebook .lt-thoughts::before {
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 0;
	width: 44px;
	background: radial-gradient(circle at 22px 32px, var(--wp--preset--color--base) 7px, transparent 7.5px) 0 0 / 44px 64px repeat-y;
}
.cst-th-notebook .lt-thoughts::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 112px;
	width: 2px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 60%, var(--nb-paper));
}
.cst-th-notebook .lt-month { margin: 0 0 32px !important; font-size: 15px !important; line-height: 32px; }
.cst-th-notebook .lt-month::after { display: none; }
.cst-th-notebook .lt-thought + .lt-month { margin-top: 0 !important; }
.cst-th-notebook .lt-thought { margin: 0 0 32px; padding: 0; border: 0; border-radius: 0; background: none !important; }
.cst-th-notebook .lt-thought::before { display: none; }
.cst-th-notebook .lt-thought-text { line-height: 32px; }
.cst-th-notebook .lt-thought-text > * { margin: 0 !important; }
.cst-th-notebook .lt-thought time {
	position: absolute;
	left: -84px;
	top: 0;
	width: 58px;
	font-size: 11px;
	line-height: 16px;
	text-align: right;
}

/* Index cards: small ruled cards, two across. */
.cst-th-index .lt-thoughts-page { max-width: 940px; }
.cst-th-index .lt-thoughts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.cst-th-index .lt-month { grid-column: 1 / -1; margin: 0 !important; }
.cst-th-index .lt-thought + .lt-month { margin-top: 16px !important; }
.cst-th-index .lt-thought {
	--ix-card: var(--wp--preset--color--surface-2);
	--ix-rule: color-mix(in srgb, var(--wp--preset--color--surface-2) 88%, var(--wp--preset--color--contrast));
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--ix-card);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
	transform: rotate(-0.5deg);
	transition: transform .2s ease;
}
html[data-theme="light"] .cst-th-index .lt-thought { --ix-card: #fffefa; --ix-rule: #dbe3ea; color: #22262b; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12); }
.cst-th-index .lt-thought:nth-of-type(even) { transform: rotate(0.5deg); }
.cst-th-index .lt-thought:hover, .cst-th-index .lt-thought:target { transform: rotate(0deg) translateY(-3px); }
.cst-th-index .lt-thought::before { display: none; }
.cst-th-index .lt-thought time {
	order: -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px 8px;
	border-bottom: 2px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
}
.cst-th-index .lt-thought time::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cst-th-index .lt-thought-text {
	padding: 4px 18px 18px;
	line-height: 30px;
	background-image: linear-gradient(to bottom, transparent 29px, var(--ix-rule) 29px);
	background-size: 100% 30px;
	background-position: 0 4px;
}
.cst-th-index .lt-thought-text > * { margin: 0 !important; }
@media (max-width: 700px) {
	.cst-th-index .lt-thoughts { grid-template-columns: minmax(0, 1fr); }
	.cst-th-notebook .lt-thoughts { padding: 32px 16px 32px 84px; }
	.cst-th-notebook .lt-thoughts::before { width: 34px; background-position: -5px 0; }
	.cst-th-notebook .lt-thoughts::after { left: 70px; }
	.cst-th-notebook .lt-thought time { left: -78px; width: 50px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.cst-th-notes .lt-thought, .cst-th-index .lt-thought { transition: none; }
}

/* ---------- Original website ---------- */
.lt-orig-box .lt-box-title { display: flex; align-items: center; gap: 10px; }
.lt-orig-box .lt-box-title svg { width: 18px; height: 18px; color: var(--wp--preset--color--accent); flex-shrink: 0; }
.lt-orig-box p { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--wp--preset--color--muted); }
.lt-orig-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 8px;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.lt-orig-link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }
.lt-orig-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 14px;
	padding: 8px max(16px, calc((100% - var(--cst-content)) / 2 + 24px));
	background: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: 14px;
	color: var(--wp--preset--color--soft);
}
.lt-orig-bar > span { flex: 1 1 220px; }
.lt-orig-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-weight: 600; color: var(--wp--preset--color--accent); text-decoration: none; }
.lt-orig-bar a svg { width: 15px; height: 15px; }
.lt-orig-bar button { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; background: none; border: 0; color: var(--wp--preset--color--muted); cursor: pointer; }
.lt-orig-bar button svg { width: 16px; height: 16px; }
.lt-orig-bar--phones { display: none; }
html.lt-orig-closed .lt-orig-bar { display: none !important; }
@media (max-width: 700px) {
	.lt-orig-bar--phones { display: flex; }
	.lt-orig-box { display: none; }
}

/* Editor-only placeholder for the theme blocks */
.lt-editor-placeholder {
	padding: 24px;
	border: 1px dashed var(--wp--preset--color--accent);
	border-radius: 12px;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
}

/* ---------- Black hole ---------- */
.lt-hole {
	position: fixed;
	left: 50%;
	top: 50%;
	width: 220px;
	height: 220px;
	margin: -110px 0 0 -110px;
	border-radius: 50%;
	transform: scale(0);
	z-index: 99998;
	pointer-events: none;
}
.lt-hole-ring {
	position: absolute;
	top: -24%; left: -24%;
	width: 148%; height: 148%;
	border-radius: 50%;
	background: conic-gradient(from 0deg, rgba(255, 196, 140, 0) 0deg, rgba(255, 196, 140, .85) 50deg, rgba(76, 195, 159, 0) 120deg, rgba(76, 195, 159, .75) 200deg, rgba(255, 196, 140, 0) 280deg, rgba(255, 232, 205, .7) 330deg, rgba(255, 196, 140, 0) 360deg);
	filter: blur(10px);
}
.lt-hole-core {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border-radius: 50%;
	background: #000;
	box-shadow: 0 0 0 2px rgba(255, 214, 170, .9), 0 0 26px 6px rgba(255, 190, 130, .55), 0 0 90px 26px rgba(76, 195, 159, .3);
}
.lt-void { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: #000; }
.lt-void.is-on { display: flex; }
.lt-return {
	opacity: 0;
	min-height: 44px;
	padding: 0 24px;
	background: transparent;
	color: #a3b0bd;
	border: 1px solid #3a4652;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 14px;
	letter-spacing: 0.08em;
	cursor: pointer;
}
.lt-return:hover { color: #e8eef3; border-color: #4cc39f; }
body.lt-bh-active { overflow-x: hidden; }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
	.lt-lockup { padding: 20px 16px; gap: 16px; }
	.lt-divider { display: none !important; }
	.lt-site-title { font-size: 38px; }
	.cst-header-slim .lt-site-title { font-size: 22px; }
	.cst-header-slim .lt-tagline { display: none; }
	.cst-header-slim .lt-headinner { padding: 10px 16px; }
	/* Phones: title + buttons on row one, links + Subscribe on row two. Both rows stay pinned. */
	.lt-nav { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "mini tools" "links sub"; padding: 8px 16px 6px; column-gap: 8px; }
	.lt-mini { position: static; grid-area: mini; transform: none; min-width: 0; }
	.lt-mini-text { min-width: 0; }
	.lt-mini-title, .lt-mini-tagline { overflow: hidden; text-overflow: ellipsis; }
	.lt-mini-title { font-size: 16px; }
	.lt-mini-tagline { font-size: 11px; }
	.lt-mini-logo { width: 26px; height: 26px; }
	.cst-pinned .lt-mini { opacity: 1; transform: none; pointer-events: auto; }
	.cst-pinned .lt-mini-fits .lt-menu-list, .lt-menu-list { transform: none !important; }
	.lt-menu-list a { padding: 10px 8px; font-size: min(var(--cst-menu-size, 15px), 15px); letter-spacing: 0.07em; }
	.lt-subscribe { padding: 0 14px; height: 38px; box-sizing: border-box; font-size: 14px; }
	.lt-icon-btn { width: 38px; height: 38px; }
	.lt-nav-tools { gap: 6px; }
	.lt-size-panel { right: -48px; }
	.lt-main { padding: 28px 16px 56px; }
	.lt-main > .wp-block-template-part { flex-basis: 100%; order: 0 !important; }
	.lt-query .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
	.lt-thoughts-page { padding: 36px 16px 64px; }
	.lt-page-title { font-size: calc(36px * var(--cst-head-scale)) !important; }
	.cst-style-postcard .lt-card { padding: 14px 14px 12px; min-height: 0; }
	.cst-style-postcard .lt-card-title { font-size: calc(21px * var(--cst-user-scale, 1)) !important; }
	.lt-single { padding: 28px 16px 64px; }
}

@media (max-width: 700px) {
	/* Keep the links on one line; if there are many, they scroll sideways instead of stacking. */
	.lt-menu-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.lt-menu-list::-webkit-scrollbar { display: none; }
	.lt-menu-list a { white-space: nowrap; }
}
@media (max-width: 380px) {
	.lt-menu-list a { padding: 10px 6px; letter-spacing: 0.04em; }
	.lt-subscribe { padding: 0 10px; }
}
@media (max-width: 350px) {
	.lt-menu-list a { padding: 10px 5px; font-size: 13px; letter-spacing: 0.03em; }
	.lt-subscribe { gap: 6px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.lt-card, .lt-thought, .lt-latest { transition: none; }
	.lt-card:hover { transform: none; }
	.lt-dots i, .lt-sk { animation: none; }
}
