/* CRYPTALISM: site styles. Mobile first; no framework. Fonts are declared by theme.json. */

:root {
	--charcoal: #171717;
	--warm: #FAF9F6;
	--coral: #F06455;      /* fills, rules and marks only */
	--coral-text: #C2412F; /* coral for text: passes AA on white and warm white */
	--grey: #777777;
	--grey-text: #5E5E5E;  /* small grey text needs more contrast than #777 */
	--line: #E4E1DA;
	--white: #FFFFFF;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
	--wrap: 1200px;
	--narrow: 720px;
	--gutter: 20px;
}

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

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

body {
	margin: 0;
	background: var(--white);
	color: var(--charcoal);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--coral-text); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }

.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;
}
.skip-link {
	position: absolute; left: 8px; top: -60px; z-index: 100;
	background: var(--coral); color: var(--charcoal); padding: 10px 14px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1000px; margin: 0 auto; }
.page-pad { padding-top: 48px; padding-bottom: 48px; }

/* --- Masthead -------------------------------------------------------------- */

.masthead { background: var(--charcoal); color: var(--warm); }
.masthead-inner { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.wordmark { font-family: var(--sans); font-weight: 800; font-size: 19px; letter-spacing: 0.1em; }
.tagline { display: none; margin: 0; font-family: var(--serif); font-style: normal; color: #BDBAB3; font-size: 15px; }

.search-toggle { margin-left: auto; position: static; }
.search-toggle summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
	padding: 8px; color: var(--warm); font-weight: 600;
}
.search-toggle summary::-webkit-details-marker { display: none; }
.search-word { display: none; }
.search-panel {
	position: absolute; left: 0; right: 0; top: 56px; z-index: 20;
	background: var(--charcoal); border-top: 1px solid #333; padding: 12px var(--gutter) 16px;
}
.masthead { position: relative; }

/* --- Section navigation ------------------------------------------------------ */

.sections { background: var(--warm); border-bottom: 1px solid var(--line); }
.sections-list {
	display: flex; gap: 2px; margin: 0; padding: 0; list-style: none;
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sections-list::-webkit-scrollbar { display: none; }
.sections-list a {
	display: block; white-space: nowrap; padding: 12px 10px 10px;
	font-weight: 600; font-size: 15px; text-decoration: none;
	border-bottom: 4px solid transparent;
}
.sections-list a:hover { color: var(--charcoal); border-bottom-color: var(--line); }
.sections-list .current-menu-item > a,
.sections-list a[aria-current="page"] { border-bottom-color: var(--coral); }

/* --- Search form ------------------------------------------------------------------ */

.search-form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.search-form input {
	flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 10px 12px;
	border: 1px solid var(--grey); border-radius: 0; background: var(--white); color: var(--charcoal);
}
.search-form button, .button {
	font: inherit; font-weight: 700; padding: 10px 16px; border: 0; border-radius: 0; cursor: pointer;
	background: var(--coral); color: var(--charcoal); text-decoration: none; display: inline-block;
}
.search-form button:hover, .button:hover { background: var(--warm); color: var(--charcoal); outline: 2px solid var(--coral); }
.search-page-form { margin: 16px 0 8px; }
.search-page-form .search-form { margin: 0; }

/* --- Shared pieces ---------------------------------------------------------- */

.kicker, .kicker-plain {
	display: inline-block; margin-bottom: 6px;
	font-size: 14px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
	color: var(--coral-text); text-decoration: none;
}
.kicker:hover { text-decoration: underline; }

.section-head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
	border-top: 3px solid var(--charcoal); padding-top: 10px; margin-bottom: 16px;
}
.section-head h2 { font-size: 22px; }
.section-more { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--grey-text); white-space: nowrap; }
.section-more:hover { color: var(--coral-text); }

.empty { padding: 40px 0; color: var(--grey-text); font-size: 18px; }

.crumbs { font-size: 14px; color: var(--grey-text); margin-bottom: 12px; }
.crumbs a { color: inherit; }

.page-head { padding-top: 32px; padding-bottom: 24px; }
.page-head h1 { font-size: 34px; }
.page-intro { color: var(--grey-text); font-size: 18px; margin: 8px 0 0; max-width: 720px; }
.page-intro p { margin: 0; }

/* --- Cards -------------------------------------------------------------------------- */

.card { display: flex; flex-direction: column; gap: 10px; }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--warm); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; }
.card .kicker { margin-bottom: 4px; font-size: 13px; }
.card-title { font-size: 20px; line-height: 1.2; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; color: var(--charcoal); text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.card-excerpt { margin: 8px 0 0; color: #3A3A3A; font-size: 16px; }
.card-meta { margin: 8px 0 0; font-size: 14px; color: var(--grey-text); display: flex; flex-wrap: wrap; gap: 4px 12px; }

.card-lead .card-title { font-size: 28px; line-height: 1.12; }
.card-lead .card-excerpt { font-size: 18px; }

.card-compact { padding: 12px 0; border-bottom: 1px solid var(--line); }
.card-compact:last-child { border-bottom: 0; }
.card-compact .card-title { font-size: 18px; }

.card-list .card-title { font-size: 17px; }
.card-list .card-meta { margin-top: 4px; }

.grid { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }

/* --- Homepage -------------------------------------------------------------------- */

.top { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 32px; }
.home-columns { display: grid; gap: 40px; padding-bottom: 48px; }
.home-section { margin-bottom: 40px; }

.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: trend; }
.trending-list li { counter-increment: trend; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trending-list li::before {
	content: counter(trend); font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1;
	color: var(--coral-text); min-width: 22px;
}

.newsletter { margin-top: 32px; background: var(--warm); border-top: 4px solid var(--coral); padding: 20px; }
.newsletter h2 { font-size: 22px; }
.newsletter p { margin: 8px 0 0; }
.newsletter-note { font-size: 14px; color: var(--grey-text); }

/* --- Archives and feed ------------------------------------------------------- */

.archive-lead { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.feed-list { display: grid; gap: 28px; max-width: 900px; }
.feed-list .card { padding-bottom: 28px; border-bottom: 1px solid var(--line); }

.pager { margin: 40px 0 56px; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pager .page-numbers {
	display: inline-block; padding: 8px 12px; border: 1px solid var(--line);
	text-decoration: none; font-weight: 600;
}
.pager .page-numbers.current { background: var(--charcoal); color: var(--warm); border-color: var(--charcoal); }
.pager .page-numbers.dots { border: 0; }

/* --- Article ---------------------------------------------------------------------- */

.article-head { padding-top: 28px; }
.article-title { font-size: 32px; line-height: 1.1; letter-spacing: -0.015em; }
.standfirst { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: #3A3A3A; margin: 14px 0 0; }

.byline { display: flex; align-items: center; gap: 12px; margin: 22px 0 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline p { margin: 0; }
.byline-name { font-weight: 700; }
.byline-name a { text-decoration: none; }
.byline-name a:hover { text-decoration: underline; }
.byline-title { font-weight: 400; color: var(--grey-text); margin-left: 6px; }
.byline-meta { font-size: 14px; color: var(--grey-text); display: flex; flex-wrap: wrap; gap: 2px 14px; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-initials {
	--size: 48px;
	width: var(--size); height: var(--size); display: inline-grid; place-items: center;
	background: var(--charcoal); color: var(--warm); font-weight: 700; font-size: calc(var(--size) * 0.38);
	letter-spacing: 0.04em;
}

.article-image { margin: 0 auto 28px; }
.article-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-image figcaption, .prose figcaption { font-size: 14px; color: var(--grey-text); padding: 8px var(--gutter) 0; }

.prose { font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { font-size: 26px; margin: 1.6em 0 0.5em; }
.prose h3 { font-size: 21px; margin: 1.4em 0 0.4em; }
.prose a { color: var(--coral-text); }
.prose a:hover { color: var(--charcoal); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote, .prose .wp-block-quote {
	margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--coral);
	font-style: italic;
}
.prose .wp-block-pullquote { border-top: 3px solid var(--charcoal); border-bottom: 3px solid var(--charcoal); padding: 20px 0; text-align: left; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure figcaption { padding-left: 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--charcoal); }
.prose .wp-block-table { overflow-x: auto; }
.prose code { font-size: 0.85em; background: var(--warm); padding: 0.1em 0.3em; }
.prose pre { overflow-x: auto; background: var(--warm); padding: 14px; font-size: 15px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .key-takeaways, .prose .notice {
	font-family: var(--sans); font-size: 17px; background: var(--warm); border-top: 4px solid var(--coral); padding: 16px 20px;
}
.prose .key-takeaways > :first-child, .prose .notice > :first-child { margin-top: 0; }
.prose .key-takeaways > :last-child, .prose .notice > :last-child { margin-bottom: 0; }
.prose .key-takeaways h2, .prose .key-takeaways h3 { font-family: var(--sans); font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.prose .alignwide { margin-left: 0; margin-right: 0; }

.article-foot { padding-bottom: 40px; }
.sources { border-top: 3px solid var(--charcoal); padding-top: 12px; margin-top: 32px; }
.sources h2 { font-family: var(--sans); font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.sources ol { margin: 10px 0 0; padding-left: 1.3em; font-size: 16px; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.sources a { color: var(--coral-text); }

.tags { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); }
.tags a:hover { border-color: var(--coral); color: var(--charcoal); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 24px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-label { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.share a, .copy-link { font: inherit; font-size: 15px; font-weight: 600; color: var(--charcoal); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }
.share a:hover, .copy-link:hover { text-decoration-color: var(--coral); color: var(--charcoal); }

.disclaimer { font-size: 14px; color: var(--grey-text); margin: 20px 0 0; }

.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; background: var(--warm); }
.author-box p { margin: 0 0 6px; font-size: 16px; }
.author-box-name { font-weight: 700; font-size: 17px !important; }

.related { padding-top: 8px; padding-bottom: 48px; }

/* --- Pages, author pages, 404 --------------------------------------------------- */

.page-article { padding-bottom: 48px; }
.page-article .page-head { padding-left: var(--gutter); padding-right: var(--gutter); }
.page-updated { font-family: var(--sans); font-size: 14px; color: var(--grey-text); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 32px; }

.author-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-top: 36px; padding-bottom: 32px; }
.author-head h1 { font-size: 34px; }
.author-job { margin: 4px 0 0; color: var(--grey-text); font-weight: 600; }
.author-bio { max-width: 680px; margin-top: 12px; font-size: 17px; }
.author-bio p { margin: 0 0 0.8em; }
.author-links { margin: 8px 0 0; font-weight: 600; }

.not-found { padding-top: 64px; padding-bottom: 80px; }
.not-found h1 { font-size: 34px; margin-bottom: 12px; }
.not-found .search-form { margin: 24px 0; }

/* --- Footer ----------------------------------------------------------------------- */

.site-footer { background: var(--charcoal); color: #D6D3CC; margin-top: 24px; font-size: 15px; }
.site-footer a { color: var(--warm); text-decoration: none; }
.site-footer a:hover { color: var(--warm); text-decoration: underline; text-decoration-color: var(--coral); }
.footer-grid { display: grid; gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.footer-brand .brand { color: var(--warm); margin-bottom: 12px; }
.footer-brand p { margin: 0 0 10px; max-width: 380px; }
.footer-note { color: #A9A59D; font-size: 14px; }
.footer-head { font-family: var(--sans); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #A9A59D; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.footer-base { border-top: 1px solid #333; padding-top: 16px; padding-bottom: 24px; font-size: 14px; color: #A9A59D; }
.footer-base p { margin: 0; }

/* --- Gutenberg alignment and block basics -------------------------------------- */

.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.has-coral-background-color { background-color: var(--coral); color: var(--charcoal); }
.has-charcoal-background-color { background-color: var(--charcoal); color: var(--warm); }
.has-warm-white-background-color { background-color: var(--warm); }
.has-coral-text-color { color: var(--coral-text); }
.has-grey-color { color: var(--grey-text); }
.wp-block-embed iframe { max-width: 100%; }
.wp-block-image img { height: auto; }

/* --- Larger screens ---------------------------------------------------------------- */

@media (min-width: 640px) {
	.grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article-title { font-size: 40px; }
	.page-head h1, .author-head h1 { font-size: 40px; }
	.card-lead .card-title { font-size: 34px; }
	.feed-list .card:has(.card-media) { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 860px) {
	:root { --gutter: 32px; }
	.masthead-inner { min-height: 64px; }
	.wordmark { font-size: 21px; }
	.tagline { display: block; padding-left: 16px; border-left: 1px solid #3A3A3A; }
	.search-word { display: inline; }
	.search-panel { top: 64px; }
	.sections-list a { padding: 14px 12px 10px; }
}

@media (min-width: 1000px) {
	.top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; padding-top: 32px; }
	.top-latest { border-left: 1px solid var(--line); padding-left: 28px; }
	.home-columns { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.home-aside { border-left: 1px solid var(--line); padding-left: 28px; }
	.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.archive-lead .card-lead { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: center; }
	.article-title { font-size: 46px; }
	.footer-grid { grid-template-columns: 2fr 1.4fr 1fr; }
	.footer-brand { grid-column: auto; }
}

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

@media print {
	.masthead, .sections, .site-footer, .share, .related, .search-toggle { display: none; }
	.prose { font-size: 12pt; }
}
