/*
 * Thai Nomad Life, design phase v2 step 2: one publication, three departments (design/departments-and-templates-spec.md
 * §2 and §4). A department sets only its accent, its heading style, its header and its component accents; shared
 * components keep one shape everywhere. Loads on posts, pages and the department archives once tnl_hp_step(2) is on.
 * Bricolage Grotesque has no width axis, so "condensed" headings use weight 800, uppercase on the H1 only and tight
 * tracking (decisions.md, 5 Nov 2026). Tokens: tokens.css. Links stay lagoon-deep in every department.
 */

/* ---------- Department accents ---------- */
body.tnl-dept-visas { --tnl-accent: var(--tnl-lagoon-deep); --tnl-accent-ink: var(--tnl-lagoon-deep); --tnl-accent-soft: var(--tnl-lagoon-tint); }
body.tnl-dept-fitness { --tnl-accent: var(--tnl-mango); --tnl-accent-ink: var(--tnl-mango-deep); --tnl-accent-soft: var(--tnl-mango-tint); }
body.tnl-dept-living { --tnl-accent: var(--tnl-palm); --tnl-accent-ink: var(--tnl-palm); --tnl-accent-soft: var(--tnl-powder-2); }

/* ---------- Visas & Legal: the independence strip under the site header ---------- */
.tnl-strip {
	margin: 0;
	padding: 9px 16px;
	border-bottom: 1px solid var(--tnl-lagoon-tint-line, var(--tnl-line));
	background: var(--tnl-lagoon-tint);
	color: var(--tnl-pine);
	font-family: var(--tnl-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
}
.tnl-strip span { margin: 0 6px; color: var(--tnl-lagoon-deep); }

/* ---------- Breadcrumb (posts): Home › department › article ---------- */
.tnl-crumbs { margin: 0 0 14px; }
.tnl-crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; font-family: var(--tnl-text); font-size: 14px; line-height: 1.5; color: var(--tnl-muted); }
.tnl-crumbs li { margin: 0; }
.tnl-crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--tnl-muted); }
.tnl-crumbs a { display: inline-block; padding: 10px 0; margin: -10px 0; color: var(--tnl-lagoon-deep); text-decoration: underline; text-decoration-color: var(--tnl-lagoon); text-underline-offset: 3px; }
.tnl-crumbs a:focus-visible { outline: 3px solid var(--tnl-lagoon-deep); outline-offset: 2px; border-radius: 3px; }
.tnl-crumbs [aria-current] { max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Department headings ---------- */
.tnl-dept-eyebrow {
	margin: 0 0 12px;
	font-family: var(--tnl-text);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2.6px;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--tnl-accent-ink);
}
/* Visas & Legal: public-service clarity. Weight 600, thin rules, numbered sections */
/* Hero titles use a doubled class: article.css styles them at (0,4,0) */
body.tnl-dept.tnl-dept-visas .hero-section .page-title { font-weight: 600; letter-spacing: -.2px; }
body.tnl-dept-visas .entry-content .tnl-article h2, body.tnl-dept-visas .entry-content .tnl-article h3 { font-weight: 600; }
body.tnl-dept-visas .entry-content .tnl-article { counter-reset: tnl-h2; }
body.tnl-dept-visas .entry-content .tnl-article > h2:not([data-tnl-end]) { counter-increment: tnl-h2; counter-reset: tnl-h3; }
body.tnl-dept-visas .entry-content .tnl-article > h2:not([data-tnl-end])::before { content: counter(tnl-h2) ". "; color: var(--tnl-lagoon-deep); }
body.tnl-dept-visas .entry-content .tnl-article > h3 { counter-increment: tnl-h3; }
body.tnl-dept-visas .entry-content .tnl-article > h2:not([data-tnl-end]) ~ h3::before { content: counter(tnl-h2) "." counter(tnl-h3) " "; color: var(--tnl-lagoon-deep); }
body.tnl-dept-visas .entry-content .tnl-article > h2[data-tnl-end] ~ h3::before { content: none; }
/* Ruled tables: rules between rows, no fills */
body.tnl-dept-visas .entry-content .tnl-article .wp-block-table :is(th, td) { border: 0; border-bottom: 1px solid var(--tnl-line); }
body.tnl-dept-visas .entry-content .tnl-article .wp-block-table thead th { background: none; color: var(--tnl-pine); border-bottom: 2px solid var(--tnl-lagoon-deep); }
body.tnl-dept-visas .entry-content .tnl-article .wp-block-table tbody tr:nth-child(even) td { background: none; }

/* Muay Thai & Fitness: energy. Weight 800, tight tracking and leading; uppercase on the H1 only */
body.tnl-dept.tnl-dept-fitness .hero-section .page-title { font-weight: 800; text-transform: uppercase; letter-spacing: -.3px; line-height: 1.04; }
body.tnl-dept-fitness .entry-content .tnl-article h2 { font-weight: 800; letter-spacing: -.3px; line-height: 1.12; }
body.tnl-dept-fitness .entry-content .tnl-article h3 { font-weight: 700; letter-spacing: -.2px; }
body.tnl-dept-fitness .entry-content .tnl-article li::marker { color: var(--tnl-mango-deep); }

/* Living on Samui: warm and bright. Palm accent, rounded 16 px surfaces */
body.tnl-dept-living .entry-content .tnl-article h2 { font-weight: 600; }
body.tnl-dept-living .entry-content .tnl-article li::marker { color: var(--tnl-palm); }

/* ---------- Pillar headers (spec §4.1) ---------- */
body.tnl-pillar .hero-section .entry-header { padding-top: 28px; padding-bottom: 26px; }
body.tnl-pillar.tnl-dept .hero-section .page-title { font-size: 40px; text-wrap: balance; }
body.tnl-pillar-visas .hero-section .entry-header { border-bottom: 1px solid var(--tnl-line); }
body.tnl-pillar-living .hero-section[data-type="type-1"] { padding: 0 24px; border-radius: 16px; background: var(--tnl-powder-2); }
body.tnl-pillar-living .hero-section .entry-header { padding-top: 32px; padding-bottom: 30px; }

/* Muay Thai & Fitness: a pine band across the page with the training illustration behind the title */
body.tnl-pillar-fitness { overflow-x: clip; }
body.tnl-pillar-fitness .hero-section[data-type="type-1"] {
	position: relative;
	isolation: isolate;
	width: 100vw;
	max-width: 100vw;
	margin-top: calc(var(--theme-content-vertical-spacing, 60px) * -1); /* meets the site header */
	margin-left: calc(50% - 50vw);
	margin-right: 0;
	padding: 0 24px;
	background: var(--tnl-pine);
	overflow: hidden;
}
body.tnl-pillar-fitness .hero-section .entry-header {
	position: static;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 300px;
	max-width: 750px; /* the same width as the other pillar headers */
	margin: 0 auto;
	padding: 72px 0 52px;
}
.tnl-dept-hero { position: absolute; inset: 0; z-index: -1; margin: 0; background: var(--tnl-pine); }
.tnl-dept-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.tnl-dept-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--tnl-shade), .76) 0%, rgba(var(--tnl-shade), .84) 50%, rgba(var(--tnl-shade), .92) 100%); } /* eyebrow ≥4.5:1 at its worst pixel */
.tnl-dept-hero__cap { position: absolute; right: 14px; bottom: 10px; z-index: 1; margin: 0; font-family: var(--tnl-text); font-size: 12px; line-height: 1.3; color: var(--tnl-on-dark); }
body.tnl-pillar-fitness .tnl-dept-eyebrow { color: var(--tnl-mango); }
body.tnl-pillar.tnl-pillar-fitness .hero-section .page-title { font-size: 44px; color: var(--tnl-white); }

/* ---------- Hub modules (spec §4.2–4.6) ---------- */
/* Start with your question: three numbered cards */
.entry-content .tnl-article .tnl-questions { margin-top: 2em; }
.entry-content .tnl-article .tnl-questions__title { margin: 0 0 14px; font-size: 24px; }
.tnl-questions__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0 !important; list-style: none; }
.entry-content .tnl-article .tnl-questions__list li + li { margin-top: 0; }
.tnl-q { margin: 0; }
.entry-content .tnl-article a.tnl-q__link {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	padding: 16px 16px 14px;
	border: 1px solid var(--tnl-line);
	border-top: 4px solid var(--tnl-accent, var(--tnl-pine));
	border-radius: 14px;
	background: var(--tnl-white);
	color: var(--tnl-pine);
	text-decoration: none;
}
.tnl-q__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--tnl-accent-soft, var(--tnl-powder-2)); font-family: var(--tnl-text); font-size: 14px; font-weight: 700; line-height: 1; color: var(--tnl-pine); }
.tnl-q__text { font-family: var(--tnl-display); font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--tnl-pine); }
.tnl-q__go { margin-top: auto; font-family: var(--tnl-text); font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--tnl-lagoon-deep); }
.entry-content .tnl-article a.tnl-q__link:hover .tnl-q__go { text-decoration: underline; text-underline-offset: 3px; }
.entry-content .tnl-article a.tnl-q__link:focus-visible { outline: 3px solid var(--tnl-lagoon-deep); outline-offset: 3px; }

/* All guides in [department]: automatic list, then the planned topics as plain text */
.entry-content .tnl-dg { margin-top: 2em; }
.entry-content .tnl-article .tnl-dg__head { margin-top: 0; }
.tnl-dg__list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0 !important; list-style: none; }
.entry-content .tnl-article .tnl-dg__list li + li { margin-top: 0; }
.tnl-dg__item { margin: 0; }
.entry-content .tnl-article a.tnl-dg__link {
	display: grid;
	gap: 4px;
	padding: 14px 18px;
	border: 1px solid var(--tnl-line);
	border-left: 4px solid var(--tnl-accent, var(--tnl-pine));
	border-radius: 14px;
	background: var(--tnl-white);
	text-decoration: none;
}
.tnl-dg__title { font-family: var(--tnl-display); font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--tnl-pine); }
.tnl-dg__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-family: var(--tnl-text); font-size: 15px; line-height: 1.5; color: var(--tnl-rock); }
.tnl-dg__date { font-family: var(--tnl-text); font-size: 13px; line-height: 1.4; color: var(--tnl-muted); }
.entry-content .tnl-article a.tnl-dg__link:hover .tnl-dg__title { text-decoration: underline; text-decoration-color: var(--tnl-lagoon); text-underline-offset: 4px; }
.entry-content .tnl-article a.tnl-dg__link:focus-visible { outline: 3px solid var(--tnl-lagoon-deep); outline-offset: 3px; }
.tnl-dg__planned { margin-top: 14px; padding: 14px 18px; border-radius: 14px; background: var(--tnl-powder-2); }
.entry-content .tnl-article .tnl-dg__planned-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--tnl-pine); }
.entry-content .tnl-article .tnl-dg__planned ul { margin: 6px 0 0; }
.entry-content .tnl-article .tnl-dg__planned li { font-size: 15px; line-height: 1.5; color: var(--tnl-rock); }

/* Tool callout */
.entry-content .tnl-article .tnl-tool { margin-top: 1.6em; padding: 18px 20px; border-radius: 16px; background: var(--tnl-accent-soft, var(--tnl-powder-2)); }
.entry-content .tnl-article .tnl-tool > * + * { margin-top: .5em; }
.entry-content .tnl-article .tnl-tool__label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2.6px; line-height: 1.4; text-transform: uppercase; color: var(--tnl-pine); }
.entry-content .tnl-article .tnl-tool__title { font-family: var(--tnl-display); font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--tnl-pine); }
.entry-content .tnl-article .tnl-tool__text, .entry-content .tnl-article .tnl-tool__note { font-size: 16px; line-height: 1.55; }
.entry-content .tnl-article .tnl-tool__note { font-size: 14px; color: var(--tnl-muted); }
.tnl-tool__rooms, .tnl-tool__pair { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; list-style: none; }
.entry-content .tnl-article .tnl-tool__rooms li + li, .entry-content .tnl-article .tnl-tool__pair li + li { margin-top: 0; }
.entry-content .tnl-article .tnl-tool__rooms a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--tnl-lagoon-deep);
	border-radius: 999px;
	background: var(--tnl-white);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.tnl-tool__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-content .tnl-article .tnl-tool__pair a { display: grid; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 12px; background: var(--tnl-white); text-decoration: none; }
.entry-content .tnl-article .tnl-tool__pair .tnl-tool__text { font-size: 15px; color: var(--tnl-rock); }

/* The department newsletter invite sits under the article */
body.tnl-pillar .entry-content > .tnl-newsletter { margin-top: 64px !important; }

/* ---------- Components (spec §2, §5): one shape everywhere, the department sets the accent ---------- */
.entry-content .tnl-article .tnl-rule { padding: 18px 20px; border: 1px solid var(--tnl-line); border-left: 4px solid var(--tnl-lagoon-deep); border-radius: 12px; background: var(--tnl-white); }
.entry-content .tnl-article .tnl-rule > * + * { margin-top: 0; }
.entry-content .tnl-article .tnl-rule__label { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 2.6px; text-transform: uppercase; color: var(--tnl-lagoon-deep); }
.entry-content .tnl-article .tnl-rule__row { padding: 8px 0; border-top: 1px solid var(--tnl-line); font-size: 16px; line-height: 1.55; }
.entry-content .tnl-article .tnl-coach { padding: 18px 20px; border-radius: 16px; background: var(--tnl-pine); color: var(--tnl-on-dark); }
.entry-content .tnl-article .tnl-coach > * + * { margin-top: .5em; }
.entry-content .tnl-article .tnl-coach__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: var(--tnl-mango); }
.entry-content .tnl-article .tnl-coach a { color: var(--tnl-lagoon-light); }
.entry-content .tnl-article .tnl-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.entry-content .tnl-article .tnl-fit > * + * { margin-top: 0; }
.entry-content .tnl-article .tnl-fit__col { padding: 14px 16px; border-radius: 16px; background: var(--tnl-powder-2); }
.entry-content .tnl-article .tnl-fit__col--good { background: var(--tnl-lagoon-tint); }
.entry-content .tnl-article .tnl-fit__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--tnl-pine); }
.entry-content .tnl-article .tnl-fit ul { margin-top: 6px; }
.entry-content .tnl-article .tnl-callout--own { border-left: 4px solid var(--tnl-accent, var(--tnl-pine)); }
.entry-content .tnl-article .tnl-callout--own .tnl-callout__label { display: flex; align-items: center; gap: 8px; color: var(--tnl-pine); }
.entry-content .tnl-article .tnl-callout--own .tnl-callout__label::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Category archives: the department accent on the "Start with" card ---------- */
body.tnl-dept.category .tnl-start-card { border-left-color: var(--tnl-accent); }

@media (max-width: 999px) {
	.tnl-questions__list { grid-template-columns: 1fr; }
	.entry-content .tnl-article a.tnl-q__link { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; }
	.tnl-q__text { flex: 1 1 0; min-width: 0; font-size: 17px; }
	.tnl-q__go { flex-basis: 100%; margin-top: 0; padding-left: 40px; }
}
@media (max-width: 689px) {
	.tnl-strip { padding: 8px 12px; font-size: 12px; }
	.tnl-crumbs ol { font-size: 13px; }
	.tnl-crumbs [aria-current] { display: none; }
	body.tnl-pillar .hero-section .entry-header { padding-top: 20px; padding-bottom: 18px; }
	body.tnl-pillar.tnl-dept .hero-section .page-title { font-size: 28px; }
	body.tnl-pillar-living .hero-section[data-type="type-1"] { padding: 0 16px; }
	body.tnl-pillar-fitness .hero-section[data-type="type-1"] { padding: 0 16px; }
	body.tnl-pillar-fitness .hero-section .entry-header { min-height: 0; padding: 34px 0 30px; }
	body.tnl-pillar.tnl-pillar-fitness .hero-section .page-title { font-size: 23px; line-height: 1.08; }
	body.tnl-pillar-fitness .tnl-dept-eyebrow { margin-bottom: 8px; }
	.tnl-dept-hero__cap { right: 10px; bottom: 6px; font-size: 11px; }
	.entry-content .tnl-article .tnl-questions__title { font-size: 21px; }
	.tnl-tool__pair, .entry-content .tnl-article .tnl-fit { grid-template-columns: 1fr; }
}
