/*
Theme Name:   All The Stoke (Blocksy)
Theme URI:    https://www.allthestoke.com
Description:  Child theme of Blocksy for the AllTheStoke.com V3 "Modern + fast" redesign. Brand tokens, Figtree (self-hosted), and the component styles used by the allthestoke-blocksy block patterns.
Author:       AllTheStoke.com
Template:     blocksy
Version: 0.1.21
Requires at least: 6.4
Requires PHP: 7.4
Text Domain:  allthestoke-blocksy
License:      GPL-2.0-or-later
*/

/* ==========================================================================
   1. Fonts — Figtree variable, self-hosted (OFL-1.1, see assets/fonts)
   ========================================================================== */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("assets/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   2. Design tokens (mirror of design/tokens.json — keep the two in sync)
   ========================================================================== */
:root {
	--ats-navy: #032A4B;
	--ats-navy-deep: #001424;
	--ats-navy-line: #1C4468;
	--ats-ink: #0B1B2B;
	--ats-body: #475467;
	--ats-muted: #5B6675;
	--ats-on-navy: #FFFFFF;
	--ats-on-navy-muted: #B9C7D4;
	--ats-on-navy-soft: #D0D9E2;
	--ats-surface: #FFFFFF;
	--ats-surface-soft: #F2F5F8;
	--ats-tag-bg: #E8EEF4;
	--ats-line: #E4E9EE;
	--ats-radius: 8px;
	--ats-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ats-container: 1200px;
	--ats-gutter: 24px;

	/* Point Blocksy at the brand font. Verify the variable names against the
	   installed Blocksy version in DevTools; the explicit rules in §3 are the
	   fallback if a variable name has changed. */
	--theme-font-family: var(--ats-font);
	--fontFamily: var(--ats-font);
}

/* ==========================================================================
   3. Base
   ========================================================================== */
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6 {
	font-family: var(--ats-font);
}
body {
	color: var(--ats-body);
}
h1, h2, h3, h4, h5, h6 {
	color: var(--ats-ink);
	letter-spacing: -0.01em;
}
a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

/* Shared small uppercase label ("kicker") */
.ats-kicker,
.ats-kicker a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ats-navy);
	margin: 0;
}

/* ==========================================================================
   4. Section heading — label + big title + navy accent bar + hairline rule
   Pattern: allthestoke-blocksy/section-heading
   ========================================================================== */
.ats-section-head {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 16px;
	margin-bottom: 32px;
	border-bottom: 1px solid var(--ats-line);
}
.ats-section-head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 64px;
	height: 4px;
	border-radius: 2px;
	background: var(--ats-navy);
}
.ats-section-head .ats-section-head__label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.ats-section-head .ats-section-head__title {
	margin: 0;
	font-size: clamp(30px, 4vw, 40px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ats-ink);
}
.ats-section-head .wp-block-button__link {
	border: 1.5px solid var(--ats-navy);
	border-radius: var(--ats-radius);
	background: transparent;
	color: var(--ats-navy);
	font-size: 14px;
	font-weight: 700;
	padding: 11px 18px;
}

/* ==========================================================================
   5. Hero — latest Featured post on a full-width Cover
   Pattern: allthestoke-blocksy/hero
   ========================================================================== */
.ats-hero,
.ats-hero .wp-block-post-template,
.ats-hero .wp-block-post {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ats-hero .wp-block-cover {
	min-height: 540px;
	padding: 0 0 40px;
	align-items: flex-end;
}
/* Line the caption panel up with Blocksy's content column (same width as the
   header and the sections below). Core's cover CSS uses a doubled class, hence
   the long selector. */
.ats-hero .wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,
.ats-hero .wp-block-cover__inner-container {
	width: var(--theme-container-width, calc(100% - 2 * var(--ats-gutter)));
	max-width: var(--theme-normal-container-max-width, var(--ats-container));
	margin: 0 auto;
}
.ats-hero__panel {
	max-width: 640px;
	background: rgba(3, 22, 40, 0.84);
	padding: 24px 32px 28px;
	border-radius: var(--ats-radius);
	gap: 8px;
}
.ats-hero__panel .ats-kicker,
.ats-hero__panel .ats-kicker a {
	color: var(--ats-on-navy-muted);
}
.ats-hero__panel .wp-block-post-title {
	margin: 0;
	font-size: clamp(26px, 4vw, 40px);
	line-height: 1.12;
	font-weight: 800;
}
.ats-hero__panel .wp-block-post-title a,
.ats-hero__panel .wp-block-read-more {
	color: #FFFFFF;
}
.ats-hero__panel .wp-block-read-more {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 700;
}

/* ==========================================================================
   6. Trending strip — navy band, numbered 01/02 via CSS counters
   Pattern: allthestoke-blocksy/trending
   ========================================================================== */
.ats-trending {
	background: var(--ats-navy);
	border-top: 1px solid var(--ats-navy-line);
	padding: 24px 0;
	margin: 0;
}
.ats-trending__inner {
	width: var(--theme-container-width, calc(100% - 2 * var(--ats-gutter)));
	max-width: var(--theme-normal-container-max-width, var(--ats-container));
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 48px;
}
.ats-trending__label {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ats-on-navy-muted);
}
.ats-trending .wp-block-query {
	flex: 1 1 600px;
}
.ats-trending .wp-block-post-template {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
	margin: 0;
	padding: 0;
	counter-reset: ats-trending;
}
.ats-trending .wp-block-post {
	flex: 1 1 320px;
	display: flex;
	align-items: center;
	gap: 16px;
	counter-increment: ats-trending;
}
.ats-trending .wp-block-post::before {
	content: counter(ats-trending, decimal-leading-zero);
	font-size: 32px;
	font-weight: 800;
	line-height: 1;
	color: #FFFFFF;
	min-width: 44px;
}
.ats-trending .wp-block-post > .wp-block-group {
	gap: 2px;
}
.ats-trending .wp-block-post > .wp-block-group > * {
	margin: 0;
}
.ats-trending .wp-block-post-title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}
.ats-trending .wp-block-post-title a {
	color: #FFFFFF;
}
.ats-trending .wp-block-post-date {
	font-size: 13px;
	color: var(--ats-on-navy-muted);
}

/* ==========================================================================
   7. Recent Articles — lead story + 2 stacked, then 3-up grid
   Patterns: allthestoke-blocksy/recent-articles
   ========================================================================== */
.ats-recent {
	max-width: var(--ats-container);
	margin: 0 auto;
	padding: 40px var(--ats-gutter) 0;
}
/* Inside a Blocksy page the content column already has the side gutters. */
.entry-content > .ats-recent {
	padding-left: 0;
	padding-right: 0;
}

/* Every card is fully clickable: the title link is stretched over the card */
.ats-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ats-card .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.ats-card .wp-block-post-featured-image {
	margin: 0;
}
.ats-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--ats-radius);
	display: block;
}
.ats-card .wp-block-post-title {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
}
.ats-card .wp-block-post-title a {
	color: var(--ats-ink);
}
.ats-card .ats-meta {
	display: flex;
	gap: 6px;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ats-navy);
}
.ats-card .ats-meta > * { margin: 0; }
.ats-card .ats-meta .wp-block-post-terms::after { content: " ·"; }
.ats-hero__panel .wp-block-post-terms.ats-kicker { display: none; }
.ats-card .ats-meta a { color: var(--ats-navy); }
.ats-card .wp-block-post-excerpt {
	margin: 0;
}
.ats-card .wp-block-post-excerpt__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ats-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ats-card .wp-block-post-excerpt__more-text {
	margin: 4px 0 0;
}
.ats-card .wp-block-post-excerpt__more-link {
	font-size: 14px;
	font-weight: 700;
	color: var(--ats-navy);
}

/* Lead block: first post large, next two stacked to the right */
.ats-lead .wp-block-post-template {
	display: grid;
	grid-template-columns: 7fr 4fr;
	grid-template-rows: auto auto;
	gap: 24px 32px;
	margin: 0;
	padding: 0;
}
.ats-lead .wp-block-post:first-child {
	grid-row: 1 / span 2;
}
.ats-lead .wp-block-post:first-child .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
}
.ats-lead .wp-block-post:first-child .wp-block-post-title {
	font-size: 30px;
	line-height: 1.18;
	font-weight: 800;
	letter-spacing: -0.01em;
}
.ats-lead .wp-block-post:not(:first-child) .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
}
.ats-lead .wp-block-post:not(:first-child) .wp-block-post-title {
	font-size: 19px;
}
.ats-lead .wp-block-post:not(:first-child) .wp-block-post-excerpt {
	display: none;
}

/* 3-up grid */
.ats-grid {
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid var(--ats-line);
}
.ats-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
	margin: 0;
	padding: 0;
}
.ats-grid .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
}

.ats-more {
	margin-top: 40px;
	justify-content: center;
}
.ats-more .wp-block-button__link {
	background: var(--ats-navy);
	color: #FFFFFF;
	border-radius: var(--ats-radius);
	font-size: 15px;
	font-weight: 700;
	padding: 14px 28px;
}

/* ==========================================================================
   8. Ad slots — fixed, reserved space so nothing jumps (CLS)
   Pattern: allthestoke-blocksy/ad-slot
   ========================================================================== */
.ats-ad {
	margin: 40px auto;
	max-width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ats-surface-soft);
	border-radius: var(--ats-radius);
	overflow: hidden;
}
.ats-ad--leaderboard { width: 728px; min-height: 90px; }
.ats-ad--billboard   { width: 970px; min-height: 90px; }
.ats-ad--rectangle   { width: 300px; min-height: 250px; }
.ats-ad--incontent   { width: 100%;  min-height: 250px; }

/* ==========================================================================
   9. Single post — video-first article
   ========================================================================== */
.single-post .entry-header .page-title,
.single-post .hero-section .page-title {
	font-size: clamp(32px, 5vw, 46px);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.single-post .entry-content > p:first-of-type {
	font-size: 20px;
	line-height: 1.7;
	color: #1F2A37;
}

/* Lite YouTube facade (see functions.php → ats_lite_youtube) */
.ats-yt {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	padding: 0;
	border-radius: var(--ats-radius);
	overflow: hidden;
	background: var(--ats-ink) center / cover no-repeat;
	cursor: pointer;
}
.ats-yt__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	border-radius: 50%;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ats-yt__play svg { width: 28px; height: 28px; fill: var(--ats-navy); margin-left: 4px; }
.ats-yt__label {
	position: absolute;
	left: 16px;
	bottom: 14px;
	font-size: 13px;
	font-weight: 600;
	color: #FFFFFF;
	background: rgba(3, 22, 40, 0.8);
	padding: 6px 10px;
	border-radius: 6px;
}
.ats-yt iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Video details box. Pattern: allthestoke-blocksy/video-details */
.ats-video-details {
	border: 1px solid var(--ats-line);
	border-radius: var(--ats-radius);
	padding: 20px 24px;
}
.ats-video-details__title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.ats-video-details__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px 24px;
}
.ats-video-details__grid p {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ats-ink);
}
.ats-video-details__grid p strong {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--ats-muted);
}

/* Title area: category kicker → H1 → byline (breadcrumbs turned off by the owner;
   the styles stay in case they are switched back on).
   Built from Blocksy's hero elements (two "Post Meta" groups). */
.single-post .hero-section .entry-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	text-align: left;
}
.single-post .hero-section .entry-header > * {
	margin: 0;
}
.single-post .ct-breadcrumbs {
	font-size: 13px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ats-muted);
}
.single-post .ct-breadcrumbs a { color: var(--ats-muted); }
.single-post .ct-breadcrumbs a:hover { color: var(--ats-navy); }
.single-post .entry-header > .entry-meta:first-child,
.single-post .entry-header > .entry-meta:first-child a,
.single-post .ct-breadcrumbs + .entry-meta,
.single-post .ct-breadcrumbs + .entry-meta a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ats-navy);
}
.single-post .page-title + .entry-meta {
	--theme-font-size: 14px;
	font-size: 14px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ats-muted);
}
.single-post .page-title + .entry-meta .ct-meta-element-author {
	font-weight: 700;
	color: var(--ats-ink);
}
.single-post .page-title + .entry-meta .meta-author img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
}

/* Article design (functions.php §4a). The date row below replaces Blocksy's byline;
   share, author, tags and previous/next are off to match the approved mockup. */
.single-post .page-title + .entry-meta,
.single-post article > .ct-share-box.is-width-constrained,
.single-post article > .author-box.is-width-constrained,
.single-post article > .entry-tags.is-width-constrained,
.single-post article > .post-navigation.is-width-constrained {
	display: none;
}
.ats-standfirst {
	margin: 0 0 18px;
	font-size: clamp(18px, 2vw, 21px);
	line-height: 1.45;
	color: var(--ats-body);
}
.ats-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	padding-top: 14px;
	border-top: 1px solid var(--ats-line);
	font-size: 13px;
	font-weight: 600;
	color: var(--ats-muted);
}
.ats-article-head { margin-bottom: 28px; }
.ats-article-photo { position: relative; margin: 0 0 30px; }
.ats-article-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	border-radius: var(--ats-radius);
}
.ats-article-photo figcaption {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--ats-navy);
	color: var(--ats-on-navy);
	font-size: 12px;
}
.ats-article-label {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--ats-navy);
}
.ats-glance,
.ats-source {
	border: 1px solid #D5DDE5;
	border-radius: var(--ats-radius);
	background: var(--ats-surface-soft);
	padding: clamp(18px, 3vw, 28px);
}
.ats-glance { margin-bottom: 32px; }
.ats-glance dl { margin: 14px 0 0; }
.ats-glance dd { margin: 0; }
.ats-glance__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
	gap: 12px;
}
.ats-glance__stats > div {
	padding: 16px;
	border: 1px solid var(--ats-line);
	border-radius: var(--ats-radius);
	background: var(--ats-surface);
}
.ats-glance__stats dd {
	font-size: 34px;
	font-weight: 800;
	line-height: 1.05;
	color: var(--ats-ink);
}
.ats-glance__stats dt {
	margin-top: 4px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--ats-body);
}
.ats-glance__notes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 20px 28px;
}
.ats-glance__stats + .ats-glance__notes { margin-top: 22px; }
.ats-glance__notes dt {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.ats-glance__notes dd { margin-top: 6px; color: var(--ats-ink); }
.ats-source {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 28px;
	margin-top: 34px;
}
.ats-source__text { flex: 1 1 340px; min-width: 0; }
.ats-source__title {
	margin: 8px 0 0;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.14;
	color: var(--ats-ink);
}
.ats-source__pub { margin: 6px 0 0; color: var(--ats-body); }
.ats-source__pub span { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--ats-muted); }
.ats-source__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--ats-radius);
	background: var(--ats-navy);
	color: var(--ats-on-navy);
	font-weight: 600;
}
.ats-source__button:hover { color: var(--ats-on-navy); background: var(--ats-navy-line); }
.ats-source__note {
	flex: 1 1 100%;
	margin: 0;
	padding-top: 14px;
	border-top: 1px solid var(--ats-line);
	font-size: 14px;
	color: var(--ats-muted);
}

/* Video first: the first YouTube embed is moved to the top of the
   content (functions.php §4) and shown a little wider than the text. */
.single-post .entry-content .ats-video-lead {
	max-width: min(912px, 100%);
	margin-bottom: 30px;
}

/* Spacing between the modules under the content */
.single-post .entry-tags,
.single-post .ct-share-box,
.single-post .author-box,
.single-post .post-navigation {
	margin-top: 28px;
	margin-bottom: 0;
}

/* Tags as chips */
.single-post .entry-tags {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.single-post .entry-tags .ct-module-title {
	margin: 0 4px 0 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--ats-ink);
}
.single-post .entry-tags-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.single-post .entry-tags-items a {
	display: inline-block;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--ats-navy);
	background: var(--ats-tag-bg);
	border: 0;
	padding: 8px 12px;
	border-radius: var(--ats-radius);
}
.single-post .entry-tags-items a > span { display: none; } /* the "#" */

/* Share row: "Share this" + square outline buttons, hairlines above and below */
.single-post .ct-share-box {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 0;
	border-top: 1px solid var(--ats-line);
	border-bottom: 1px solid var(--ats-line);
}
.single-post .ct-share-box .ct-module-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ats-ink);
}
.single-post .ct-share-box[data-type] > [data-icons-type] {
	display: flex;
	gap: 8px;
	border: 0;
}
.single-post .ct-share-box [data-icons-type] > a {
	--theme-icon-color: var(--ats-navy);
	--theme-icon-hover-color: var(--ats-navy);
	--theme-icon-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	border: 1px solid #D5DDE5;
	border-radius: var(--ats-radius);
	background: var(--ats-surface);
}
.single-post .ct-share-box [data-icons-type] > a:hover {
	border-color: var(--ats-navy);
}

/* Author box: soft grey card, 56 px round avatar.
   [data-prefix] matches Blocksy's own selector (it uses palette colour 8 here). */
.single-post .author-box,
[data-prefix="single_blog_post"] .author-box[data-type] {
	display: flex;
	flex-direction: row;
	text-align: left;
	align-items: flex-start;
	gap: 16px;
	padding: 24px;
	border: 0;
	border-radius: var(--ats-radius);
	background: var(--ats-surface-soft);
	box-shadow: none;
}
.single-post .author-box .ct-media-container {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	margin: 0;
}
.single-post .author-box .ct-media-container img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
}
.single-post .author-box .author-box-name {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 800;
	color: var(--ats-ink);
}
.single-post .author-box .author-box-bio {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ats-body);
}
.single-post .author-box .author-box-bio p { margin: 0 0 6px; }
.single-post .author-box .ats-author-more {
	font-size: 14px;
	font-weight: 700;
	color: var(--ats-navy);
}

/* Previous / next: two bordered cards */
.single-post .post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.single-post .post-navigation::before,
.single-post .post-navigation::after { display: none; }
.single-post .post-navigation > a {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	padding: 18px 20px;
	border: 1px solid var(--ats-line);
	border-radius: var(--ats-radius);
}
.single-post .post-navigation > a:hover { border-color: var(--ats-navy); }
.single-post .post-navigation .nav-item-next { text-align: right; }
.single-post .post-navigation figure { display: none; }
.single-post .post-navigation .item-content { gap: 4px; }
.single-post .post-navigation .item-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.single-post .post-navigation .item-label > span { display: none; } /* "Post" */
.single-post .post-navigation .nav-item-prev .item-label::before { content: "← "; }
.single-post .post-navigation .nav-item-next .item-label::after { content: " →"; }
.single-post .post-navigation .item-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ats-ink);
}

/* Related posts: section-heading look + 3 cards */
.ct-related-posts-container,
[data-prefix="single_blog_post"] .ct-related-posts-container {
	padding-top: 72px;
	padding-bottom: 80px;
	background: var(--ats-surface);
}
.ct-related-posts .ct-module-title {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ats-line);
	font-size: 32px;
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-align: left;
	color: var(--ats-ink);
}
.ct-related-posts .ct-module-title::before {
	content: "Keep riding";
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.ct-related-posts .ct-module-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 64px;
	height: 4px;
	border-radius: 2px;
	background: var(--ats-navy);
}
.ct-related-posts-items {
	gap: 32px;
}
.ct-related-posts-items .ct-media-container {
	border-radius: var(--ats-radius);
	overflow: hidden;
	margin-bottom: 10px;
}
.ct-related-posts-items .entry-meta,
.ct-related-posts-items .entry-meta a {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ats-navy);
}
.ct-related-posts-items .related-entry-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
}
.ct-related-posts-items .related-entry-title a { color: var(--ats-ink); }
.ct-related-posts-items .related-entry-title a:hover { color: var(--ats-navy); }

/* ==========================================================================
   10. Footer — Editors Picks list (footer widget area)
   Pattern: allthestoke-blocksy/footer-editors-picks
   ========================================================================== */
.ats-footer-picks .wp-block-post-template {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
}
.ats-footer-picks .wp-block-post {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
}
.ats-footer-picks .wp-block-post-featured-image {
	flex: 0 0 80px;
	margin: 0;
}
.ats-footer-picks .wp-block-post-featured-image img {
	width: 80px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--ats-radius);
}
.ats-footer-picks .wp-block-post-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}
.ats-footer-picks .wp-block-post-title a { color: #FFFFFF; }
.ats-footer-picks .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.ats-footer-picks .wp-block-post-date {
	font-size: 12px;
	color: var(--ats-on-navy-muted);
}
.ats-footer-label {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ats-on-navy-muted);
}

/* ==========================================================================
   11. Header and footer chrome (Blocksy header/footer builder)
   Colours, sizes and layout are set in the Customizer (docs/03-blocksy-settings.md);
   these rules cover what the free builder has no option for.
   ========================================================================== */

/* Desktop search: white icon in a 1px soft outline, 44 px button.
   Blocksy sets toggle-button borders with !important from these variables. */
#header [data-device="desktop"] .ct-header-search {
	--toggle-button-size: 44px;
	--toggle-button-border-width: 1px;
	--toggle-button-border-color: rgba(255, 255, 255, 0.3);
	--toggle-button-radius: var(--ats-radius);
}

/* Off-canvas (mobile) menu: hairline between items */
#offcanvas .mobile-menu > ul > li:not(:last-child) {
	border-bottom: var(--mobile-menu-divider, 1px solid var(--ats-navy-line));
}
#offcanvas .mobile-menu .ct-menu-link {
	--menu-item-padding: 14px 0;
}

/* Footer: logo, tagline, square social buttons */
.ats-footer-logo { margin: 0 0 16px; }
.ats-footer-tagline {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ats-on-navy-soft);
	max-width: 280px;
}
#footer .ct-social-box .ct-icon-container {
	width: 44px;
	height: 44px;
	border-radius: var(--ats-radius);
}

/* Footer: Links + Categories side by side */
.ats-footer-menus { gap: 48px; }
.ats-footer-nav .wp-block-navigation__container { gap: 10px; }
.ats-footer-nav .wp-block-navigation-item__content {
	font-size: 14px;
	color: var(--ats-on-navy-soft);
}
.ats-footer-nav .wp-block-navigation-item__content:hover { color: var(--ats-on-navy); }

/* Footer ad: wide responsive slot, same shape as live (about 335×250).
   At 250 px wide AdSense could return a 250×600 tower. */
.ats-ad--square {
	width: 100%;
	min-height: 250px;
	margin: 0;
	background: rgba(255, 255, 255, 0.06);
}
/* Phones: AdSense runs the ad edge to edge, wider than this box, so it must not clip. */
@media (max-width: 999.98px) {
	.ats-ad--square {
		overflow: visible;
		background: none;
	}
}
@media (min-width: 1000px) {
	[data-footer*="type-1"] .ct-footer [data-row*="top"] > .ct-container {
		--grid-template-columns: 1fr auto 1fr 336px;
	}
	/* AdSense fills this slot with 336×280, plus Ad Inserter's 8 px margins. */
	.ats-ad--square { min-height: 296px; }
}
/* No ad returned: no empty strip */
.ats-ad--square:has(ins[data-ad-status="unfilled"]) {
	display: none;
}

/* Disclaimer row */
.ats-footer-disclaimer {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--ats-on-navy-muted);
}

/* ==========================================================================
   12. Archives — Articles, category, tag, search (Blocksy post cards)
   ========================================================================== */
.blog .hero-section .entry-header,
.archive .hero-section .entry-header,
.search .hero-section .entry-header {
	position: relative;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ats-line);
	text-align: left;
}
.blog .hero-section .entry-header::after,
.archive .hero-section .entry-header::after,
.search .hero-section .entry-header::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 64px;
	height: 4px;
	border-radius: 2px;
	background: var(--ats-navy);
}
.blog .page-title,
.archive .page-title,
.search .page-title {
	margin: 0;
	font-size: clamp(30px, 4vw, 40px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
}
/* "Category" / "Tag" label above the name; Articles gets the homepage label */
.archive .page-title .ct-title-label,
.blog .page-title::before {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ats-muted);
}
.blog .page-title::before { content: "Action sports & outdoor news"; }
.archive .page-title .ct-title-label::after { display: none; }
.blog .page-description,
.archive .page-description,
.search .page-description {
	margin: 8px 0 0;
	font-size: 15px;
	color: var(--ats-body);
}

/* Cards: the whole card is the link (the title link is stretched over it) */
.entries > article {
	position: relative;
}
.entries > article > * { margin-bottom: 10px; }
.entries > article > *:last-child { margin-bottom: 0; }
.entries > article .entry-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.entries > article .ct-media-container {
	border-radius: var(--ats-radius);
	overflow: hidden;
}
.entries > article .entry-meta,
.entries > article .entry-meta a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ats-navy);
}
.entries > article .entry-meta a {
	position: relative;
	z-index: 1; /* the category link stays clickable above the card link */
}
.entries > article .entry-title {
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
}
.entries > article .entry-title a { color: var(--ats-ink); }
.entries > article:hover .entry-title a { color: var(--ats-navy); }
.entries > article .entry-excerpt p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ats-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.entries > article .entry-button {
	font-size: 14px;
	font-weight: 700;
	color: var(--ats-navy);
}

/* Numbered pagination */
.ct-pagination[data-pagination] .page-numbers {
	--theme-button-min-height: 44px;
	min-width: 44px;
	height: 44px;
	justify-content: center;
	border-radius: var(--ats-radius);
	font-weight: 700;
}
.ct-pagination[data-pagination] .page-numbers.current {
	background: var(--ats-navy);
	color: #FFFFFF;
}

/* ==========================================================================
   13. Pages — About, Contact, Privacy, 404
   ========================================================================== */
.page:not(.home) .entry-content > h1,
.page:not(.home) .hero-section .page-title,
.error404 .hero-section .page-title {
	margin-bottom: 24px;
	font-size: clamp(32px, 5vw, 46px);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-align: left;
}
.page:not(.home) .hero-section .entry-header { text-align: left; }
.page:not(.home) .entry-content > h2 {
	margin-top: 40px;
	margin-bottom: 12px;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 800;
}
.page:not(.home) .entry-content > .ats-kicker + h2 { margin-top: 8px; }
.ats-page-photo img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: var(--ats-radius);
}
.error404 .hero-section .page-title { text-align: center; }

/* Privacy Policy: long-read type scale, matched to secondorderai.com/privacy-policy/ */
.privacy-policy.page:not(.home) .hero-section .page-title {
	margin-bottom: 28px;
	font-size: clamp(36px, 5vw, 56px);
	line-height: 1.05;
	font-weight: 700;
}
.privacy-policy.page .entry-content > * {
	margin-top: 28px;
	margin-bottom: 0;
}
.privacy-policy.page .entry-content > :first-child { margin-top: 0; }
.privacy-policy.page .entry-content,
.privacy-policy.page .entry-content li {
	font-size: 18px;
	line-height: 1.7;
	color: var(--ats-ink);
}
.privacy-policy.page .entry-content > h2 {
	margin-top: 28px;
	margin-bottom: 0;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.03em;
}
.privacy-policy.page .entry-content > h3 {
	font-size: 21px;
	line-height: 1.25;
	font-weight: 700;
}
.privacy-policy.page .entry-content a { text-decoration: underline; }

/* Contact form (WPForms Lite). WPForms reads these variables. */
.entry-content > .wpforms-container.wpforms-container-full {
	width: var(--theme-block-width, 100%);
	max-width: var(--theme-block-max-width, 100%);
	margin-left: auto;
	margin-right: auto;
}
.wpforms-container.wpforms-container-full {
	--wpforms-field-border-radius: var(--ats-radius);
	--wpforms-field-border-color: #C9D3DD;
	--wpforms-field-size-input-height: 44px;
	--wpforms-label-color: var(--ats-ink);
	--wpforms-button-background-color: var(--ats-navy);
	--wpforms-button-text-color: #FFFFFF;
	--wpforms-button-border-radius: var(--ats-radius);
	margin-top: 28px;
}
.wpforms-container .wpforms-form .wpforms-field-label {
	font-size: 14px;
	font-weight: 700;
}
.wpforms-container .wpforms-form button[type="submit"] {
	min-height: 48px;
	padding: 13px 28px;
	font-size: 15px;
	font-weight: 700;
}

/* ==========================================================================
   13b. Cookie banner (Complianz) — its own CSS sets colours with !important
   ========================================================================== */
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept {
	background-color: var(--ats-navy) !important;
	border-color: var(--ats-navy) !important;
	color: #fff !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	border-radius: 8px !important;
	font-weight: 700;
}

.cmplz-cookiebanner .cmplz-links .cmplz-link {
	color: var(--ats-navy) !important;
}

/* Complianz hides the title on phones. */
.cmplz-cookiebanner .cmplz-header .cmplz-title {
	display: block !important;
}

/* The site runs no analytics, so there is no Statistics choice to offer. */
.cmplz-cookiebanner .cmplz-category.cmplz-statistics {
	display: none !important;
}

.ats-cookie-settings a {
	white-space: nowrap;
}

/* Cookie Policy and Privacy Statement are the same page: show the link once. */
.cmplz-cookiebanner .cmplz-documents .cmplz-link.privacy-statement {
	display: none !important;
}

/* Ad Inserter's wrapper is a flex child with no width, so AdSense saw 0 px and
   refused to fill the footer slot. */
.ats-ad > .code-block {
	width: 100%;
}

/* ==========================================================================
   13c. Accessibility — focus on navy, 44 px tap targets
   ========================================================================== */
#header a:focus-visible,
#header button:focus-visible,
footer a:focus-visible,
footer button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

#header [data-device="mobile"] .ct-header-search,
#header [data-device="mobile"] .ct-header-trigger {
	--toggle-button-size: 44px;
}

/* Keep the menu icon on the page gutter inside its larger tap area. */
#header [data-device="mobile"] .ct-header-trigger {
	margin-inline-end: -13px;
}

/* ==========================================================================
   14. Responsive
   Blocksy breakpoints: tablet < 1000px, mobile < 690px
   ========================================================================== */
@media (max-width: 999.98px) {
	.ats-footer-nav .wp-block-navigation__container { gap: 0; }
	.ats-footer-nav .wp-block-navigation-item__content { display: block; padding-block: 11px; }
}

@media (max-width: 999.98px) {
	.ats-grid .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 689.98px) {
	:root { --ats-gutter: 16px; }

	.ats-hero .wp-block-cover {
		min-height: 420px !important; /* the block saves 540px inline */
		padding: 0 0 12px;
	}
	.ats-hero .wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,
	.ats-hero .wp-block-cover__inner-container {
		width: calc(100% - 24px);
	}
	.ats-hero__panel .wp-block-post-title { font-size: 26px; line-height: 1.15; }
	.ats-trending .wp-block-post-title { font-size: 16px; }
	.ats-trending .wp-block-post-date { font-size: 12px; }
	.ats-hero__panel {
		padding: 18px 18px 20px;
	}

	.ats-trending {
		padding: 20px 0;
	}
	.ats-trending .wp-block-post::before {
		font-size: 26px;
		min-width: 36px;
	}

	.ats-recent { padding-top: 24px; }

	/* Lead block: one full-width card, then a compact thumbnail list */
	.ats-lead .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.ats-lead .wp-block-post:first-child {
		grid-row: auto;
		padding-bottom: 20px;
		border-bottom: 1px solid var(--ats-line);
	}
	.ats-lead .wp-block-post:first-child .wp-block-post-title {
		font-size: 23px;
		line-height: 1.2;
	}
	.ats-lead .wp-block-post:not(:first-child) .ats-card,
	.ats-grid .ats-card {
		display: grid;
		grid-template-columns: 112px 1fr;
		grid-template-areas: "img meta" "img title";
		align-items: start;
		gap: 4px 14px;
	}
	.ats-lead .wp-block-post:not(:first-child) .wp-block-post-featured-image,
	.ats-grid .wp-block-post-featured-image {
		grid-area: img;
	}
	.ats-lead .wp-block-post:not(:first-child) .wp-block-post-featured-image img,
	.ats-grid .wp-block-post-featured-image img {
		width: 112px;
		height: 80px;
		aspect-ratio: auto;
	}
	.ats-lead .wp-block-post:not(:first-child) .ats-meta,
	.ats-grid .ats-meta {
		grid-area: meta;
		font-size: 11px;
	}
	.ats-lead .wp-block-post:not(:first-child) .wp-block-post-title,
	.ats-grid .wp-block-post-title {
		grid-area: title;
		font-size: 16px;
	}
	.ats-grid .wp-block-post-excerpt {
		display: none;
	}
	.ats-grid {
		margin-top: 18px;
		padding-top: 0;
		border-top: 0;
	}
	.ats-grid .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.ats-more .wp-block-button,
	.ats-more .wp-block-button__link {
		width: 100%;
		text-align: center;
	}

	.ats-ad--leaderboard,
	.ats-ad--billboard { width: 320px; min-height: 100px; }

	.ats-section-head .ats-section-head__title { font-size: 30px; }

	/* Single post */
	.single-post .entry-content > p:first-of-type { font-size: 18px; }
	.single-post .entry-content > .ats-video-lead { margin-bottom: 28px; }
	.single-post .post-navigation { grid-template-columns: 1fr; }
	.single-post .post-navigation .nav-item-next { text-align: left; }
	.single-post .author-box { padding: 20px; }
	.ct-related-posts-container { padding-top: 48px; padding-bottom: 56px; }
	.ct-related-posts .ct-module-title { font-size: 28px; }
}
