/*
Theme Name: The Research Ledger
Description: Editorial theme for a bilingual (EN/RU) publication about digital technology: ruled-ledger layout, numbered entries, four topic sections, About and Contacts templates with a built-in contact form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theresearchledger
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--paper: #f5f2ea;
	--paper-2: #ece6d8;
	--card: #fffdf8;
	--ink: #16201c;
	--ink-2: #46514b;
	--ink-3: #78817c;
	--rule: #d9d1bf;
	--rule-soft: #e6dfcf;
	--green: #17322a;
	--green-2: #1f5e46;
	--mint: #7fd3a8;
	--red: #c8452f;

	--t-ai-data: #3f4fb8;
	--t-software: #1f7a55;
	--t-security: #b5432c;
	--t-devices: #a87310;
	--t-none: #46514b;

	--serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
	--sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--wrap: 1200px;
	--gutter: 28px;
	--radius: 10px;
	--line: 32px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.65 var(--sans);
	-webkit-font-smoothing: antialiased;
}
#main-content { flex: 1 0 auto; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }

.tl-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.tl-mono { font-family: var(--mono); }
.tl-sr, .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tl-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 6px; }
.tl-skip:focus { left: 12px; }
.tl-narrow { max-width: 560px; margin: 24px auto; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.tl-topbar { background: var(--green); color: #d9e4dc; font: 500 12.5px/1 var(--mono); letter-spacing: .02em; }
.tl-topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 38px; }
.tl-topbar__count { margin-left: auto; color: #a9bcb1; }
.tl-topbar__count b { color: var(--mint); font-weight: 500; }

.tl-lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; overflow: hidden; }
.tl-lang__item { padding: 5px 10px; text-decoration: none; color: inherit; font: 500 12px/1 var(--mono); }
.tl-lang__item:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tl-lang__item.is-current { background: var(--mint); color: var(--green); }

/* ==========================================================================
   Header
   ========================================================================== */
.tl-header { background: var(--paper); border-bottom: 1px solid var(--ink); position: relative; z-index: 20; }
.tl-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; border-bottom: 1px solid var(--rule); }
.tl-header__inner { display: flex; align-items: center; gap: 28px; min-height: 84px; }

.tl-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.tl-brand:hover { color: var(--ink); }
.tl-mark { width: 44px; height: 44px; flex-shrink: 0; }
.tl-brand__word { display: flex; flex-direction: column; line-height: 1; }
.tl-brand__the { font: 500 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.tl-brand__name { font: 700 22px/1 var(--serif); letter-spacing: -.015em; }
.tl-brand__custom { max-height: 56px; width: auto; }
.tl-brand--light { color: #fff; }
.tl-brand--light:hover { color: #fff; }
.tl-brand--light .tl-brand__the { color: #9fb3a8; }
.tl-brand--light .tl-mark rect { fill: #0f241e; stroke: rgba(255, 255, 255, .22); stroke-width: 1; }

.tl-nav { margin-left: auto; }
.tl-menu { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.tl-menu a {
	display: block; padding: 8px 12px; border-radius: 6px;
	font: 500 15px/1.2 var(--sans); text-decoration: none; color: var(--ink-2);
}
.tl-menu a:hover { color: var(--ink); background: var(--paper-2); }
.tl-menu .current-menu-item > a, .tl-menu .current_page_item > a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }

.tl-header__tools { display: flex; align-items: center; gap: 6px; }
.tl-icon-btn {
	width: 42px; height: 42px; display: inline-grid; place-items: center;
	border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink);
}
.tl-icon-btn:hover { border-color: var(--ink-3); }
.tl-icon-btn svg { width: 19px; height: 19px; }
.tl-burger { display: none; gap: 4px; align-content: center; }
.tl-burger > span:not(.tl-sr) { display: block; width: 18px; height: 1.8px; background: currentColor; border-radius: 2px; }

.tl-search { border-top: 1px solid var(--rule); background: var(--card); padding: 18px 0; }
.tl-searchform { display: flex; gap: 8px; }
.tl-searchform input[type="search"] {
	flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: #fff;
}
.tl-searchform input[type="search"]:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31, 94, 70, .14); }
.tl-searchform button {
	padding: 0 20px; border: 0; border-radius: 8px; background: var(--green); color: #fff; font-weight: 600;
}
.tl-searchform button:hover { background: var(--green-2); }

/* ==========================================================================
   Shared bits
   ========================================================================== */
.tl-eyebrow {
	display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
	font: 500 12.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green-2);
}
.tl-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); flex-shrink: 0; }

.tl-label {
	display: inline-flex; align-items: center; gap: 6px;
	font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
	color: var(--t-none);
}
.tl-label::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.tl-label:hover { text-decoration: underline; }
.tl-topic-text--ai-data { color: var(--t-ai-data); }
.tl-topic-text--software { color: var(--t-software); }
.tl-topic-text--security { color: var(--t-security); }
.tl-topic-text--devices { color: var(--t-devices); }

.tl-topic--ai-data { --t: var(--t-ai-data); }
.tl-topic--software { --t: var(--t-software); }
.tl-topic--security { --t: var(--t-security); }
.tl-topic--devices { --t: var(--t-devices); }
.tl-topic--none { --t: var(--t-none); }
.tl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--t, var(--ink-3)); margin-right: 9px; vertical-align: 1px; }

.tl-meta { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font: 400 13px/1.3 var(--mono); color: var(--ink-3); }

.tl-btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px;
	border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff;
	font: 600 15px/1.1 var(--sans); text-decoration: none; transition: background .15s, transform .15s;
}
.tl-btn:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; transform: translateY(-1px); }
.tl-btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.tl-btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tl-btn--light { background: var(--paper); color: var(--green); border-color: var(--paper); }
.tl-btn--light:hover { background: #fff; color: var(--green); border-color: #fff; }

.tl-more { font: 500 14px/1.2 var(--mono); color: var(--green-2); text-decoration: none; white-space: nowrap; }
.tl-more:hover { text-decoration: underline; }

.tl-section { padding: 64px 0; }
.tl-section.tl-wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.tl-section--tight { padding-top: 24px; }
.tl-section--tinted { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tl-section__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	padding-bottom: 14px; margin-bottom: 8px; border-bottom: 2px solid var(--ink);
}
.tl-section__title { font-size: 30px; margin: 0; }

/* ==========================================================================
   Thumbnails & placeholders
   ========================================================================== */
.tl-thumb { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 16 / 10; text-decoration: none; }
.tl-thumb__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a.tl-thumb:hover .tl-thumb__img { transform: scale(1.03); }
.tl-thumb__blank {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18px;
	color: var(--t);
	background:
		linear-gradient(90deg, transparent 38px, color-mix(in srgb, var(--red) 55%, transparent) 38px, color-mix(in srgb, var(--red) 55%, transparent) 39.5px, transparent 39.5px),
		repeating-linear-gradient(180deg, transparent 0 21px, color-mix(in srgb, var(--t) 18%, transparent) 21px 22px),
		color-mix(in srgb, var(--t) 7%, var(--card));
}
.tl-thumb__icon { width: 46px; height: 46px; margin-left: 34px; padding: 9px; border-radius: 10px; background: var(--card); box-shadow: 0 1px 0 var(--rule); }
.tl-thumb__icon svg { width: 100%; height: 100%; }
.tl-thumb__code { margin-left: 34px; font: 500 12px/1 var(--mono); letter-spacing: .16em; }

/* ==========================================================================
   Hero
   ========================================================================== */
.tl-hero {
	position: relative; padding: 72px 0 80px; border-bottom: 1px solid var(--rule);
	background:
		repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule-soft) calc(var(--line) - 1px) var(--line)),
		var(--paper);
}
.tl-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 64px; align-items: center; }
.tl-hero__text { position: relative; padding-left: 36px; }
.tl-hero__text::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--red); opacity: .8; }
.tl-hero__title { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.08; font-weight: 700; margin-bottom: 22px; letter-spacing: -.02em; }
.tl-hero__lead { font-size: 19px; color: var(--ink-2); max-width: 600px; margin-bottom: 30px; }
.tl-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tl-index {
	background: var(--card); border: 1px solid var(--ink); border-radius: 4px;
	box-shadow: 8px 8px 0 var(--green); padding: 20px 22px 16px;
}
.tl-index__head {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding-bottom: 12px; border-bottom: 2px solid var(--ink);
	font: 500 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.tl-index__stamp { color: var(--red); border: 1px solid currentColor; padding: 4px 7px; border-radius: 3px; letter-spacing: .06em; }
.tl-index__table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tl-index__table th { padding: 12px 0 8px; text-align: left; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.tl-index__table td { padding: 11px 0; border-top: 1px dashed var(--rule); }
.tl-index__table td:first-child { width: 48px; color: var(--ink-3); font-size: 13px; }
.tl-index__table td a { text-decoration: none; font-weight: 500; }
.tl-index__table td a:hover { color: var(--green-2); text-decoration: underline; }
.tl-index__table tfoot td { border-top: 2px solid var(--ink); font-weight: 600; padding-top: 12px; }
.tl-num { text-align: right !important; }
.tl-index__note { margin: 12px 0 0; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }

/* ==========================================================================
   Feature
   ========================================================================== */
.tl-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.tl-feature__media { aspect-ratio: 16 / 9; }
.tl-feature__title { font-size: clamp(26px, 3vw, 38px); margin: 14px 0 14px; }
.tl-feature__title a { text-decoration: none; }
.tl-feature__title a:hover { color: var(--green-2); }
.tl-feature__excerpt { color: var(--ink-2); font-size: 17.5px; }

/* ==========================================================================
   Ledger rows
   ========================================================================== */
.tl-rows { display: flex; flex-direction: column; }
.tl-row {
	display: grid; grid-template-columns: 64px minmax(0, 1fr) 220px; gap: 28px; align-items: start;
	padding: 28px 0; border-bottom: 1px solid var(--rule);
}
.tl-row__no { font: 500 30px/1 var(--mono); color: var(--rule); padding-top: 2px; transition: color .2s; }
.tl-row:hover .tl-row__no { color: var(--red); }
.tl-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.tl-row__title { font-size: 24px; margin-bottom: 8px; }
.tl-row__title a { text-decoration: none; }
.tl-row__title a:hover { color: var(--green-2); }
.tl-row__excerpt { color: var(--ink-2); margin-bottom: 10px; }
.tl-row__thumb { aspect-ratio: 7 / 5; }

/* ==========================================================================
   Card grid
   ========================================================================== */
.tl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 28px; padding-top: 24px; }
.tl-card { display: flex; flex-direction: column; gap: 16px; }
.tl-card__body { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.tl-card__title { font-size: 21px; margin: 0; }
.tl-card__title a { text-decoration: none; }
.tl-card__title a:hover { color: var(--green-2); }
.tl-card__excerpt { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.tl-card .tl-meta { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rule); }

/* ==========================================================================
   Topics
   ========================================================================== */
.tl-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 24px; }
.tl-topic {
	position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 18px;
	background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--t); border-radius: 6px;
	text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s;
}
.tl-topic:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(22, 32, 28, .35); }
.tl-topic__head { display: flex; justify-content: space-between; align-items: center; }
.tl-topic__icon { width: 42px; height: 42px; padding: 8px; border-radius: 9px; color: var(--t); background: color-mix(in srgb, var(--t) 10%, transparent); }
.tl-topic__no { font: 500 13px/1 var(--mono); color: var(--ink-3); }
.tl-topic__name { font: 600 21px/1.2 var(--serif); margin-top: 6px; }
.tl-topic__desc { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.tl-topic__foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--rule); font: 500 12.5px/1 var(--mono); color: var(--t); }

/* ==========================================================================
   Principles
   ========================================================================== */
.tl-principles { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; }
.tl-principles__intro .tl-section__title { font-size: 32px; }
.tl-rules { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.tl-rule { padding: 22px 22px 6px 0; border-right: 1px solid var(--rule); }
.tl-rule + .tl-rule { padding-left: 22px; }
.tl-rule:last-child { border-right: 0; }
.tl-rule__no { display: block; font: 500 13px/1 var(--mono); color: var(--red); margin-bottom: 14px; }
.tl-rule__title { font-size: 20px; }
.tl-rule p { color: var(--ink-2); font-size: 15.5px; }

/* ==========================================================================
   Page heads, breadcrumbs, chips
   ========================================================================== */
.tl-crumbs { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; padding-bottom: 0; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.tl-crumbs a { color: var(--ink-2); text-decoration: none; }
.tl-crumbs a:hover { color: var(--green-2); text-decoration: underline; }
.tl-crumbs__current { color: var(--ink-3); }

.tl-pagehead { position: relative; display: flex; gap: 24px; align-items: flex-start; padding-top: 34px; padding-bottom: 30px; margin-bottom: 8px; }
.tl-pagehead::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 2px solid var(--t, var(--ink)); }
.tl-pagehead__title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; margin-bottom: 12px; }
.tl-pagehead__lead { color: var(--ink-2); font-size: 18px; max-width: 720px; margin: 0; }
.tl-pagehead__lead p { margin: 0; }
.tl-pagehead__icon { width: 64px; height: 64px; padding: 13px; border-radius: 12px; flex-shrink: 0; color: var(--t); background: color-mix(in srgb, var(--t) 11%, var(--card)); border: 1px solid color-mix(in srgb, var(--t) 30%, transparent); }

.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.tl-chip { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; text-decoration: none; }
.tl-chip:hover { border-color: var(--ink-3); color: var(--ink); }

/* ==========================================================================
   Article
   ========================================================================== */
.tl-article__head { max-width: 860px; padding-top: 30px; padding-bottom: 8px; }
.tl-article__meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; }
.tl-article__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.tl-article__lead { font-size: 21px; line-height: 1.55; color: var(--ink-2); font-family: var(--serif); font-style: italic; font-weight: 500; }

.tl-stamp { display: flex; flex-wrap: wrap; gap: 0; margin: 24px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.tl-stamp > div { padding: 12px 22px 12px 0; margin-right: 22px; border-right: 1px dashed var(--rule); }
.tl-stamp > div:last-child { border-right: 0; }
.tl-stamp dt { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.tl-stamp dd { margin: 0; font-weight: 500; }
.tl-stamp--stack { flex-direction: column; }
.tl-stamp--stack > div { border-right: 0; margin: 0; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.tl-stamp--stack > div:last-child { border-bottom: 0; }

.tl-article__figure { max-width: 1060px; margin: 30px auto 0; }
.tl-article__figure img { width: 100%; border-radius: var(--radius); }
.tl-article__figure figcaption { margin-top: 10px; font: 400 13px/1.5 var(--mono); color: var(--ink-3); }

.tl-prose { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.tl-prose--flush { padding: 0; margin: 0; }
.tl-article__content { padding-top: 36px; padding-bottom: 40px; font-size: 18.5px; line-height: 1.75; }
.tl-page-content { padding-top: 36px; padding-bottom: 64px; }
.tl-prose h2 { font-size: 30px; margin: 1.7em 0 .6em; }
.tl-prose h3 { font-size: 23px; margin: 1.5em 0 .5em; }
.tl-prose a { color: var(--green-2); text-decoration-color: color-mix(in srgb, var(--green-2) 45%, transparent); }
.tl-prose ul, .tl-prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.tl-prose li { margin-bottom: .45em; }
.tl-prose ul li::marker { color: var(--red); }
.tl-prose ol li::marker { font-family: var(--mono); color: var(--red); }
.tl-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--red); font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink-2); }
.tl-prose img { border-radius: 8px; }
.tl-prose figure { margin: 1.8em 0; }
.tl-prose figcaption { font: 400 13px/1.5 var(--mono); color: var(--ink-3); margin-top: 8px; }
.tl-prose code { font: 400 .88em/1 var(--mono); background: var(--paper-2); padding: .15em .4em; border-radius: 4px; }
.tl-prose pre { overflow: auto; background: var(--green); color: #e6efe9; padding: 18px 20px; border-radius: 8px; font: 400 14.5px/1.6 var(--mono); }
.tl-prose pre code { background: none; padding: 0; color: inherit; }
.tl-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; display: block; overflow-x: auto; }
.tl-prose th, .tl-prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.tl-prose th { font: 500 12.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--ink); }
.tl-prose hr { border: 0; border-top: 1px dashed var(--rule); margin: 2.4em 0; }
.tl-prose .alignwide, .tl-prose .alignfull { max-width: none; }

.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 48px; }
.tl-tags a { font: 400 13px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--ink-2); }
.tl-tags a:hover { border-color: var(--ink-3); }

/* ==========================================================================
   About
   ========================================================================== */
.tl-about-hero {
	padding: 48px 0 64px; border-bottom: 1px solid var(--rule);
	background: repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule-soft) calc(var(--line) - 1px) var(--line)), var(--paper);
}
.tl-about-hero__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 56px; align-items: center; }
.tl-about-card { background: var(--green); color: #e2ebe5; border-radius: 6px; padding: 28px; box-shadow: 8px 8px 0 var(--red); }
.tl-about-card .tl-mark { width: 64px; height: 64px; margin-bottom: 20px; }
.tl-about-card .tl-mark rect { fill: #0f241e; }
.tl-about-card dl { margin: 0; }
.tl-about-card dl > div { padding: 12px 0; border-top: 1px dashed rgba(255, 255, 255, .2); }
.tl-about-card dt { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mint); margin-bottom: 6px; }
.tl-about-card dd { margin: 0; font-size: 16px; }

.tl-mission { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; }
.tl-mission .tl-prose { font-size: 18.5px; color: var(--ink-2); }
.tl-mission .tl-prose p:first-child::first-letter { font: 700 3.3em/.8 var(--serif); float: left; margin: 6px 10px 0 0; color: var(--green); }

.tl-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 40px 44px;
	background: var(--green); color: #dbe6df; border-radius: 8px;
	background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, .05) 31px 32px);
}
.tl-cta__title { color: #fff; font-size: 30px; }
.tl-cta p { margin: 0; }

/* ==========================================================================
   Contacts
   ========================================================================== */
.tl-contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 18px; }
.tl-form { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 30px; }
.tl-form p { margin: 0; }
.tl-form__row { margin-bottom: 18px !important; }
.tl-form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.tl-form label { display: block; margin-bottom: 7px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tl-form input[type="text"], .tl-form input[type="email"], .tl-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; font-size: 16px;
}
.tl-form textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.tl-form input:focus, .tl-form textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31, 94, 70, .14); }
.tl-form .tl-btn { border: 0; }
.tl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tl-notice { padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.tl-notice--ok { background: #e6f4ec; border-color: #9fd1b5; color: #1d5a3e; }
.tl-notice--error { background: #fbebe7; border-color: #e8b3a6; color: #8a2f1d; }

.tl-desk { background: var(--paper-2); border: 1px solid var(--rule); border-top: 4px solid var(--red); border-radius: 6px; padding: 26px; }
.tl-desk__title { font-size: 22px; }
.tl-desk__list { list-style: none; margin-bottom: 18px; }
.tl-desk__list li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px dashed var(--rule); color: var(--ink-2); }
.tl-desk__list li::before { content: "✓"; position: absolute; left: 2px; top: 9px; color: var(--green-2); font-weight: 700; }
.tl-desk .tl-stamp { margin-top: 0; border-top: 0; border-bottom: 0; }
.tl-desk a { color: var(--green-2); word-break: break-all; }

/* ==========================================================================
   Empty, 404, pagination, comments
   ========================================================================== */
.tl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 20px; color: var(--ink-3); }
.tl-empty svg { width: 64px; height: 64px; }
.tl-empty p { margin: 0; font-family: var(--mono); font-size: 14.5px; }

.tl-404 { text-align: center; padding-top: 80px; padding-bottom: 96px; }
.tl-404__code { font: 500 110px/1 var(--mono); color: var(--rule); margin: 0 0 10px; }
.tl-404 .tl-pagehead__lead { margin: 0 auto; }

.tl-pagination { margin-top: 48px; }
.tl-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tl-pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center;
	border: 1px solid var(--rule); border-radius: 6px; background: var(--card);
	font: 500 14px/1 var(--mono); text-decoration: none;
}
.tl-pagination .page-numbers:hover { border-color: var(--ink-3); }
.tl-pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
.tl-pagination .page-numbers.dots { border: 0; background: none; }

.tl-comments-wrap { padding-bottom: 64px; }
.tl-comments { border-top: 2px solid var(--ink); padding-top: 26px; }
.tl-comment-list { list-style: none; margin: 18px 0 30px; }
.tl-comment-list .comment-body { padding: 16px 0; border-bottom: 1px dashed var(--rule); }
.tl-comment-list .children { list-style: none; padding-left: 26px; }
.comment-meta { font: 400 13px/1.4 var(--mono); color: var(--ink-3); margin-bottom: 6px; }
.comment-meta a { text-decoration: none; }
.comment-form label { display: block; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; color: var(--ink-2); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 11px 13px; border: 1px solid var(--rule); border-radius: 6px; background: #fff;
}
.comment-form .submit { padding: 12px 22px; border: 0; border-radius: 8px; background: var(--green); color: #fff; font-weight: 600; }
.comment-form .submit:hover { background: var(--green-2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.tl-footer { background: var(--green); color: #b8c9be; margin-top: auto; }
.tl-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 56px; padding-bottom: 44px; }
.tl-footer__about p { margin: 18px 0 0; max-width: 340px; font-size: 15px; }
.tl-footer__head { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mint); margin: 6px 0 16px; }
.tl-footer-menu { list-style: none; }
.tl-footer-menu li { margin-bottom: 9px; }
.tl-footer-menu a { color: #dfe8e2; text-decoration: none; font-size: 15px; }
.tl-footer-menu a:hover { color: #fff; text-decoration: underline; }
.tl-social { display: flex; gap: 8px; margin-bottom: 18px; }
.tl-social a { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; color: #dfe8e2; }
.tl-social a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tl-social svg { width: 17px; height: 17px; }
.tl-footer .tl-lang { color: #dfe8e2; }
.tl-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.tl-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 18px; padding-bottom: 22px; font-size: 13.5px; }
.tl-footer__bottom .tl-mono { font-size: 12.5px; color: #8fa699; }

/* ==========================================================================
   WordPress core classes
   ========================================================================== */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font: 400 13px/1.5 var(--mono); color: var(--ink-3); }
.sticky .tl-card__title::after, .sticky .tl-row__title::after { content: " ★"; color: var(--red); font-size: .7em; vertical-align: middle; }
.bypostauthor { display: block; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.tl-menu a { padding: 8px 9px; font-size: 14.5px; }
	.tl-header__inner { gap: 18px; }
}

@media (max-width: 1024px) {
	.tl-burger { display: inline-grid; }
	.tl-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0;
		background: var(--card); border-bottom: 1px solid var(--ink); box-shadow: 0 16px 30px -18px rgba(22, 32, 28, .4);
	}
	.tl-nav.is-open { display: block; }
	.tl-menu { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
	.tl-menu a { padding: 13px 4px; border-bottom: 1px dashed var(--rule); border-radius: 0; font-size: 16px; }
	.tl-menu .current-menu-item > a { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
	.tl-header__tools { margin-left: auto; }

	.tl-hero__grid, .tl-about-hero__grid { grid-template-columns: 1fr; gap: 44px; }
	.tl-index { max-width: 520px; }
	.tl-feature { grid-template-columns: 1fr; gap: 24px; }
	.tl-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tl-principles, .tl-mission { grid-template-columns: 1fr; gap: 20px; }
	.tl-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tl-footer__about { grid-column: 1 / -1; }
	.tl-contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
	:root { --gutter: 16px; }
	body { font-size: 16px; }
	.tl-topbar__inner { gap: 12px; }
	.tl-topbar__date { display: none; }
	.tl-topbar__count { margin-left: 0; margin-right: auto; }
	.tl-header__inner { min-height: 70px; }
	.tl-mark { width: 38px; height: 38px; }
	.tl-brand__name { font-size: 19px; }
	.tl-brand__the { font-size: 10px; }

	.tl-hero { padding: 44px 0 52px; }
	.tl-hero__text { padding-left: 18px; }
	.tl-hero__lead { font-size: 17px; }
	.tl-index { box-shadow: 5px 5px 0 var(--green); }

	.tl-section { padding: 44px 0; }
	.tl-section--tight { padding-top: 16px; }
	.tl-section__title { font-size: 25px; }

	.tl-row { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 22px 0; }
	.tl-row__no { font-size: 20px; }
	.tl-row__thumb { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 16 / 9; }
	.tl-row__no { grid-column: 1; grid-row: 2; }
	.tl-row__body { grid-column: 2; grid-row: 2; }
	.tl-row__title { font-size: 21px; }

	.tl-grid, .tl-topics { grid-template-columns: 1fr; }
	.tl-rules { grid-template-columns: 1fr; }
	.tl-rule, .tl-rule + .tl-rule { padding: 18px 0 4px; border-right: 0; border-bottom: 1px solid var(--rule); }
	.tl-rule:last-child { border-bottom: 0; }

	.tl-pagehead { flex-direction: column; gap: 16px; padding-top: 22px; }
	.tl-pagehead__icon { width: 52px; height: 52px; padding: 10px; }
	.tl-pagehead__lead { font-size: 16.5px; }
	.tl-article__lead { font-size: 18.5px; }
	.tl-article__content { font-size: 17px; }
	.tl-stamp > div { padding-right: 14px; margin-right: 14px; }

	.tl-cta { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
	.tl-cta__title { font-size: 25px; }
	.tl-form { padding: 20px; }
	.tl-form__row--2 { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
	.tl-form__row--2 p { margin-bottom: 18px; }
	.tl-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 44px; }
	.tl-404__code { font-size: 80px; }
}

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