/*
Theme Name: torus.dev Blog
Theme URI: https://torus.dev/
Author: torus
Description: The torus.dev engineering blog. Dark mono header with a Topics dropdown and live search, typewriter hero, featured cards, latest list with "See more", a Developer Notes band, colour-coded category sections, category and author pages, and articles with a numbered table of contents, reading progress and share buttons. Menus, links, labels and every heading size are editable under Appearance > Customize > torus.dev.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
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: torus
Tags: blog, two-columns, custom-menu, custom-logo, featured-images, sticky-post, threaded-comments, translation-ready
*/

/* ---------- Fonts (bundled, OFL) ---------- */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
	--t-ink: oklch(0.15 0.005 90);
	--t-text: oklch(0.18 0.01 90);
	--t-paper: oklch(0.99 0.002 90);
	--t-blue: #006AFF;
	--t-blue-h: #0057D1;
	--t-bright: #3D8BFF;
	--t-muted: oklch(0.5 0.01 90);
	--t-line: oklch(0.92 0.005 90);
	--t-line-2: oklch(0.88 0.005 90);
	--t-line-3: oklch(0.9 0.005 90);
	--t-ice: oklch(0.95 0.03 250);
	--t-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--t-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--t-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--t-pad: 48px;
	--t-logo-size: 18px;
	--t-nav-size: 13px;
	--t-sub-size: 13px;
	--t-mobile-nav-size: 15px;
	--t-top: var(--wp-admin--admin-bar--height, 0px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(100px + var(--t-top)); }
body { margin: 0; background: var(--t-paper); color: var(--t-text); font-family: var(--t-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--t-blue); text-decoration: none; display: inline-block; transition: color 250ms ease-in-out, transform 250ms ease-in-out; }
a:hover { color: var(--t-blue-h); }
::selection { background: var(--t-blue); color: #fff; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--t-bright); outline-offset: 2px; }
h1, h2, h3, h4 { text-wrap: pretty; }

.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.t-skip:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 12px; top: 12px; z-index: 2000; background: #fff; color: var(--t-text); padding: 10px 14px; font-family: var(--t-mono); font-size: 13px; }

.t-site { min-height: 100vh; display: flex; flex-direction: column; background: var(--t-paper); }
.t-main { flex: 1 0 auto; }

/* ---------- Header ---------- */
.t-header { background: var(--t-ink); padding: 20px var(--t-pad); display: flex; align-items: center; justify-content: space-between; position: sticky; top: var(--t-top); z-index: 50; }
.t-logo { font-family: var(--t-mono); font-weight: 600; font-size: var(--t-logo-size); color: #fff; letter-spacing: -0.02em; line-height: 1.3; }
.t-logo:hover { color: #fff; }
.t-logo__dot { color: var(--t-bright); }
.t-logo__img { display: block; max-height: 32px; width: auto; }
.t-logo--footer { font-size: 16px; }

.t-nav { display: flex; align-items: center; gap: 36px; font-family: var(--t-mono); font-size: var(--t-nav-size); color: oklch(0.75 0.01 90); }
.t-menu { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.t-menu > li { position: relative; }
.t-menu > li > a { color: oklch(0.75 0.01 90); display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.t-menu > li > a:hover, .t-menu > li.is-open > a, .t-menu > li.current-menu-item > a, .t-menu > li.current-menu-ancestor > a { color: var(--t-bright); }
.t-chev { display: inline-block; transition: transform 200ms ease-in-out; }
.is-open > a .t-chev { transform: rotate(180deg); }
.t-ext { font-size: 0.95em; }
.t-menu .sub-menu { position: absolute; top: 28px; left: 0; background: #fff; min-width: 210px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.18); padding: 8px; border-radius: 4px; list-style: none; margin: 0; opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden; transition: opacity 150ms ease-in-out, transform 150ms ease-in-out, visibility 0s linear 150ms; z-index: 60; }
.t-menu .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.t-menu > li.is-open > .sub-menu { opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible; transition: opacity 150ms ease-in-out, transform 150ms ease-in-out, visibility 0s; }
.t-menu .sub-menu a { display: block; padding: 10px 12px; font-family: var(--t-mono); font-size: var(--t-sub-size); color: oklch(0.2 0.01 90); border-radius: 4px; transition: background 200ms ease-in-out; white-space: nowrap; }
.t-menu .sub-menu a:hover, .t-menu .sub-menu a:focus-visible { background: oklch(0.95 0.01 90); color: oklch(0.2 0.01 90); }
.t-menu .sub-menu .current-menu-item > a { color: var(--t-blue); }

/* Search popover */
.t-search { position: relative; display: flex; }
.t-search__btn { display: flex; color: #fff; opacity: 0.8; transition: color 250ms ease-in-out; }
.t-search__btn:hover, .t-search__btn[aria-expanded="true"] { color: var(--t-bright); }
.t-search__btn svg { display: block; }
.t-search__pop { position: absolute; top: 28px; right: 0; background: #fff; width: 320px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.18); padding: 12px; border-radius: 4px; z-index: 60; }
.t-search__pop[hidden] { display: none; }
.t-search__row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--t-line-2); padding-bottom: 8px; margin: 0; }
.t-search__input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--t-mono); font-size: 13px; color: oklch(0.2 0.01 90); padding: 0; -webkit-appearance: none; appearance: none; }
.t-search__input::-webkit-search-cancel-button { display: none; }
.t-search__close { color: oklch(0.5 0.01 90); font-size: 16px; line-height: 1; }
.t-search__close:hover { color: var(--t-blue); }
.t-search__results { margin-top: 8px; max-height: 240px; overflow: auto; }
.t-sr { display: block; padding: 8px 6px; font-family: var(--t-sans); font-size: 14px; border-radius: 4px; color: oklch(0.2 0.01 90); transition: background 200ms ease-in-out; }
.t-sr:hover, .t-sr.is-active { background: oklch(0.95 0.01 90); color: oklch(0.2 0.01 90); }
.t-sr-empty { padding: 8px 6px; font-size: 13px; color: oklch(0.5 0.01 90); font-family: var(--t-mono); }

/* Hamburger + mobile menu */
.t-burger { display: none; width: 32px; height: 32px; align-items: center; justify-content: center; color: #fff; font-size: 22px; line-height: 1; }
.t-burger__close { display: none; }
.t-burger[aria-expanded="true"] .t-burger__open { display: none; }
.t-burger[aria-expanded="true"] .t-burger__close { display: inline; }
.t-mobile { background: var(--t-ink); border-top: 1px solid oklch(0.25 0.005 90); padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--t-top) + 60px); z-index: 49; max-height: calc(100vh - 60px - var(--t-top)); overflow: auto; }
.t-mobile[hidden] { display: none; }
.t-msearch { display: flex; align-items: center; gap: 8px; background: oklch(0.2 0.005 90); border-radius: 6px; padding: 10px 12px; margin: 0 0 10px; color: #fff; }
.t-msearch svg { opacity: 0.6; min-width: 16px; }
.t-msearch input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--t-mono); font-size: 14px; color: #fff; padding: 0; -webkit-appearance: none; appearance: none; }
.t-msearch input::placeholder { color: oklch(0.6 0.01 90); }
.t-msearch input::-webkit-search-cancel-button { display: none; }
.t-msearch__results:empty { display: none; }
.t-msearch__results .t-sr { padding: 10px 8px; color: #fff; }
.t-msearch__results .t-sr:hover, .t-msearch__results .t-sr.is-active { background: oklch(0.22 0.005 90); color: #fff; }
.t-msearch__results .t-sr-empty { padding: 10px 8px; color: oklch(0.6 0.01 90); }
.t-mmenu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.t-mmenu > li > a { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; color: #fff; font-family: var(--t-mono); font-size: var(--t-mobile-nav-size); border-top: 1px solid oklch(0.25 0.005 90); width: 100%; }
.t-mmenu > li > a:hover { color: var(--t-bright); }
.t-mmenu .sub-menu { list-style: none; display: none; flex-direction: column; padding: 0 0 0 12px; gap: 2px; margin: 0 0 4px; }
.t-mmenu > li.is-open > .sub-menu { display: flex; }
.t-mmenu .sub-menu a { display: block; padding: 10px 8px; color: oklch(0.75 0.01 90); font-family: var(--t-mono); font-size: calc(var(--t-mobile-nav-size) - 1px); }
.t-mmenu .sub-menu a:hover { color: #fff; }

/* ---------- Reveal on scroll ---------- */
.t-js [data-reveal-item] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--t-ease) var(--d, 0ms), transform 600ms var(--t-ease) var(--d, 0ms); }
.t-js .is-in [data-reveal-item], .t-js .t-nomotion [data-reveal-item], .t-nomotion [data-reveal-item] { opacity: 1; transform: none; }
.t-page-in { animation: t-page-in 500ms var(--t-ease) var(--d, 0ms) both; }
@keyframes t-page-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.t-js [data-reveal-item] { opacity: 1; transform: none; transition: none; }
	.t-page-in { animation: none; }
	*, *::before, *::after { scroll-behavior: auto !important; }
}

/* ---------- Shared pieces ---------- */
.t-wrap { max-width: 1160px; margin: 0 auto; }
.t-label { margin: 0; font-family: var(--t-mono); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-muted); }
.t-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.t-more, .t-seeall { font-family: var(--t-mono); font-size: 12px; color: var(--t-blue); cursor: pointer; transition: color 250ms ease-in-out, transform 250ms ease-in-out; white-space: nowrap; }
.t-more:hover, .t-seeall:hover { transform: scale(1.05); color: var(--t-blue-h); }
.t-more[disabled] { opacity: 0.6; cursor: progress; }
.t-tag { display: inline-block; margin: 0; background: var(--t-ink); color: #fff; font-family: var(--t-mono); font-size: 11px; font-weight: 400; line-height: normal; padding: 4px 9px; }
a.t-tag:hover { color: #fff; }
.t-tag--ink { font-size: 12px; padding: 5px 10px; }
.t-tag--lg { font-size: 12px; padding: 5px 10px; }
.t-tag--line { background: transparent; border: 1px solid oklch(0.45 0.01 90); }
.t-meta { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); margin-top: 6px; }
.t-meta--sm { font-size: 11px; margin-top: 5px; }
.t-meta__link { display: inline; color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.t-meta__link:hover { color: var(--t-blue); }
.t-empty { font-family: var(--t-mono); font-size: 13px; color: var(--t-muted); padding: 24px 0; margin: 0; }
.t-hit { cursor: pointer; }
.t-hit__link { color: inherit; display: inline; }
.t-hit__link:hover { color: inherit; }
.t-hit__link:focus-visible { outline: 2px solid var(--t-blue); outline-offset: 3px; }
.t-shift { transition: transform 280ms ease-in-out; min-width: 0; }

/* Striped placeholders */
.t-pat { --s: 8px; background: repeating-linear-gradient(135deg, oklch(0.93 0.01 90), oklch(0.93 0.01 90) var(--s), oklch(0.97 0.004 90) var(--s), oklch(0.97 0.004 90) calc(var(--s) * 2)); }
.t-pat--blue { background: repeating-linear-gradient(135deg, oklch(0.9 0.05 250), oklch(0.9 0.05 250) var(--s), oklch(0.95 0.02 250) var(--s), oklch(0.95 0.02 250) calc(var(--s) * 2)); }
.t-media { overflow: hidden; background: oklch(0.93 0.01 90); }
.t-media__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Home: hero ---------- */
.t-hero { background: var(--t-ink); padding: 64px var(--t-pad) 56px; }
.t-hero__title { margin: 0; font-weight: 700; letter-spacing: -0.02em; color: #fff; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; line-height: 1.15; }
.t-tw { border: 1px dashed oklch(0.45 0.01 90); padding: 2px 12px; font-size: 0.7em; color: oklch(0.65 0.19 290); font-family: var(--t-mono); font-weight: 700; letter-spacing: -0.02em; transition: color 200ms ease; white-space: nowrap; max-width: 100%; }
.t-tw__caret { opacity: 0.5; }
.t-hero__sub { margin: 14px 0 0; font-family: var(--t-mono); color: oklch(0.6 0.01 90); line-height: 1.5; }

/* Featured */
.t-featured { padding: 48px var(--t-pad) 8px; }
.t-featured .t-label { margin-bottom: 16px; }
.t-featured__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.t-feat { position: relative; border: 2px solid transparent; box-shadow: 0 1px 2px oklch(0 0 0 / 0.06); transition: box-shadow 280ms ease-in-out, border-color 280ms ease-in-out, transform 280ms ease-in-out; height: 100%; }
.t-feat:hover { transform: scale(1.03); box-shadow: 0 16px 36px oklch(0 0 0 / 0.18); border-color: var(--t-blue); }
.t-feat__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.t-feat__media { position: absolute; inset: 0; --s: 12px; transition: transform 400ms ease-in-out; }
.t-feat:hover .t-feat__media { transform: scale(1.05); }
.t-feat__bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--t-ink); padding: 14px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.t-feat__title { margin: 0; color: #fff; font-weight: 600; line-height: 1.3; }
.t-feat__meta { font-family: var(--t-mono); font-size: 11px; color: oklch(0.6 0.01 90); margin-top: 8px; }
.t-feat__go { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; background: oklch(0.35 0.01 90); color: #fff; display: flex; align-items: center; justify-content: center; transition: background 280ms ease-in-out, transform 280ms ease-in-out; }
.t-feat:hover .t-feat__go { background: var(--t-blue); transform: translateX(3px); }
.t-rv { min-width: 0; }

/* Latest */
.t-latest { padding: 40px var(--t-pad); }
.t-latest > .t-head { border-bottom: 1px solid var(--t-line-2); padding-bottom: 12px; margin-bottom: 8px; }
.t-row { padding: 20px 24px; margin: 0 -24px; border-bottom: 1px solid var(--t-line); transition: background 280ms ease-in-out; display: flex; align-items: center; gap: 20px; }
.t-row:hover { background: oklch(0.955 0.005 90); }
.t-row:hover .t-shift { transform: translateX(8px); }
.t-row__thumb { width: 96px; height: 72px; min-width: 96px; }
.t-row__title { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.t-row.is-new { animation: t-page-in 500ms var(--t-ease) both; }

/* Developer Notes band */
.t-notes { background: var(--t-ice); padding: 48px var(--t-pad); }
.t-notes__inner { max-width: 1160px; margin: 0 auto; }
.t-notes .t-head { margin-bottom: 22px; }
.t-notes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.t-note { padding: 8px; transition: transform 280ms ease-in-out, box-shadow 280ms ease-in-out; height: 100%; }
.t-note:hover { transform: translateY(-6px); box-shadow: 0 12px 28px oklch(0.5 0.1 250 / 0.18); }
.t-note__media { aspect-ratio: 16 / 9; margin-bottom: 14px; --s: 10px; }
.t-note__title { margin: 0; font-weight: 600; line-height: 1.3; }
.t-note__date { font-family: var(--t-mono); font-size: 11px; color: oklch(0.4 0.02 250); margin-top: 8px; }

/* Category sections */
.t-cats { padding: 8px var(--t-pad) 40px; }
.t-catsec { padding: 36px 0; border-bottom: 1px solid var(--t-line-3); }
.t-catsec .t-head { margin-bottom: 18px; }
.t-crow { padding: 12px 16px; margin: 0 -16px; display: flex; align-items: center; gap: 16px; border-radius: 4px; transition: background 280ms ease-in-out; }
.t-crow:hover { background: oklch(0.965 0.005 90); }
.t-crow:hover .t-shift { transform: translateX(6px); }
.t-crow__thumb { width: 80px; height: 60px; min-width: 80px; }
.t-crow__title { margin: 0; font-weight: 600; line-height: 1.3; }

/* ---------- Inner page heroes ---------- */
.t-list-hero { background: var(--t-ink); padding: 56px var(--t-pad); }
.t-page-hero { background: var(--t-ink); padding: 64px var(--t-pad) 56px; }
.t-back { font-family: var(--t-mono); font-size: 12px; color: oklch(0.7 0.01 90); }
.t-back:hover { color: var(--t-bright); }
.t-back--light { color: var(--t-blue); }
.t-back--light:hover { color: var(--t-blue-h); }
.t-list-hero__row { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.t-list-hero__count { font-family: var(--t-mono); font-size: 13px; color: oklch(0.55 0.01 90); }
.t-list-hero__count--below { display: block; margin: 14px 0 0; }
.t-list-hero__title { margin: 24px 0 0; font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1.15; overflow-wrap: anywhere; }
.t-list-hero__q { color: var(--t-bright); }
.t-list-hero__desc { margin: 16px 0 0; max-width: 640px; font-family: var(--t-mono); font-size: 13px; line-height: 1.6; color: oklch(0.6 0.01 90); }
.t-list-hero__desc p { margin: 0; }
.t-list-hero .t-sform { margin-top: 20px; max-width: 420px; }
.t-author { margin-top: 24px; display: flex; align-items: center; gap: 18px; }
.t-author__name { margin: 0; font-weight: 700; color: #fff; line-height: 1.2; }
.t-author__role { font-family: var(--t-mono); font-size: 13px; color: oklch(0.65 0.01 90); margin-top: 4px; }
.t-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-family: var(--t-mono); overflow: hidden; flex: none; }
.t-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-avatar--lg { width: 56px; height: 56px; min-width: 56px; background: oklch(0.3 0.01 90); font-size: 16px; color: #fff; }
.t-avatar--sm { width: 38px; height: 38px; min-width: 38px; background: oklch(0.9 0.01 90); font-size: 12px; color: oklch(0.5 0.01 90); }

.t-page__title { margin: 24px 0 0; font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1.15; }
.t-page__sub { margin: 14px 0 0; font-family: var(--t-mono); font-size: 14px; color: oklch(0.6 0.01 90); line-height: 1.5; }
.t-page__body { max-width: 720px; margin: 0 auto; padding: 48px 32px 100px; line-height: 1.75; }
.t-page__body--mono { font-family: var(--t-mono); font-size: 16px !important; color: oklch(0.4 0.01 90); line-height: 1.7; }
.t-page__comments { max-width: 720px; margin: 0 auto; padding: 0 32px 80px; }

/* Search form (search page, 404) */
.t-sform { display: flex; align-items: center; gap: 8px; background: oklch(0.2 0.005 90); border-radius: 6px; padding: 10px 12px; color: #fff; margin: 0; }
.t-sform svg { opacity: 0.6; min-width: 16px; }
.t-sform input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--t-mono); font-size: 14px; color: #fff; padding: 0; }
.t-page__body .t-sform { background: #fff; border: 1px solid var(--t-line-2); color: var(--t-text); }
.t-page__body .t-sform input { color: var(--t-text); }

/* Lists (category / author / tag / search) */
.t-list { max-width: 840px; margin: 0 auto; padding: 40px var(--t-pad) 100px; }
.t-item { padding: 24px; margin: 0 -24px; border-bottom: 1px solid var(--t-line); display: flex; align-items: center; gap: 20px; transition: background 280ms ease-in-out; }
.t-item:hover { background: oklch(0.965 0.005 90); }
.t-item:hover .t-shift { transform: translateX(8px); }
.t-item__title { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.t-item .t-meta { margin-top: 8px; }
.t-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; font-family: var(--t-mono); font-size: 12px; }
.t-pages .page-numbers { padding: 6px 10px; border: 1px solid var(--t-line-2); color: oklch(0.4 0.01 90); }
.t-pages a.page-numbers:hover { border-color: var(--t-blue); color: var(--t-blue); }
.t-pages .current { background: var(--t-ink); border-color: var(--t-ink); color: #fff; }
.t-pages .dots { border-color: transparent; }

/* ---------- Article ---------- */
.t-progress { position: fixed; top: var(--t-top); left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; }
.t-progress__bar { height: 100%; width: 0; background: var(--t-blue); transition: width 90ms linear; }
.t-arthero { max-width: 1080px; margin: 0 auto; padding: 56px 32px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.t-art__meta { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); margin-top: 28px; }
.t-art__meta a { display: inline; color: inherit; }
.t-art__meta a:hover { color: var(--t-blue); }
.t-art__title { font-weight: 700; letter-spacing: -0.02em; line-height: 1.14; margin: 14px 0 24px; }
.t-byline { display: flex; align-items: center; gap: 12px; width: fit-content; color: var(--t-text); }
.t-byline:hover { color: var(--t-text); }
.t-byline:hover .t-byline__name { color: var(--t-blue); }
.t-byline > span:last-child { display: flex; flex-direction: column; }
.t-byline__name { font-weight: 600; font-size: 14px; transition: color 250ms ease-in-out; }
.t-byline__role { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); }
.t-arthero__media { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; margin: 0; }
.t-pat--lg { --s: 14px; }
.t-ph-label { font-family: var(--t-mono); font-size: 12px; color: oklch(0.4 0.02 250); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; padding: 0 20px; }
.t-artrule { max-width: 1080px; margin: 40px auto 0; padding-top: 32px; border-top: 1px solid var(--t-line-3); }
.t-artlayout { max-width: 1080px; margin: 0 auto; padding: 0 32px 100px; display: grid; grid-template-columns: 200px minmax(0, 720px); gap: 64px; justify-content: center; }
.t-artlayout--notoc .t-toc__nav { display: none; }
.t-toc { position: relative; }
.t-toc__sticky { position: sticky; top: calc(96px + var(--t-top)); display: flex; flex-direction: column; gap: 36px; }
.t-toc__nav { display: flex; flex-direction: column; gap: 14px; }
.t-toc__label { font-family: var(--t-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t-muted); }
.t-toc__list { display: flex; flex-direction: column; }
.t-toc__item { display: flex; gap: 10px; padding: 8px 0 8px 14px; border-left: 2px solid var(--t-line-2); color: var(--t-muted); font-size: 14px; line-height: 1.4; font-weight: 500; transition: color 300ms ease, border-color 300ms ease; }
.t-toc__item:hover { color: var(--t-blue); }
.t-toc__item.is-active { color: var(--t-blue); border-color: var(--t-blue); font-weight: 600; }
.t-toc__num { font-family: var(--t-mono); font-size: 11px; padding-top: 2px; }
.t-toc__pct { font-family: var(--t-mono); font-size: 11px; color: var(--t-muted); }
.t-share { display: flex; flex-direction: column; gap: 12px; }
.t-share__btns { display: flex; gap: 8px; }
.t-share__btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--t-line-2); border-radius: 50%; color: oklch(0.45 0.01 90); cursor: pointer; transition: color 300ms ease, border-color 300ms ease, transform 300ms ease; }
.t-share__btn:hover { color: var(--t-blue); border-color: var(--t-blue); transform: translateY(-2px); }
.t-share__note { font-family: var(--t-mono); font-size: 11px; color: var(--t-blue); }
.t-share__note[hidden] { display: none; }

.t-article { min-width: 0; }
.t-content { line-height: 1.75; overflow-wrap: break-word; }
.t-content > *:first-child { margin-top: 0; }
.t-content p { margin: 0 0 1em; }
.t-content a { display: inline; color: var(--t-blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.t-content a:hover { color: var(--t-blue-h); }
.t-sec { scroll-margin-top: calc(100px + var(--t-top)); display: flex; align-items: baseline; gap: 10px; margin: 44px 0 16px; }
.t-sec__num { font-family: var(--t-mono); font-size: 13px; color: #fff; background: var(--t-ink); padding: 2px 8px; line-height: 1.6; flex: none; position: relative; top: -0.2em; }
.t-content h2 { font-weight: 700; margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
.t-content h3 { font-weight: 700; margin: 36px 0 12px; line-height: 1.3; }
.t-content h4 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.t-content blockquote, .t-content .wp-block-quote { margin: 36px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--t-blue); font-weight: 600; font-style: normal; line-height: 1.5; }
.t-content blockquote p { margin: 0 0 0.5em; }
.t-content blockquote p:last-child { margin-bottom: 0; }
.t-content blockquote cite { display: block; margin-top: 10px; font-family: var(--t-mono); font-size: 12px; font-weight: 400; font-style: normal; color: var(--t-muted); }
.t-content .wp-block-pullquote { border: 0; padding: 0; margin: 36px 0; text-align: left; }
.t-content figure { margin: 36px 0; }
.t-content figure img { display: block; }
.t-content figcaption { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); margin-top: 10px; text-align: left; }
.t-content ul, .t-content ol { padding-left: 1.3em; margin: 0 0 1em; }
.t-content li { margin: 0.3em 0; }
.t-content li::marker { color: var(--t-blue); }
.t-content hr { border: 0; border-top: 1px solid var(--t-line-3); margin: 40px 0; }
.t-content code { font-family: var(--t-mono); font-size: 0.82em; background: oklch(0.95 0.005 90); padding: 2px 6px; border-radius: 3px; }
.t-content pre { font-family: var(--t-mono); font-size: 14px; line-height: 1.6; background: var(--t-ink); color: oklch(0.92 0.01 90); padding: 20px 22px; overflow-x: auto; margin: 32px 0; border-radius: 0; }
.t-content pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.t-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.t-content th, .t-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--t-line-2); }
.t-content th { font-family: var(--t-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--t-muted); }
.t-content .wp-block-table { overflow-x: auto; }
.t-content .alignwide, .t-content .alignfull { margin-left: 0; margin-right: 0; }
.t-content .aligncenter { margin-left: auto; margin-right: auto; }
.t-content .alignleft { float: left; margin: 6px 24px 12px 0; max-width: 50%; }
.t-content .alignright { float: right; margin: 6px 0 12px 24px; max-width: 50%; }
.t-content .wp-block-embed iframe, .t-content iframe { max-width: 100%; }
.t-content .t-note-end { margin-top: 40px; }
.t-figph { position: relative; aspect-ratio: 16 / 8; margin: 36px 0; background: repeating-linear-gradient(135deg, oklch(0.93 0.01 90), oklch(0.93 0.01 90) 12px, oklch(0.97 0.004 90) 12px, oklch(0.97 0.004 90) 24px); display: flex; align-items: center; justify-content: center; }
.t-figph span { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; padding: 0 16px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--t-line-3); }
.t-chip { font-family: var(--t-mono); font-size: 11px; background: oklch(0.95 0.005 90); padding: 5px 10px; color: var(--t-text); transition: background 200ms ease, color 200ms ease; }
.t-chip:hover { background: oklch(0.91 0.005 90); color: var(--t-text); }
.t-chip--cat { background: var(--t-ice); color: oklch(0.4 0.02 250); }
.t-chip--cat:hover { background: oklch(0.91 0.05 250); color: oklch(0.35 0.03 250); }
.t-sharerow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.t-sharerow__label { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); }

/* Comments */
.t-comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--t-line-3); font-size: 16px; }
.t-comments h2, .t-comments h3 { font-size: 20px; margin: 0 0 16px; }
.t-comments ol { list-style: none; padding: 0; margin: 0 0 32px; }
.t-comments .children { list-style: none; padding-left: 24px; }
.t-comments .comment-body { padding: 16px 0; border-bottom: 1px solid var(--t-line); }
.t-comments .comment-meta { font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); }
.t-comments .comment-meta a { color: inherit; }
.t-comments img.avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.t-comments label { display: block; font-family: var(--t-mono); font-size: 12px; color: var(--t-muted); margin-bottom: 6px; }
.t-comments input[type="text"], .t-comments input[type="email"], .t-comments input[type="url"], .t-comments textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--t-line-2); background: #fff; font: inherit; font-size: 15px; }
.t-comments .comment-form-cookies-consent label { display: inline; }
.t-comments input[type="submit"] { background: var(--t-ink); color: #fff; border: 0; padding: 10px 18px; font-family: var(--t-mono); font-size: 13px; cursor: pointer; }
.t-comments input[type="submit"]:hover { background: var(--t-blue); }

/* ---------- Footer ---------- */
.t-footer { background: var(--t-ink); margin-top: auto; padding: 48px var(--t-pad); display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.t-footer__left { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.t-footer__icons { display: flex; align-items: center; gap: 16px; }
.t-footer__icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: oklch(0.55 0.01 90); transition: color 250ms ease-in-out; }
.t-footer__icon:hover { color: #fff; }
.t-flinks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-family: var(--t-mono); font-size: 13px; }
.t-flinks a { color: oklch(0.65 0.01 90); }
.t-flinks a:hover { color: var(--t-bright); }

/* ---------- Responsive (the design's breakpoints) ---------- */
@media (max-width: 1024px) {
	.t-featured__grid, .t-notes__grid { grid-template-columns: repeat(2, 1fr); }
	.t-arthero { grid-template-columns: 1fr; }
	.t-artlayout { grid-template-columns: minmax(0, 1fr); }
	.t-toc { display: none; }
}
@media (max-width: 640px) {
	:root { --t-pad: 20px; }
	.t-header { padding: 14px 20px; }
	.t-nav { display: none; }
	.t-burger { display: flex; }
	.t-mobile { top: calc(var(--t-top) + 60px); }
	.t-arthero { padding-left: 20px; padding-right: 20px; }
	.t-artlayout { padding-left: 20px; padding-right: 20px; }
	.t-page__body, .t-page__comments { padding-left: 20px; padding-right: 20px; }
	.t-featured__grid, .t-notes__grid { grid-template-columns: 1fr; }
	.t-row, .t-crow, .t-item { flex-wrap: wrap; }
	.t-row, .t-item { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
	.t-row__thumb { width: 100%; height: 200px; min-width: 0; }
	.t-crow__thumb { width: 100%; height: 160px; min-width: 0; }
	.t-tw { white-space: normal; }
	.t-search__pop { width: min(320px, calc(100vw - 40px)); }
	.t-footer { flex-direction: column; align-items: center; text-align: center; gap: 28px; }
	.t-footer__left, .t-footer__links, .t-flinks { align-items: center; }
	.t-footer__icon { width: 40px; height: 40px; }
}
@media (min-width: 641px) {
	.t-mobile { display: none !important; }
}

/* The design measures its max-widths without padding (content-box). */
.t-wrap, .t-list, .t-page__body, .t-page__comments, .t-arthero, .t-artrule, .t-artlayout { box-sizing: content-box; }
