/* ==========================================================================
   Tarsil blog — build 2.0.2
   Index: filter chips, lead card, two-column grid, conversion sidebar.
   Single: navy hero, sticky contents rail, full-measure article, trial band.
   Change the six brand values below and the whole design follows.
   ========================================================================== */

.tb-blog-view {
	--tb-navy-900: #071b33;
	--tb-navy-700: #0e3560;
	--tb-blue-500: #1e7fd4;
	--tb-blue-rgb: 30, 127, 212;
	--tb-amber-400: #f2a93b;

	--tb-paper: #f7f9fb;
	--tb-surface: #fff;
	--tb-rule: #e3e9ef;
	--tb-ink: #10202f;
	--tb-muted: #5c6e80;
	--tb-faint: #94a5b5;

	--tb-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--tb-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
	--tb-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

	--tb-shell: 74rem;
	--tb-measure: 40rem;
	--tb-radius: 14px;
	--tb-shadow: 0 1px 2px rgba(7, 27, 51, .04), 0 8px 24px rgba(7, 27, 51, .06);

	background: var(--tb-paper);
	color: var(--tb-ink);
	font-family: var(--tb-body);
	font-size: 15px;
	line-height: 1.65;
}

.tb {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--tb-shell);
	padding-inline: 1.5rem;
	width: 100%;
}

.tb-blog-view .tb *,
.tb-blog-view .tb *::before,
.tb-blog-view .tb *::after,
.tb-single *,
.tb-pagehead * {
	box-sizing: border-box;
}

.tb-blog-view img {
	display: block;
	height: auto;
	max-width: 100%;
}

.tb-blog-view h1,
.tb-blog-view h2,
.tb-blog-view h3 {
	font-family: var(--tb-display);
	font-weight: 700;
	letter-spacing: -.02em;
}

.tb-blog-view a:focus-visible,
.tb-blog-view button:focus-visible {
	border-radius: 3px;
	outline: 2px solid var(--tb-blue-500);
	outline-offset: 3px;
}

/* ------------------------------------------------------------- atoms -- */

.tb-eyebrow {
	color: var(--tb-blue-500);
	font-family: var(--tb-mono);
	font-size: .72rem;
	letter-spacing: .14em;
	margin: 0 0 .75rem;
	text-transform: uppercase;
}

.tb-eyebrow--onDark,
.tb-eyebrow--onDark a {
	color: #9ec9f2;
	text-decoration: none;
}

.tb-eyebrow--onDark a:hover {
	color: #fff;
}

.tb-blog-view .tb-kicker {
	background: rgba(var(--tb-blue-rgb), .09);
	border-radius: 20px;
	color: var(--tb-blue-500);
	display: inline-block;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .09em;
	line-height: 1.5;
	max-width: max-content;
	padding: 3px 9px;
	text-transform: uppercase;
	width: auto;
}

.tb-meta,
.tb-byline {
	align-items: center;
	color: var(--tb-faint);
	display: flex;
	flex-wrap: wrap;
	font-size: .8rem;
	gap: .55rem;
	margin: 0;
}

.tb-byline {
	color: var(--tb-muted);
	font-size: .85rem;
	gap: .6rem;
}

.tb-byline b {
	font-weight: 600;
}

.tb-meta__dot {
	background: currentColor;
	border-radius: 50%;
	flex: 0 0 auto;
	height: 3px;
	opacity: .5;
	width: 3px;
}

.tb-avatar {
	align-items: center;
	background: var(--tb-navy-700);
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: .66rem;
	font-weight: 700;
	height: 26px;
	justify-content: center;
	letter-spacing: .02em;
	width: 26px;
}

.tb-btn {
	background: #fff;
	border-radius: 9px;
	color: var(--tb-navy-900);
	display: inline-block;
	font-size: .95rem;
	font-weight: 600;
	padding: .85rem 1.75rem;
	text-align: center;
	text-decoration: none;
}

.tb-btn:hover {
	background: #e8f1fa;
}

.tb-btn--dark {
	background: var(--tb-navy-900);
	color: #fff;
}

.tb-btn--dark:hover {
	background: var(--tb-blue-500);
}

.tb-thumb--empty {
	background: linear-gradient(140deg, var(--tb-navy-900) 0%, var(--tb-navy-700) 55%, var(--tb-blue-500) 100%);
	display: block;
	height: 100%;
	min-height: 140px;
	width: 100%;
}

/* --------------------------------------------------------- page head -- */

.tb-pagehead {
	background: linear-gradient(180deg, rgba(var(--tb-blue-rgb), .07), transparent);
	border-bottom: 1px solid var(--tb-rule);
	padding: 2.75rem 0 2.25rem;
	text-align: center;
}

.tb-pagehead h1 {
	font-size: clamp(1.9rem, 4.5vw, 2.4rem);
	margin: 0 0 .5rem;
}

.tb-pagehead p {
	color: var(--tb-muted);
	margin: 0 auto;
	max-width: 38rem;
}

/* ------------------------------------------------------------- chips -- */

.tb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 1.75rem 0 1.4rem;
}

.tb-chip {
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: 30px;
	color: var(--tb-muted);
	font-size: .84rem;
	font-weight: 600;
	padding: 6px 14px;
	text-decoration: none;
}

.tb-chip:hover {
	border-color: var(--tb-blue-500);
	color: var(--tb-blue-500);
}

.tb-chip.is-on {
	background: var(--tb-navy-900);
	border-color: var(--tb-navy-900);
	color: #fff;
}

.tb-chip__n {
	font-weight: 500;
	margin-left: 4px;
	opacity: .55;
}

/* ------------------------------------------------------------ index -- */

.tb-index {
	padding-bottom: 5rem;
}

.tb-index__layout {
	align-items: start;
	display: grid;
	gap: 2.15rem;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 64rem) {
	.tb-index__layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
}

.tb-lead {
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: var(--tb-radius);
	box-shadow: var(--tb-shadow);
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin-bottom: 2.5rem;
	overflow: hidden;
}

@media (min-width: 45rem) {
	.tb-lead {
		grid-template-columns: 320px minmax(0, 1fr);
	}
}

.tb-lead__media,
.tb-card__media {
	display: block;
	overflow: hidden;
}

.tb-lead__media img {
	height: 100%;
	min-height: 210px;
	object-fit: cover;
	transition: transform 400ms ease;
	width: 100%;
}

.tb-lead:hover .tb-lead__media img,
.tb-card:hover .tb-card__media img {
	transform: scale(1.03);
}

.tb-lead__body {
	padding: 1.5rem 1.6rem;
}

.tb-lead__title {
	font-size: 1.5rem;
	line-height: 1.22;
	margin: .7rem 0 .5rem;
}

.tb-lead__title a,
.tb-card__title a {
	color: inherit;
	text-decoration: none;
}

.tb-lead:hover .tb-lead__title a,
.tb-card:hover .tb-card__title a {
	color: var(--tb-blue-500);
}

.tb-lead__excerpt {
	color: var(--tb-muted);
	font-size: .93rem;
	margin: 0 0 .9rem;
}

.tb-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 45rem) {
	.tb-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.tb-card {
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: var(--tb-radius);
	box-shadow: var(--tb-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.tb-card__media img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 400ms ease;
	width: 100%;
}

.tb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem 1.15rem 1.15rem;
}

.tb-card__title {
	font-size: 1.04rem;
	line-height: 1.3;
	margin: .6rem 0 .45rem;
}

.tb-card__excerpt {
	color: var(--tb-muted);
	flex: 1;
	font-size: .86rem;
	margin: 0 0 .9rem;
}

/* ----------------------------------------------------------- sidebar -- */

@media (min-width: 64rem) {
	.tb-side {
		position: sticky;
		top: 5.25rem;
	}
}

.tb-side__card {
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: var(--tb-radius);
	box-shadow: var(--tb-shadow);
	margin-bottom: 1.15rem;
	padding: 1rem 1.15rem 1.15rem;
}

.tb-side__label {
	color: var(--tb-muted);
	font-family: var(--tb-body);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .09em;
	margin: 0 0 .75rem;
	text-transform: uppercase;
}

.tb-side__card--trial {
	background: linear-gradient(140deg, var(--tb-navy-900), var(--tb-navy-700) 60%, var(--tb-blue-500));
	border: 0;
	color: #fff;
}

.tb-side__card--trial .tb-side__label {
	color: rgba(255, 255, 255, .7);
}

.tb-side__card--trial p {
	font-size: .88rem;
	margin: 0 0 .9rem;
	opacity: .93;
}

.tb-side__card--trial .tb-btn {
	display: block;
	font-size: .9rem;
	padding: .65rem;
}

.tb-side__foot {
	font-size: .72rem;
	margin: .6rem 0 0 !important;
	opacity: .78;
	text-align: center;
}

.tb-side__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-side__list li {
	border-bottom: 1px solid var(--tb-rule);
	font-size: .89rem;
	padding: .5rem 0;
}

.tb-side__list li:last-child {
	border-bottom: 0;
}

.tb-side__list a {
	color: var(--tb-ink);
	display: block;
	line-height: 1.35;
	text-decoration: none;
}

.tb-side__list a:hover {
	color: var(--tb-blue-500);
}

.tb-side__n {
	color: var(--tb-faint);
	display: block;
	font-size: .74rem;
	margin-top: 2px;
}

.tb-topics {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.tb-topic {
	background: rgba(var(--tb-blue-rgb), .08);
	border-radius: 20px;
	color: var(--tb-blue-500);
	font-size: .8rem;
	font-weight: 600;
	padding: 4px 11px;
	text-decoration: none;
}

.tb-topic:hover {
	background: rgba(var(--tb-blue-rgb), .16);
}

/* -------------------------------------------------------- pagination -- */

.tb-index .pagination {
	margin-top: 1.9rem;
}

.tb-index .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	justify-content: center;
}

.tb-index .page-numbers {
	align-items: center;
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: 9px;
	color: var(--tb-muted);
	display: inline-flex;
	font-size: .87rem;
	font-weight: 600;
	height: 36px;
	justify-content: center;
	min-width: 36px;
	padding: 0 .65rem;
	text-decoration: none;
}

.tb-index .page-numbers:hover {
	border-color: var(--tb-blue-500);
	color: var(--tb-blue-500);
}

.tb-index .page-numbers.current {
	background: var(--tb-navy-900);
	border-color: var(--tb-navy-900);
	color: #fff;
}

.tb-empty {
	background: var(--tb-surface);
	border: 1px dashed var(--tb-rule);
	border-radius: var(--tb-radius);
	margin-top: 1.5rem;
	padding: 4rem 2rem;
	text-align: center;
}

.tb-empty h2 {
	margin: 0 0 .5rem;
}

.tb-empty p {
	color: var(--tb-muted);
	margin: 0 0 1.5rem;
}

/* --------------------------------------------------------- hero (v3) -- */

.tb-single {
	padding-bottom: 4rem;
}

.tb-hero {
	background: linear-gradient(165deg, var(--tb-navy-900) 0%, var(--tb-navy-700) 62%, #1a5a95 100%);
	color: #fff;
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.tb-hero__inner {
	padding-bottom: clamp(2rem, 4.5vw, 3.25rem);
}

.tb-blog-view .tb-hero__title {
	color: #fff;
	font-size: clamp(2rem, 5vw, 3.4rem);
	letter-spacing: -.03em;
	line-height: 1.06;
	margin: 0 0 1rem;
	max-width: 24ch;
}

/* Any heading on a dark Tarsil surface is white — defends against the parent
   theme's global heading colour winning on specificity. */
.tb-blog-view .tb-hero__title,
.tb-blog-view .tb-trial h2,
.tb-blog-view .tb-side__card--trial .tb-side__label {
	color: #fff;
}

.tb-hero__standfirst {
	color: #b9cee2;
	font-size: 1.06rem;
	line-height: 1.6;
	margin: 0 0 1.4rem;
	max-width: 52ch;
}

.tb-hero__byline .tb-byline {
	color: #8fb2d4;
}

.tb-hero__byline .tb-avatar {
	background: rgba(255, 255, 255, .18);
}

.tb-hero__media {
	margin: 0 auto -4rem;
	max-width: var(--tb-shell);
}

.tb-hero__media img {
	aspect-ratio: 16 / 7;
	border-radius: var(--tb-radius);
	max-height: 460px;
	object-fit: cover;
	width: 100%;
}

/* --------------------------------------------------------- single body -- */

.tb-single__grid {
	display: grid;
	gap: 3rem;
	padding-top: clamp(5rem, 9vw, 6.5rem);
}

.tb-single__grid--noHero {
	padding-top: 3rem;
}

@media (min-width: 62rem) {
	.tb-single__grid {
		gap: 4rem;
		grid-template-columns: 15rem minmax(0, 1fr);
	}

	/* Article sits on a readable measure, centered in its track, so the
	   remaining space reads as intentional margin rather than a gap. */
	.tb-single__grid .tb-prose {
		margin-inline: auto;
		width: 100%;
	}

	.tb-single__grid--noToc {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}
}

.tb-toc {
	align-self: start;
}

@media (min-width: 62rem) {
	.tb-toc {
		position: sticky;
		top: 5.5rem;
	}
}

.tb-toc__label {
	color: var(--tb-muted);
	font-family: var(--tb-mono);
	font-size: .7rem;
	letter-spacing: .14em;
	margin: 0 0 1rem;
	text-transform: uppercase;
}

.tb-toc__nav {
	padding-left: 1.25rem;
	position: relative;
}

.tb-toc__line {
	background: var(--tb-rule);
	bottom: .4rem;
	left: 3px;
	position: absolute;
	top: .4rem;
	width: 1px;
}

.tb-toc__progress {
	background: var(--tb-blue-500);
	display: block;
	height: 0;
	transition: height 120ms linear;
	width: 100%;
}

.tb-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tb-toc__item {
	position: relative;
}

.tb-toc__item a {
	color: var(--tb-muted);
	display: block;
	font-size: .875rem;
	line-height: 1.4;
	padding: .45rem 0;
	text-decoration: none;
}

.tb-toc__item a::before {
	background: var(--tb-paper);
	border: 1px solid var(--tb-rule);
	border-radius: 50%;
	content: "";
	height: 7px;
	left: -1.25rem;
	position: absolute;
	top: .75rem;
	width: 7px;
}

.tb-toc__item--l3 a {
	padding-left: .85rem;
}

.tb-toc__item a:hover {
	color: var(--tb-ink);
}

.tb-toc__item.is-active a {
	color: var(--tb-navy-900);
	font-weight: 600;
}

.tb-toc__item.is-active a::before {
	background: var(--tb-amber-400);
	border-color: var(--tb-amber-400);
}

/* ------------------------------------------------------------- prose -- */

.tb-prose {
	font-size: 1.0625rem;
	line-height: 1.75;
	max-width: var(--tb-measure);
}

.tb-prose > * + * {
	margin-top: 1.4em;
}

.tb-prose h2,
.tb-prose h3 {
	line-height: 1.2;
	scroll-margin-top: 5rem;
}

.tb-prose h2 {
	font-size: 1.6rem;
	margin-top: 2.5em;
}

.tb-prose h3 {
	font-size: 1.2rem;
	margin-top: 2em;
}

.tb-prose a {
	color: var(--tb-blue-500);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.tb-prose blockquote {
	border-left: 3px solid var(--tb-blue-500);
	color: var(--tb-muted);
	font-size: 1.1rem;
	margin-inline: 0;
	padding-left: 1.25rem;
}

.tb-prose ul,
.tb-prose ol {
	padding-left: 1.35rem;
}

.tb-prose li + li {
	margin-top: .4em;
}

.tb-prose code {
	background: #eef3f8;
	font-family: var(--tb-mono);
	font-size: .875em;
	padding: .15em .35em;
}

.tb-prose pre {
	background: var(--tb-navy-900);
	border-radius: 10px;
	color: #d9e6f3;
	font-size: .85rem;
	overflow-x: auto;
	padding: 1.25rem;
}

.tb-prose pre code {
	background: none;
	padding: 0;
}

.tb-prose table {
	border-collapse: collapse;
	font-size: .93rem;
	width: 100%;
}

.tb-prose th,
.tb-prose td {
	border: 1px solid var(--tb-rule);
	padding: .55rem .7rem;
	text-align: left;
}

.tb-prose th {
	background: #eef3f8;
	font-weight: 600;
}

.tb-prose figcaption {
	color: var(--tb-muted);
	font-family: var(--tb-mono);
	font-size: .75rem;
	margin-top: .6rem;
}

.tb-tags {
	border-top: 1px solid var(--tb-rule);
	font-size: .8rem;
	padding-top: 1.25rem;
}

.tb-tags a {
	background: rgba(var(--tb-blue-rgb), .08);
	border-radius: 20px;
	color: var(--tb-blue-500);
	display: inline-block;
	font-weight: 600;
	margin: 0 .35rem .35rem 0;
	padding: 3px 11px;
	text-decoration: none;
}

/* -------------------------------------------------------- trial band -- */

.tb-trial {
	align-items: center;
	background: linear-gradient(140deg, var(--tb-navy-900) 0%, var(--tb-navy-700) 55%, #1a5a95 100%);
	border-radius: var(--tb-radius);
	color: #fff;
	display: flex;
	flex-wrap: wrap;
	gap: 2.5rem;
	margin-top: 4rem;
	padding: 2.5rem 2.75rem;
}

.tb-trial__copy {
	flex: 1 1 24rem;
}

.tb-blog-view .tb-trial h2 {
	color: #fff;
	font-size: 1.7rem;
	line-height: 1.15;
	margin: 0 0 .6rem;
}

.tb-trial p {
	color: #b9cee2;
	font-size: .95rem;
	line-height: 1.6;
	margin: 0;
	max-width: 46ch;
}

.tb-trial__act {
	flex: 0 0 auto;
	text-align: right;
}

.tb-trial__foot {
	color: #8fb2d4 !important;
	font-family: var(--tb-mono);
	font-size: .68rem !important;
	letter-spacing: .1em;
	margin-top: .75rem !important;
	text-transform: uppercase;
}

@media (max-width: 44rem) {
	.tb-trial {
		padding: 2rem 1.5rem;
	}

	.tb-trial__act,
	.tb-trial__foot {
		text-align: left;
	}
}

/* ----------------------------------------------------------- related -- */

.tb-related {
	margin-top: 4rem;
}

.tb-related__label {
	border-bottom: 1px solid var(--tb-rule);
	font-size: 1.15rem;
	margin: 0 0 1.5rem;
	padding-bottom: .9rem;
}

.tb-related__grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.tb-related__item {
	background: var(--tb-surface);
	border: 1px solid var(--tb-rule);
	border-radius: 12px;
	box-shadow: var(--tb-shadow);
	color: inherit;
	display: block;
	overflow: hidden;
	text-decoration: none;
}

.tb-related__media {
	display: block;
	overflow: hidden;
}

.tb-related__media img,
.tb-related__media .tb-thumb--empty {
	aspect-ratio: 16 / 10;
	min-height: 0;
	object-fit: cover;
	transition: transform 400ms ease;
	width: 100%;
}

.tb-related__item:hover .tb-related__media img {
	transform: scale(1.04);
}

.tb-related__item .tb-meta {
	padding: .9rem 1rem 0;
}

.tb-related__title {
	display: block;
	font-family: var(--tb-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	padding: .4rem 1rem 1.1rem;
}

.tb-related__item:hover .tb-related__title {
	color: var(--tb-blue-500);
}

/* ---------------------------------------------------------- adjacent -- */

.tb-adjacent {
	border-top: 1px solid var(--tb-rule);
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: space-between;
	margin-top: 3rem;
	padding-top: 1.5rem;
}

.tb-adjacent a {
	color: var(--tb-muted);
	font-size: .85rem;
	max-width: 26ch;
	text-decoration: none;
}

.tb-adjacent a:hover {
	color: var(--tb-blue-500);
}

.tb-adjacent__next {
	margin-left: auto;
	text-align: right;
}

.tb-comments {
	padding-block: 2.5rem 4rem;
}

.tb-comments .comment-reply-title,
.tb-comments .comments-title {
	font-family: var(--tb-display);
}

/* ------------------------------------------------------------ motion -- */

@media (prefers-reduced-motion: reduce) {
	.tb-blog-view *,
	.tb-blog-view *::before,
	.tb-blog-view *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
