/* ==========================================================================
   TB Store – The Journal (blog archive + single post)
   ========================================================================== */

.tb-journal-page,
.tb-post,
.tb-post-shop,
.tb-post-related,
.tb-post-comments,
.tb-jnews { --tb-wrap: 1240px; --tb-read: 720px; }

/* ---------- Archive header ---------- */
.tb-jhead {
	position: relative;
	background: var(--tb-navy);
	color: #fff;
	overflow: hidden;
}
.tb-jhead::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 10px, transparent 10px 28px);
}
.tb-jhead::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: linear-gradient(var(--tb-red), var(--tb-red)) bottom / 100% 4px no-repeat, linear-gradient(#fff, #fff) top / 100% 2px no-repeat;
}
.tb-jhead__inner {
	position: relative;
	max-width: var(--tb-wrap);
	margin: 0 auto;
	padding: 64px 20px 54px;
}
.tb-jhead__title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: clamp(44px, 6vw, 84px);
	line-height: .92;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 14px;
}
.tb-jhead__sub { max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, .82); margin: 0 0 28px; }

.tb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-pill {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .35);
	color: #fff;
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background .15s, border-color .15s, color .15s;
}
.tb-pill:hover { border-color: #fff; color: #fff; }
.tb-pill.is-active { background: #fff; border-color: #fff; color: var(--tb-navy); }
.tb-pill--light { border-color: var(--tb-line); color: var(--tb-navy); height: 32px; font-size: 13px; letter-spacing: .06em; }
.tb-pill--light:hover { border-color: var(--tb-navy); color: var(--tb-navy); }

/* ---------- Archive body ---------- */
.tb-jbody { max-width: var(--tb-wrap); margin: 0 auto; padding: 48px 20px 24px; }
.tb-jfeatured { margin-bottom: 44px; }
.tb-jgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 36px 28px;
}

/* ---------- Cards ---------- */
.tb-card { display: flex; flex-direction: column; min-width: 0; }
.tb-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--tb-grey);
}
.tb-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform .6s ease;
}
.tb-card:hover .tb-card__media img { transform: scale(1.04); }
.tb-card__body { padding-top: 16px; }
.tb-card__cat {
	display: inline-block;
	margin-bottom: 8px;
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tb-red);
}
.tb-card__cat:hover { color: var(--tb-navy); }
.tb-card__title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 24px;
	line-height: 1.08;
	text-transform: uppercase;
	margin: 0 0 10px;
}
.tb-card__title a { color: var(--tb-navy); background: linear-gradient(var(--tb-red), var(--tb-red)) left bottom / 0 2px no-repeat; transition: background-size .25s; }
.tb-card__title a:hover { background-size: 100% 2px; color: var(--tb-navy); }
.tb-card__excerpt { font-size: 16px; line-height: 1.6; color: #4b5563; margin: 0 0 12px; }
.tb-card__meta {
	display: flex;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--tb-muted);
}

/* Featured card */
.tb-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	align-items: center;
	background: var(--tb-grey);
}
.tb-card--featured .tb-card__media { aspect-ratio: 16 / 10; height: 100%; }
.tb-card--featured .tb-card__body { padding: 40px 48px; }
.tb-card--featured .tb-card__title { font-size: clamp(30px, 3vw, 44px); line-height: 1; }
.tb-card--featured .tb-card__excerpt { font-size: 17px; }
.tb-card__cta { margin: 18px 0 0 !important; }

/* Pagination */
.tb-journal-page .navigation.pagination { margin: 48px 0 0; }
.tb-journal-page .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.tb-journal-page .nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--tb-line);
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tb-navy);
}
.tb-journal-page .nav-links .page-numbers:hover { border-color: var(--tb-navy); }
.tb-journal-page .nav-links .page-numbers.current { background: var(--tb-navy); border-color: var(--tb-navy); color: #fff; }

/* Empty state */
.tb-jempty { text-align: center; padding: 64px 20px; background: var(--tb-grey); }
.tb-jempty__title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 36px;
	text-transform: uppercase;
	color: var(--tb-navy);
	margin: 0 0 8px;
}
.tb-jempty__text { color: var(--tb-muted); margin-bottom: 22px; }

/* Newsletter band */
.tb-jnews { background: var(--tb-grey); margin-top: 56px; }
.tb-jnews__inner { max-width: var(--tb-wrap); margin: 0 auto; padding: 52px 20px; }

/* ---------- Single post ---------- */
.tb-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	z-index: 1000;
	pointer-events: none;
}
.tb-progress span {
	display: block;
	height: 100%;
	background: var(--tb-red);
	transform-origin: 0 50%;
	transform: scaleX(0);
}

.tb-post__head {
	max-width: 860px;
	margin: 0 auto;
	padding: 48px 20px 30px;
	text-align: center;
}
.tb-post__crumbs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 16px;
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tb-muted);
}
.tb-post__crumbs a { color: var(--tb-red); }
.tb-post__crumbs a:first-child { color: var(--tb-muted); }
.tb-post__crumbs a:hover { color: var(--tb-navy); }
.tb-post__title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: clamp(38px, 5vw, 64px);
	line-height: .98;
	text-transform: uppercase;
	color: var(--tb-navy);
	margin: 0 0 16px;
}
.tb-post__dek { font-size: 20px; line-height: 1.5; color: #4b5563; margin: 0 auto 22px; max-width: 680px; }
.tb-post__meta {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--tb-muted);
}
.tb-post__meta strong { color: var(--tb-navy); }
.tb-post__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--tb-navy);
	color: #fff;
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 15px;
}

.tb-post__hero { max-width: var(--tb-wrap); margin: 0 auto 8px; padding: 0 20px; }
.tb-post__hero img {
	display: block;
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	border-radius: 0 !important;
	background: var(--tb-grey);
}
.tb-post__hero figcaption { font-size: 13px; color: var(--tb-muted); padding-top: 8px; text-align: center; }

.tb-post__layout {
	display: grid;
	grid-template-columns: 1fr minmax(0, var(--tb-read)) 1fr;
	gap: 0 40px;
	max-width: var(--tb-wrap);
	margin: 0 auto;
	padding: 40px 20px 20px;
}
.tb-post__aside { grid-column: 1; justify-self: end; }
.tb-post__aside .tb-share { position: sticky; top: 120px; flex-direction: column; }
.tb-post__content { grid-column: 2; min-width: 0; }

/* Share */
.tb-share { display: flex; align-items: center; gap: 8px; }
.tb-share__label {
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--tb-muted);
}
.tb-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--tb-line);
	border-radius: 50%;
	background: #fff;
	color: var(--tb-navy);
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.tb-share__btn svg { width: 17px; height: 17px; fill: currentColor; }
.tb-share__btn:hover { background: var(--tb-navy); border-color: var(--tb-navy); color: #fff; }
.tb-share__btn.is-copied { background: #15803d; border-color: #15803d; color: #fff; }
.tb-share__btn.is-copied::after {
	content: "Copied!";
	position: absolute;
	left: 50%;
	top: -30px;
	transform: translateX(-50%);
	padding: 3px 8px;
	background: var(--tb-navy);
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
}
.tb-post__share-bottom { display: none; margin-top: 28px; }

/* Typography inside the article */
.tb-post__content { font-size: 18px; line-height: 1.8; color: #1f2937; }
.tb-post__content > *:first-child { margin-top: 0; }
.tb-post__content p { margin: 0 0 1.35em; }
.tb-post__content > p:first-of-type::first-letter {
	float: left;
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 4.2em;
	line-height: .8;
	padding: 6px 10px 0 0;
	color: var(--tb-navy);
}
.tb-post__content h2,
.tb-post__content h3,
.tb-post__content h4 {
	font-family: var(--tb-head);
	font-weight: 800;
	text-transform: uppercase;
	color: var(--tb-navy);
	line-height: 1.05;
	margin: 1.8em 0 .6em;
}
.tb-post__content h2 { font-size: 34px; }
.tb-post__content h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	background: var(--tb-red);
	margin-bottom: 14px;
}
.tb-post__content h3 { font-size: 25px; }
.tb-post__content h4 { font-size: 20px; letter-spacing: .04em; }
.tb-post__content a { color: var(--tb-navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--tb-red); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.tb-post__content a:hover { color: var(--tb-red); }
.tb-post__content a.button { text-decoration: none; }
.tb-post__content ul,
.tb-post__content ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.tb-post__content li { margin-bottom: .45em; }
.tb-post__content ul li::marker { color: var(--tb-red); }
.tb-post__content ol li::marker { color: var(--tb-navy); font-family: var(--tb-head); font-weight: 800; }
.tb-post__content strong { color: var(--tb-navy); }
.tb-post__content blockquote {
	margin: 2em 0;
	padding: 6px 0 6px 26px;
	border-left: 4px solid var(--tb-red);
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--tb-navy);
	background: none;
}
.tb-post__content blockquote p { margin: 0; }
.tb-post__content blockquote cite { display: block; margin-top: 10px; font-family: var(--tb-body); font-size: 14px; font-weight: 600; text-transform: none; color: var(--tb-muted); font-style: normal; }
.tb-post__content figure,
.tb-post__content .wp-block-image { margin: 2em 0; }
.tb-post__content img { border-radius: 0 !important; height: auto; }
.tb-post__content figcaption,
.tb-post__content .wp-element-caption { font-size: 14px; color: var(--tb-muted); text-align: center; margin-top: 8px; }
.tb-post__content .alignwide { margin-left: -120px; margin-right: -120px; max-width: none; }
.tb-post__content hr { border: 0; height: 1px; background: var(--tb-line); margin: 2.5em 0; }
.tb-post__content table { width: 100%; border-top: 2px solid var(--tb-navy); font-size: 16px; }
.tb-post__content th,
.tb-post__content td { padding: 12px 10px; border-color: var(--tb-line); }
.tb-post__content th { font-family: var(--tb-head); text-transform: uppercase; letter-spacing: .06em; color: var(--tb-navy); }

/* Callout box: <div class="tb-callout"> */
.tb-post__content .tb-callout {
	margin: 2em 0;
	padding: 22px 26px;
	background: var(--tb-grey);
	border-top: 3px solid var(--tb-navy);
	font-size: 17px;
}
.tb-post__content .tb-callout > *:last-child { margin-bottom: 0; }
.tb-post__content .tb-callout .tb-callout__title {
	display: block;
	margin-bottom: 6px;
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tb-red);
}

.tb-post__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--tb-line); }

/* Sections after the article */
.tb-post-shop { border-top: 1px solid var(--tb-line); margin-top: 40px; }
.tb-post-shop__inner,
.tb-post-related__inner,
.tb-post-comments__inner { max-width: var(--tb-wrap); margin: 0 auto; padding: 48px 20px 8px; }
.tb-post-related { background: #fff; }
.tb-post-comments__inner { max-width: calc(var(--tb-read) + 40px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.tb-post__content .alignwide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 849px) {
	.tb-jgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
	.tb-card--featured { grid-template-columns: 1fr; }
	.tb-card--featured .tb-card__body { padding: 24px 22px 28px; }
	.tb-post__layout { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
	.tb-post__aside { display: none; }
	.tb-post__content { grid-column: 1; }
	.tb-post__share-bottom { display: block; }
	.tb-post__hero img { aspect-ratio: 16 / 10; }
}
@media (max-width: 549px) {
	.tb-jhead__inner { padding: 44px 16px 40px; }
	.tb-jhead__sub { font-size: 16px; }
	.tb-pills { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
	.tb-pill { flex: 0 0 auto; }
	.tb-jbody { padding: 32px 16px 8px; }
	.tb-jgrid { grid-template-columns: 1fr; }
	.tb-card__title { font-size: 22px; }
	.tb-post__head { padding: 32px 16px 22px; }
	.tb-post__dek { font-size: 17px; }
	.tb-post__hero { padding: 0; }
	.tb-post__layout { padding: 24px 16px 8px; }
	.tb-post__content { font-size: 17px; }
	.tb-post__content h2 { font-size: 28px; }
	.tb-post__content blockquote { font-size: 23px; padding-left: 18px; }
}

/* ---------- Content wrapped by Fixed TOC (#ftwp-postcontent) ---------- */
.tb-post__content #ftwp-postcontent > *:first-child { margin-top: 0; }
.tb-post__content #ftwp-postcontent > p:first-of-type::first-letter {
	float: left;
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 4.2em;
	line-height: .8;
	padding: 6px 10px 0 0;
	color: var(--tb-navy);
}

/* ---------- Fixed TOC box in the article ---------- */
.tb-post #ftwp-container-outer.ftwp-in-post { margin: 0 0 34px; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-contents {
	width: 100%;
	max-width: 100%;
	border: 0 !important;
	border-top: 3px solid var(--tb-navy) !important;
	border-radius: 0 !important;
	background: var(--tb-grey) !important;
	box-shadow: none !important;
	padding: 6px 0 10px;
}
.tb-post #ftwp-container.ftwp-wrap #ftwp-header {
	padding: 14px 22px 8px;
	color: var(--tb-navy);
	background: none;
}
.tb-post #ftwp-container.ftwp-wrap #ftwp-header-title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 15px !important;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--tb-red);
	margin: 0;
}
.tb-post #ftwp-container.ftwp-wrap #ftwp-header-control { display: none; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-header-minimize { color: var(--tb-navy); }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list { padding: 0 22px 8px; margin: 0; background: none; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-item { margin: 0; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-anchor {
	padding: 7px 0;
	border-bottom: 1px solid var(--tb-line);
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 17px !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tb-navy) !important;
	text-decoration: none;
	background: none !important;
}
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-item:last-child .ftwp-anchor { border-bottom: 0; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-anchor::before { color: var(--tb-red) !important; font-weight: 800; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-anchor:hover,
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-active > .ftwp-anchor { color: var(--tb-red) !important; }
.tb-post #ftwp-container.ftwp-wrap #ftwp-list .ftwp-anchor::after { display: none !important; }
/* Floating button when the TOC is minimised on scroll */
#ftwp-container.ftwp-wrap #ftwp-trigger {
	background: var(--tb-navy) !important;
	border-color: var(--tb-navy) !important;
	color: #fff !important;
	border-radius: 50% !important;
}
#ftwp-container.ftwp-wrap.ftwp-fixed-to-post #ftwp-contents,
#ftwp-container.ftwp-wrap:not(.ftwp-minimize) #ftwp-contents { border-radius: 0 !important; }

.tb-post__content blockquote,
.tb-post__content blockquote p { font-style: normal; }

/* ---------- Comments ---------- */
.tb-post-comments { border-top: 1px solid var(--tb-line); margin-top: 40px; }
.tb-post-comments #comments,
.tb-post-comments .comments-area { margin: 0; }
.tb-post-comments .review-form-inner,
.tb-post-comments #respond,
.tb-post-comments .has-border {
	background: #fff !important;
	border: 0 !important;
	border-top: 3px solid var(--tb-navy) !important;
	padding: 24px 0 0 !important;
}
.tb-post-comments #reply-title,
.tb-post-comments .comments-title {
	font-family: var(--tb-head);
	font-weight: 800;
	font-size: 28px;
	text-transform: uppercase;
	color: var(--tb-navy);
	margin-bottom: 6px;
}
.tb-post-comments .comment-notes,
.tb-post-comments .logged-in-as { font-size: 14px; color: var(--tb-muted); }
.tb-post-comments label {
	font-family: var(--tb-head);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--tb-navy);
}
.tb-post-comments input[type="text"],
.tb-post-comments input[type="email"],
.tb-post-comments input[type="url"],
.tb-post-comments textarea {
	border: 1px solid #c9ced6;
	border-radius: 0 !important;
	box-shadow: none;
	background: #fff;
}
.tb-post-comments input:focus,
.tb-post-comments textarea:focus { border-color: var(--tb-navy); box-shadow: 0 0 0 1px var(--tb-navy); }
.tb-post-comments .form-submit input[type="submit"],
.tb-post-comments #submit {
	background: var(--tb-navy);
	border: 0;
	border-radius: 0;
	color: #fff;
	font-family: var(--tb-head);
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	padding: 0 28px;
	min-height: 46px;
}
.tb-post-comments #submit:hover { background: var(--tb-red); }
.tb-post-comments .comment-list .comment-inner { border-bottom: 1px solid var(--tb-line); padding-bottom: 18px; }
