/*
Theme Name: TechBoilers
Theme URI: https://techboilers.com/
Author: TechBoilers
Author URI: https://techboilers.com/
Description: Editorial buying-guide theme for TechBoilers. Instrument-panel typography, a match engine in the hero, programmatic shortlist pages and a reading layout built for long comparison guides. Pairs with the TechBoilers Engine plugin.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techboilers
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Tokens
   The engine plugin declares these first; redeclaring here means the theme
   wins the cascade and one file controls the whole look.
   ========================================================================== */

:root {
  --tb-ink:          #14181a;
  --tb-ink-soft:     #2a3336;
  --tb-steel:        #5c696e;
  --tb-mute:         #8b9599;
  --tb-line:         #dce0db;
  --tb-line-strong:  #c3c9c2;
  --tb-panel:        #edefec;
  --tb-panel-2:      #e4e8e2;
  --tb-paper:        #ffffff;

  --tb-hazard:       #c93a12;
  --tb-hazard-ink:   #8f2809;
  --tb-hazard-wash:  #fbeae4;
  --tb-brass:        #a87c25;
  --tb-brass-wash:   #f6edd8;
  --tb-go:           #1c6b45;
  --tb-go-wash:      #e6f2eb;

  --tb-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tb-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --tb-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --tb-r:    4px;
  --tb-r-lg: 10px;

  --tb-shadow:    0 1px 0 rgba(20,24,26,.05), 0 14px 34px -22px rgba(20,24,26,.45);
  --tb-shadow-lg: 0 2px 0 rgba(20,24,26,.05), 0 30px 60px -34px rgba(20,24,26,.5);

  --tb-max:  1180px;
  --tb-read: 70ch;

  --tb-head-h: 68px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tb-head-h) + 16px);
}

body {
  margin: 0;
  background: var(--tb-paper);
  color: var(--tb-ink);
  font-family: var(--tb-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--tb-hazard); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tb-hazard-ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tb-display);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.12;
  color: var(--tb-ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }

hr { border: 0; border-top: 1px solid var(--tb-line); margin: 2.4rem 0; }

::selection { background: var(--tb-hazard); color: #fff; }

:focus-visible { outline: 3px solid var(--tb-hazard); outline-offset: 2px; }

.tb-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--tb-ink);
  color: #fff;
  padding: .8em 1.2em;
  font-family: var(--tb-display);
  font-weight: 700;
  text-decoration: none;
}
.tb-skip:focus { left: 8px; top: 8px; color: #fff; }

/* ==========================================================================
   3. Header
   ========================================================================== */

.tb-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--tb-line);
}
.tb-head.is-stuck { box-shadow: 0 8px 24px -20px rgba(20,24,26,.6); }

.tb-head__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  min-height: var(--tb-head-h);
}

.tb-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--tb-ink);
  flex: none;
}
.tb-brand:hover { color: var(--tb-ink); }
.tb-mark { width: 32px; height: 32px; flex: none; color: var(--tb-ink); }
.tb-brand__text { display: flex; flex-direction: column; line-height: 1; }
.tb-brand__text strong {
  font-family: var(--tb-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.tb-brand__text small {
  font-family: var(--tb-mono);
  font-size: .56rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tb-steel);
  margin-top: .28em;
}
.custom-logo-link { display: inline-block; flex: none; }
.custom-logo { max-height: 40px; width: auto; }

.tb-nav { flex: 1 1 auto; min-width: 0; }
.tb-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 1.6vw, 1.5rem);
  margin: 0;
  padding: 0;
}
.tb-nav__list a {
  font-family: var(--tb-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--tb-ink-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: .4em 0;
  border-bottom: 2px solid transparent;
  transition: color .14s ease, border-color .14s ease;
}
.tb-nav__list a:hover,
.tb-nav__list .current-menu-item > a {
  color: var(--tb-hazard);
  border-bottom-color: var(--tb-hazard);
}
.tb-nav__list .sub-menu { display: none; }

.tb-head__tools { display: flex; align-items: center; gap: .55rem; flex: none; margin-left: auto; }

.tb-head__cta {
  font-family: var(--tb-display);
  font-size: .84rem;
  font-weight: 700;
  padding: .6em 1em;
  border: 1px solid var(--tb-ink);
  border-radius: var(--tb-r);
  color: var(--tb-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s ease, color .14s ease;
}
.tb-head__cta:hover { background: var(--tb-ink); color: #fff; }

.tb-head__search {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  background: var(--tb-paper);
  color: var(--tb-ink);
  cursor: pointer;
}
.tb-head__search:hover { border-color: var(--tb-ink); }

.tb-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px; height: 36px;
  padding: 0 8px;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  background: var(--tb-paper);
  cursor: pointer;
}
.tb-burger span[aria-hidden] { display: block; height: 2px; background: var(--tb-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.tb-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(6px) rotate(45deg); }
.tb-burger[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
.tb-burger[aria-expanded="true"] span:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }

.tb-search, .tb-mobile { border-top: 1px solid var(--tb-line); background: var(--tb-panel); padding: 1rem 0; }
.tb-search[hidden], .tb-mobile[hidden] { display: none; }

.tb-searchform { display: flex; gap: .5rem; }
.tb-searchform input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: .8em 1em;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  background: var(--tb-paper);
  font-family: var(--tb-display);
  font-size: 1rem;
  color: var(--tb-ink);
}

.tb-mobile .tb-nav__list { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 1rem; }
.tb-mobile .tb-nav__list li { width: 100%; border-bottom: 1px solid var(--tb-line); }
.tb-mobile .tb-nav__list a { display: block; padding: .9em 0; font-size: 1rem; border: 0; }

@media (max-width: 980px) {
  .tb-head > .tb-head__inner > .tb-nav { display: none; }
  .tb-burger { display: flex; }
  .tb-head__cta { display: none; }
}

/* ==========================================================================
   4. Hero
   ========================================================================== */

.tb-hero {
  position: relative;
  padding: clamp(2.4rem, 6vw, 4.6rem) 0 clamp(2.4rem, 6vw, 4rem);
  background:
    linear-gradient(180deg, var(--tb-panel) 0%, var(--tb-paper) 100%);
  border-bottom: 1px solid var(--tb-line);
  overflow: hidden;
}
.tb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(20,24,26,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20,24,26,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.tb-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.tb-hero__title {
  font-size: clamp(2.6rem, 7.2vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
  margin: 0 0 1rem;
}
.tb-hero__title em {
  font-style: normal;
  color: var(--tb-hazard);
  position: relative;
}

.tb-hero__deck {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 1.55;
  color: var(--tb-steel);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}

.tb-hero__facts { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .1rem; max-width: 42ch; }
.tb-hero__facts li {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  padding: .62rem 0;
  border-top: 1px solid var(--tb-line-strong);
  font-family: var(--tb-display);
  font-size: .92rem;
  font-weight: 600;
  color: var(--tb-ink-soft);
}
.tb-hero__facts li:last-child { border-bottom: 1px solid var(--tb-line-strong); }
.tb-hero__facts span {
  font-family: var(--tb-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--tb-brass);
  flex: none;
}

.tb-hero__note {
  font-family: var(--tb-mono);
  font-size: .74rem;
  line-height: 1.7;
  color: var(--tb-mute);
  max-width: 38ch;
  margin: 0;
}

.tb-hero__engine { position: relative; }

@media (max-width: 980px) {
  .tb-hero__grid { grid-template-columns: 1fr; }
  .tb-hero__note { display: none; }
}

/* ==========================================================================
   5. Sections
   ========================================================================== */

.tb-section { padding: clamp(2.6rem, 6vw, 4.4rem) 0; }
.tb-section--panel { background: var(--tb-panel); border-block: 1px solid var(--tb-line); }

.tb-sectionhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  padding-bottom: .9rem;
  border-bottom: 2px solid var(--tb-ink);
}
.tb-sectionhead h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -.03em;
  margin: 0;
}
.tb-sectionhead__more {
  font-family: var(--tb-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tb-steel);
  text-decoration: none;
}
.tb-sectionhead__more:hover { color: var(--tb-hazard); }
.tb-sectionhead__sub { font-family: var(--tb-mono); font-size: .74rem; color: var(--tb-mute); margin: 0; }
.tb-sectionhead__sub--wide {
  font-family: var(--tb-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tb-steel);
  max-width: 62ch;
  margin: -.8rem 0 1.6rem;
}

/* Lead + rail --------------------------------------------------------- */

.tb-latest__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem);
}

.tb-lead__media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--tb-r);
  background: var(--tb-panel);
  margin-bottom: 1.1rem;
}
.tb-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tb-lead:hover .tb-lead__media img { transform: scale(1.02); }
.tb-lead h3 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  letter-spacing: -.03em;
  margin: 0 0 .5rem;
}
.tb-lead h3 a { color: var(--tb-ink); text-decoration: none; }
.tb-lead h3 a:hover { color: var(--tb-hazard); }
.tb-lead__sum { font-size: 1.05rem; color: var(--tb-steel); margin-bottom: .6rem; }

.tb-rail { list-style: none; margin: 0; padding: 0; counter-reset: rail; }
.tb-rail li { counter-increment: rail; border-top: 1px solid var(--tb-line); }
.tb-rail li:first-child { border-top: 2px solid var(--tb-ink); }
.tb-rail__item {
  display: grid;
  gap: .2rem;
  padding: 1rem 0;
  text-decoration: none;
  position: relative;
  padding-left: 2.4rem;
}
.tb-rail__item::before {
  content: counter(rail, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: var(--tb-mono);
  font-size: .74rem;
  font-weight: 600;
  color: var(--tb-hazard);
}
.tb-rail__kicker {
  font-family: var(--tb-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tb-brass);
}
.tb-rail__item strong {
  font-family: var(--tb-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.015em;
  color: var(--tb-ink);
}
.tb-rail__item:hover strong { color: var(--tb-hazard); }
.tb-rail__meta { font-family: var(--tb-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tb-mute); }

@media (max-width: 860px) { .tb-latest__grid { grid-template-columns: 1fr; } }

/* Browse grid --------------------------------------------------------- */

.tb-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .1rem; border: 1px solid var(--tb-line-strong); border-radius: var(--tb-r); overflow: hidden; background: var(--tb-line-strong); }
.tb-browse__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.3rem 1.3rem 1.4rem;
  background: var(--tb-paper);
  text-decoration: none;
  transition: background .16s ease;
}
.tb-browse__item:hover { background: var(--tb-brass-wash); }
.tb-browse__count {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-family: var(--tb-mono);
  font-size: .68rem;
  color: var(--tb-mute);
}
.tb-browse__item strong { font-family: var(--tb-display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--tb-ink); }
.tb-browse__sub { font-family: var(--tb-body); font-size: .92rem; line-height: 1.45; color: var(--tb-steel); }

/* Chip list ----------------------------------------------------------- */

.tb-chiplist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tb-chiplist a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .6em 1em;
  border: 1px solid var(--tb-line-strong);
  border-radius: 999px;
  font-family: var(--tb-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--tb-ink);
  text-decoration: none;
  background: var(--tb-paper);
  transition: border-color .14s ease, background .14s ease;
}
.tb-chiplist a:hover { border-color: var(--tb-hazard); background: var(--tb-hazard-wash); color: var(--tb-hazard-ink); }
.tb-chiplist span { font-family: var(--tb-mono); font-size: .66rem; color: var(--tb-mute); }

/* Method -------------------------------------------------------------- */

.tb-method__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 1px solid var(--tb-line-strong); }
.tb-method__item { padding: 1.6rem 1.4rem 1.6rem 0; border-right: 1px solid var(--tb-line); }
.tb-method__item:last-child { border-right: 0; }
.tb-method__num {
  display: block;
  font-family: var(--tb-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--tb-hazard);
  margin-bottom: .7rem;
}
.tb-method__item h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 .5rem; }
.tb-method__item p { font-size: .97rem; line-height: 1.55; color: var(--tb-steel); margin: 0; }
.tb-method__link { margin: 1.6rem 0 0; font-family: var(--tb-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 720px) {
  .tb-method__item { border-right: 0; border-bottom: 1px solid var(--tb-line); padding-right: 0; }
  .tb-method__item:last-child { border-bottom: 0; }
}

/* ==========================================================================
   6. Guide (single post)
   ========================================================================== */

.tb-guide__head { padding: clamp(2rem, 5vw, 3.4rem) 0 1.6rem; }
.tb-guide__head-inner { max-width: 860px; }

.tb-guide__title {
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  letter-spacing: -.04em;
  line-height: 1.02;
  margin: 0 0 .8rem;
}
.tb-guide__dek {
  font-size: clamp(1.08rem, 2.4vw, 1.32rem);
  line-height: 1.5;
  color: var(--tb-steel);
  max-width: 58ch;
  margin-bottom: 1.6rem;
}

.tb-byline {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--tb-line);
  flex-wrap: wrap;
}
.tb-byline__avatar { border-radius: 50%; flex: none; }
.tb-byline__text { min-width: 0; }
.tb-byline__name { font-family: var(--tb-display); font-size: .95rem; font-weight: 700; margin: 0; }
.tb-byline__name a { color: var(--tb-ink); text-decoration: none; }
.tb-byline__name a:hover { color: var(--tb-hazard); }
.tb-byline__meta { font-family: var(--tb-mono); font-size: .68rem; letter-spacing: .04em; color: var(--tb-mute); margin: .15rem 0 0; }
.tb-byline__checked {
  margin: 0 0 0 auto;
  padding: .45rem .8rem;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  background: var(--tb-panel);
  font-family: var(--tb-mono);
  font-size: .68rem;
  color: var(--tb-ink);
  text-align: right;
}
.tb-byline__checked span { display: block; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tb-steel); }

.tb-guide__hero { margin: 0 auto 2.4rem; padding-inline: clamp(18px, 5vw, 40px); }
.tb-guide__hero img { width: 100%; border-radius: var(--tb-r); }
.tb-guide__hero figcaption { font-family: var(--tb-mono); font-size: .7rem; color: var(--tb-mute); margin-top: .6rem; }

.tb-guide__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: 4rem;
}
.tb-guide__body { max-width: var(--tb-read); min-width: 0; }

/* Prose --------------------------------------------------------------- */

.tb-prose { font-size: 1.14rem; line-height: 1.72; color: var(--tb-ink-soft); }
.tb-prose > h2 {
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  letter-spacing: -.03em;
  margin: 2.6rem 0 .8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--tb-line);
}
.tb-prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.tb-prose > h3 { font-size: 1.28rem; font-weight: 700; margin: 2rem 0 .6rem; }
.tb-prose > h4 { font-size: 1.08rem; font-weight: 700; margin: 1.6rem 0 .5rem; }
.tb-prose p { margin: 0 0 1.25em; }
.tb-prose > ul, .tb-prose > ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.tb-prose li { margin-bottom: .5em; }
.tb-prose strong { font-weight: 600; color: var(--tb-ink); }

.tb-prose blockquote {
  margin: 2rem 0;
  padding: .2rem 0 .2rem 1.4rem;
  border-left: 3px solid var(--tb-hazard);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--tb-ink);
}
.tb-prose blockquote p:last-child { margin-bottom: 0; }
.tb-prose blockquote cite { display: block; margin-top: .6rem; font-family: var(--tb-mono); font-size: .72rem; font-style: normal; color: var(--tb-mute); }

.tb-prose figure { margin: 2rem 0; }
.tb-prose figure img { width: 100%; border-radius: var(--tb-r); }
.tb-prose figcaption { font-family: var(--tb-mono); font-size: .7rem; line-height: 1.6; color: var(--tb-mute); margin-top: .55rem; }

.tb-prose table { width: 100%; border-collapse: collapse; font-family: var(--tb-display); font-size: .94rem; margin: 2rem 0; }
.tb-prose th, .tb-prose td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--tb-line); vertical-align: top; }
.tb-prose thead th { font-family: var(--tb-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tb-steel); background: var(--tb-panel); }

.tb-prose code {
  font-family: var(--tb-mono);
  font-size: .86em;
  background: var(--tb-panel);
  padding: .15em .4em;
  border-radius: 3px;
}
.tb-prose pre { background: var(--tb-ink); color: #e9ece9; padding: 1.2rem; border-radius: var(--tb-r); overflow-x: auto; }
.tb-prose pre code { background: none; padding: 0; color: inherit; }

.tb-prose .alignwide { width: min(100% + 8rem, 100vw - 3rem); margin-left: 50%; transform: translateX(-50%); }
.tb-prose .alignleft { float: left; margin: .4rem 1.6rem 1rem 0; max-width: 44%; }
.tb-prose .alignright { float: right; margin: .4rem 0 1rem 1.6rem; max-width: 44%; }
.tb-prose .aligncenter { margin-inline: auto; }

/* Contents rail -------------------------------------------------------- */

.tb-guide__rail { position: sticky; top: calc(var(--tb-head-h) + 20px); display: grid; gap: 1.4rem; }

.tb-toc { border-left: 2px solid var(--tb-line-strong); padding-left: 1rem; }
.tb-toc__title {
  font-family: var(--tb-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tb-brass);
  margin: 0 0 .7rem;
}
.tb-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.tb-toc li { counter-increment: toc; margin-bottom: .5rem; }
.tb-toc a {
  display: block;
  font-family: var(--tb-display);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tb-steel);
  text-decoration: none;
}
.tb-toc a:hover { color: var(--tb-hazard); }
.tb-toc a.is-current { color: var(--tb-ink); border-left: 2px solid var(--tb-hazard); margin-left: -1rem; padding-left: calc(1rem - 2px); }
.tb-toc:empty, .tb-toc[hidden] { display: none; }

.tb-toc--mobile { display: none; margin-bottom: 2rem; border: 1px solid var(--tb-line-strong); border-radius: var(--tb-r); padding: .9rem 1.1rem; background: var(--tb-panel); }
.tb-toc--mobile summary {
  cursor: pointer;
  font-family: var(--tb-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tb-brass);
}
.tb-toc--mobile ol { list-style: none; margin: .9rem 0 0; padding: 0; }
.tb-toc--mobile li { margin-bottom: .55rem; }
.tb-toc--mobile a { font-family: var(--tb-display); font-size: .95rem; font-weight: 600; color: var(--tb-ink); text-decoration: none; }

.tb-side-card {
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-r);
  padding: 1.1rem 1.2rem;
  background: var(--tb-panel);
}
.tb-side-card h3 { font-family: var(--tb-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tb-steel); margin: 0 0 .7rem; }
.tb-side-card ul { list-style: none; margin: 0; padding: 0; }
.tb-side-card li { margin-bottom: .5rem; font-family: var(--tb-display); font-size: .9rem; }
.tb-side-card a { color: var(--tb-ink); text-decoration: none; }
.tb-side-card a:hover { color: var(--tb-hazard); }

/* Method + author ------------------------------------------------------ */

.tb-guide__method { margin: 3rem 0 0; padding: 1.4rem 1.5rem; background: var(--tb-panel); border-radius: var(--tb-r); }
.tb-guide__method h2 { font-size: 1.05rem; margin: 0 0 .6rem; border: 0; padding: 0; }
.tb-guide__method p { font-size: .98rem; color: var(--tb-steel); margin-bottom: .8rem; }
.tb-guide__methodlinks { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; font-family: var(--tb-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }

.tb-authorbox { display: flex; gap: 1.2rem; margin: 2.4rem 0 0; padding-top: 1.8rem; border-top: 2px solid var(--tb-ink); }
.tb-authorbox__avatar { border-radius: 50%; flex: none; }
.tb-authorbox h2 { font-size: 1.2rem; margin: 0 0 .5rem; border: 0; padding: 0; }
.tb-authorbox p { font-size: .98rem; color: var(--tb-steel); margin-bottom: .6rem; }
.tb-authorbox a { font-family: var(--tb-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 1040px) {
  .tb-guide__layout { grid-template-columns: 1fr; }
  .tb-guide__rail { display: none; }
  .tb-toc--mobile { display: block; }
  .tb-guide__body { max-width: none; }
}

/* ==========================================================================
   7. Archives, pages, 404
   ========================================================================== */

.tb-archive__head { padding: clamp(2rem, 5vw, 3.4rem) 0 1.8rem; background: var(--tb-panel); border-bottom: 1px solid var(--tb-line); }
.tb-archive__head h1 { font-size: clamp(2rem, 5.4vw, 3.2rem); letter-spacing: -.04em; margin: 0 0 .7rem; }
.tb-archive__lede { font-size: 1.08rem; line-height: 1.6; color: var(--tb-steel); max-width: 62ch; margin: 0; }
.tb-archive__lede p { margin: 0 0 .6rem; }
.tb-archive__search { max-width: 520px; margin-top: 1.2rem; }
.tb-archive__body { padding: clamp(2rem, 5vw, 3.4rem) 0 4rem; }

.tb-pagination { margin-top: 2.6rem; }
.tb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.tb-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .8em;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  font-family: var(--tb-mono);
  font-size: .8rem;
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-pagination .page-numbers:hover { border-color: var(--tb-ink); }
.tb-pagination .page-numbers.current { background: var(--tb-ink); border-color: var(--tb-ink); color: #fff; }
.tb-pagination .screen-reader-text { display: none; }

.tb-page__head { padding: clamp(2rem, 5vw, 3.4rem) 0 1.4rem; }
.tb-page__head h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.04em; margin: 0; }
.tb-page__body { padding-bottom: 4rem; max-width: var(--tb-read); }
.tb-page__body--wide { max-width: 900px; margin-inline: auto; }
.tb-page__body .tb-lede { font-size: 1.2rem; line-height: 1.55; color: var(--tb-steel); }
.tb-page__body h2 { font-size: 1.5rem; margin: 2.2rem 0 .7rem; padding-top: 1.2rem; border-top: 1px solid var(--tb-line); }

.tb-404 { padding: clamp(3rem, 10vw, 6rem) 0; max-width: 620px; }
.tb-404 h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -.04em; }
.tb-404__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 2rem; }
.tb-404__search { max-width: 480px; }

/* ==========================================================================
   8. Ads, comments, footer
   ========================================================================== */

.tb-ad { margin: 2.4rem 0; text-align: center; }
.tb-ad__label {
  display: block;
  font-family: var(--tb-mono);
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tb-mute);
  margin-bottom: .5rem;
}
.tb-ad__unit { display: block; margin-inline: auto; }
.tb-rail__ad { text-align: center; }

.tb-commentarea { max-width: var(--tb-read); padding-bottom: 4rem; }
.tb-commentarea__title { font-size: 1.3rem; margin: 2.4rem 0 1.2rem; padding-top: 1.6rem; border-top: 2px solid var(--tb-ink); }
.tb-commentlist { list-style: none; margin: 0; padding: 0; }
.tb-commentlist .children { list-style: none; margin: 0 0 0 1.6rem; padding: 0; }
.tb-commentlist .comment-body { padding: 1.1rem 0; border-bottom: 1px solid var(--tb-line); }
.tb-commentlist .comment-author { display: flex; align-items: center; gap: .6rem; font-family: var(--tb-display); font-weight: 700; font-size: .95rem; }
.tb-commentlist .comment-author img { border-radius: 50%; }
.tb-commentlist .comment-meta { font-family: var(--tb-mono); font-size: .66rem; color: var(--tb-mute); margin: .2rem 0 .6rem; }
.tb-commentarea .comment-form label { display: block; font-family: var(--tb-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tb-steel); margin-bottom: .3rem; }
.tb-commentarea .comment-form input[type="text"],
.tb-commentarea .comment-form input[type="email"],
.tb-commentarea .comment-form input[type="url"],
.tb-commentarea .comment-form textarea {
  width: 100%;
  padding: .7em .9em;
  border: 1px solid var(--tb-line-strong);
  border-radius: var(--tb-r);
  font-family: var(--tb-display);
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--tb-paper);
  color: var(--tb-ink);
}
.tb-commentarea .comment-form .submit,
.tb-commentarea .comment-form input[type="submit"] {
  font-family: var(--tb-display);
  font-weight: 700;
  padding: .85em 1.4em;
  border-radius: var(--tb-r);
  border: 1px solid var(--tb-ink);
  background: var(--tb-ink);
  color: #fff;
  cursor: pointer;
}

.tb-foot { background: var(--tb-ink); color: rgba(255,255,255,.7); padding: clamp(2.6rem, 6vw, 4rem) 0 2.4rem; margin-top: 0; }
.tb-foot__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2.4rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.tb-foot .tb-brand { color: #fff; }
.tb-foot .tb-mark { color: #fff; }
.tb-foot .tb-brand__text small { color: rgba(255,255,255,.5); }
.tb-foot__brand p { font-size: .98rem; line-height: 1.55; color: rgba(255,255,255,.6); margin: 1rem 0 0; max-width: 38ch; }

.tb-foot__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem 1.4rem; }
.tb-foot__list a { font-family: var(--tb-display); font-size: .92rem; font-weight: 600; color: rgba(255,255,255,.78); text-decoration: none; }
.tb-foot__list a:hover { color: #fff; }

.tb-foot__disclosure { font-family: var(--tb-mono); font-size: .72rem; line-height: 1.8; color: rgba(255,255,255,.55); margin: 1.6rem 0 0; max-width: 82ch; }
.tb-foot__legal { font-family: var(--tb-mono); font-size: .68rem; color: rgba(255,255,255,.4); margin: 1rem 0 0; }

@media (max-width: 780px) { .tb-foot__top { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ==========================================================================
   9. Engine overrides in the hero
   ========================================================================== */

.tb-hero .tb-engine { box-shadow: var(--tb-shadow-lg); }
.tb-hero .tb-engine__stage { min-height: 340px; }

@media print {
  .tb-head, .tb-foot, .tb-guide__rail, .tb-ad, .tb-subscribe, .tb-alsoneed, .tb-engine { display: none !important; }
  body { font-size: 11pt; }
}
