/*
Theme Name: TheCRM
Theme URI: https://thecrm.one/
Author: Urmas
Author URI: https://thecrm.one/
Description: Calm, native-Mac inspired theme for thecrm.one — the CRM that doesn't bill you forever. Includes a custom front page with hero, comparison table, pricing card, FAQ, and a faux Mac app mockup. Light + dark mode.
Version: 0.3.0
Requires at least: 6.0
Tested up to: 6.5
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: thecrm
Tags: business, one-column, custom-menu, custom-logo, full-width-template, sticky-post, footer-widgets
*/

/* ─── Reset & tokens ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg:        #FAFAF7;
  --surface:   #FFFFFF;
  --surface-2: #F0EFE8;
  --text:      #1A1F1B;
  --muted:     #5C5C5C;
  --border:    #E5E5DD;
  --primary:   #2D5840;
  --primary-h: #1F4030;
  --primary-soft: #E6EFE9;
  --accent:    #C8A24A;
  --shadow-sm: 0 1px 2px rgba(20,30,22,0.04);
  --shadow:    0 6px 24px rgba(20,30,22,0.06), 0 1px 2px rgba(20,30,22,0.04);
  --shadow-lg: 0 24px 60px rgba(20,30,22,0.10), 0 8px 20px rgba(20,30,22,0.06);
  --radius:    12px;
  --radius-lg: 18px;
  --container: 1140px;
}

[data-theme="dark"] {
  --bg:        #14171A;
  --surface:   #1B2024;
  --surface-2: #232A2E;
  --text:      #ECEEEA;
  --muted:     #9BA39B;
  --border:    #2A3035;
  --primary:   #5FA37C;
  --primary-h: #74B68F;
  --primary-soft: #1F2C26;
  --accent:    #D9B86A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 6px 24px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5), 0 8px 20px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'cv11','ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}

/* ─── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

.muted { color: var(--muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .8em;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.tcrm-section { padding: clamp(56px, 9vw, 110px) 0; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-header p { color: var(--muted); font-size: 1.1rem; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }

/* ─── Top nav ─────────────────────────────────────────────────────── */
.tcrm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 70%, var(--accent)));
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  letter-spacing: -.05em;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.nav-links > li { position: relative; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; padding: 8px 0; display: inline-block; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .current-menu-item > a,
.nav-links .current-menu-parent > a { color: var(--text); }

/* Submenu (dropdown) — appears when a top-level item has children */
.nav-links .sub-menu,
.nav-links ul.sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -16px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s .15s;
  z-index: 60;
}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s 0s;
}
.nav-links .sub-menu li { display: block; }
.nav-links .sub-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.nav-links .sub-menu a:hover { background: var(--surface-2); color: var(--text); }
/* Chevron next to top-level items that have a submenu */
.nav-links .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transition: transform .15s ease;
}
.nav-links .menu-item-has-children:hover > a::after { transform: translateY(1px); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .2s ease;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero { padding-top: 80px; padding-bottom: 40px; text-align: center; }
.hero h1 { max-width: 18ch; margin: 0 auto .35em; }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 58ch; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-meta { color: var(--muted); font-size: .9rem; }
.hero-meta .sep { color: var(--border); margin: 0 8px; }

/* ─── App mockup window ──────────────────────────────────────────── */
.mockup-wrap {
  margin-top: 64px;
  position: relative;
  padding: 0 16px;
}
.mockup {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: perspective(2000px) rotateX(0.5deg);
}
.mockup-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot.r { background: #FF5F57; }
.tdot.y { background: #FEBC2E; }
.tdot.g { background: #28C840; }
.titlebar-title {
  flex: 1; text-align: center;
  font-size: .85rem; color: var(--muted); font-weight: 500;
  margin-right: 54px;
}
.mockup-body { display: grid; grid-template-columns: 220px 1fr; min-height: 460px; }
.tcrm-sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  font-size: .85rem;
}
.tcrm-sidebar h4 {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 14px 8px 8px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--text);
  cursor: default;
}
.sidebar-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-item.muted { color: var(--muted); }
.sidebar-item .ico {
  width: 14px; height: 14px;
  border-radius: 3px;
  background: currentColor; opacity: .55;
  flex-shrink: 0;
}
.sidebar-item.active .ico { opacity: 1; }

.pipeline {
  padding: 18px 18px 24px;
  overflow-x: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  background: var(--bg);
}
.col { display: flex; flex-direction: column; gap: 10px; min-width: 180px; }
.col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 8px;
  font-size: .8rem; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--border);
}
.col-count {
  display: inline-flex; min-width: 22px;
  padding: 2px 7px; border-radius: 12px;
  background: var(--surface-2); color: var(--muted);
  font-size: .7rem; text-transform: none; letter-spacing: 0; font-weight: 500;
}
.deal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-sm);
  font-size: .82rem;
}
.deal-name { font-weight: 600; margin-bottom: 2px; line-height: 1.3; color: var(--text); }
.deal-org  { color: var(--muted); font-size: .76rem; margin-bottom: 8px; }
.deal-foot { display: flex; justify-content: space-between; align-items: center; }
.deal-amount { font-weight: 600; color: var(--text); }
.tag {
  font-size: .68rem; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: var(--primary-soft); color: var(--primary);
}
.tag.warm { background: #FCEFCB; color: #8C6611; }
.tag.cool { background: #E1ECF6; color: #20517A; }
[data-theme="dark"] .tag.warm { background: #3a2f15; color: #E5C57A; }
[data-theme="dark"] .tag.cool { background: #1a2a39; color: #8FB6D8; }

@media (max-width: 760px) {
  .mockup-body { grid-template-columns: 1fr; }
  .tcrm-sidebar { display: none; }
  .pipeline { grid-template-columns: repeat(4, 220px); }
}

/* ─── Why cards ──────────────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.card .ico-circle {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 14px;
  font-weight: 700;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ─── Feature tiles ──────────────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.tile .ico-circle { margin-bottom: 8px; }
.tile h4 { font-size: 1rem; margin: 0; }
.tile p { font-size: .92rem; color: var(--muted); margin: 0; }

@media (max-width: 880px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .feat-grid { grid-template-columns: 1fr; }
}
.feat-cta { text-align: center; }
.feat-cta a { font-weight: 600; }

/* ─── Comparison table ───────────────────────────────────────────── */
.compare-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table thead th {
  font-weight: 600;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--surface-2);
}
.compare-table thead th.us {
  color: var(--primary);
  background: var(--primary-soft);
}
.compare-table tbody td:first-child { color: var(--muted); font-weight: 500; }
.compare-table tbody td.us {
  font-weight: 600;
  background: color-mix(in oklab, var(--primary-soft) 60%, transparent);
  color: var(--text);
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover td { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.compare-table tbody tr:hover td.us { background: var(--primary-soft); }

.compare-quote {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 36px auto 0;
  max-width: 640px;
  line-height: 1.4;
}
.compare-quote::before, .compare-quote::after {
  content: '"';
  color: var(--primary);
  font-size: 1.4em;
  vertical-align: -0.15em;
  margin: 0 6px;
}

@media (max-width: 760px) {
  .compare-wrap { overflow-x: auto; }
  .compare-table { min-width: 720px; }
}

/* ─── Pricing card ───────────────────────────────────────────────── */
.pricing-section { background: var(--surface-2); }
.pricing-card {
  max-width: 520px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.price {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--text);
  margin: 0 0 6px;
}
.price-meta { color: var(--muted); margin-bottom: 28px; font-size: 1rem; }
.price-list {
  list-style: none; padding: 0; margin: 0 0 28px;
  text-align: left;
  font-size: .96rem;
}
.price-list li {
  padding: 8px 0;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
}
.price-list li:last-child { border-bottom: 0; }
.check {
  color: var(--primary);
  flex-shrink: 0;
  width: 16px; height: 16px;
}

/* ─── FAQ ────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
  transition: box-shadow .2s ease;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; color: var(--primary); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ─── Final CTA ──────────────────────────────────────────────────── */
.cta-final {
  text-align: center;
  background: linear-gradient(180deg, var(--bg), var(--surface-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-final h2 { letter-spacing: -.035em; max-width: 18ch; margin: 0 auto .35em; }
.cta-final p { color: var(--muted); font-size: 1.1rem; max-width: 50ch; margin: 0 auto 28px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.tcrm-footer {
  padding: 56px 0 64px;
  font-size: .9rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h5 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Generic page template (for /about, /pricing, /privacy, etc.) ─ */
.tcrm-page {
  padding: 64px 0 100px;
}
.tcrm-page .post-title {
  text-align: center;
  margin: 0 auto 56px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  max-width: 22ch;
}
.tcrm-page .entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.7;
}
.tcrm-page .entry-content > * + * {
  margin-top: 1.1em;
}
/* Lead paragraph — first paragraph after the H1 gets larger, lighter weight */
.tcrm-page .entry-content > p:first-of-type {
  font-size: 1.32rem;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--text);
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
}
/* Second paragraph — slight lead style as well, smaller and centered */
.tcrm-page .entry-content > p:first-of-type + p {
  font-size: 1.15rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0;
  margin-bottom: 2.2em;
}

.tcrm-page .entry-content h2 {
  margin-top: 2.8em;
  margin-bottom: .5em;
  font-size: 1.6rem;
  letter-spacing: -.02em;
  position: relative;
  padding-top: 1.4em;
}
.tcrm-page .entry-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  opacity: .8;
}
.tcrm-page .entry-content h3 {
  margin-top: 1.8em;
  margin-bottom: .35em;
  font-size: 1.18rem;
}
.tcrm-page .entry-content p { margin: 0; color: var(--text); }
.tcrm-page .entry-content strong { color: var(--text); font-weight: 600; }

.tcrm-page .entry-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.8em 0;
  padding: .6em 0 .6em 1.4em;
  font-size: 1.18rem;
  font-style: italic;
  color: var(--text);
  background: linear-gradient(90deg, var(--primary-soft), transparent 60%);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tcrm-page .entry-content blockquote p { margin: 0; }
.tcrm-page .entry-content blockquote p + p { margin-top: .6em; }

.tcrm-page .entry-content ul,
.tcrm-page .entry-content ol {
  padding-left: 1.4em;
  margin: 0;
}
.tcrm-page .entry-content li + li { margin-top: .35em; }
.tcrm-page .entry-content li::marker { color: var(--primary); }

.tcrm-page .entry-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.6em auto;
  max-width: 220px;
}

.tcrm-page .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: .95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tcrm-page .entry-content thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tcrm-page .entry-content tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tcrm-page .entry-content tbody tr:last-child td { border-bottom: 0; }
.tcrm-page .entry-content tbody tr:hover td {
  background: color-mix(in oklab, var(--surface-2) 50%, transparent);
}

.tcrm-page .entry-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.tcrm-page .entry-content a:hover { text-decoration-thickness: 2px; }

.tcrm-page .entry-content code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .92em;
}
.tcrm-page .entry-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: .92rem;
  line-height: 1.55;
}
.tcrm-page .entry-content pre code { background: transparent; padding: 0; }
.tcrm-page .entry-content img,
.tcrm-page .entry-content figure img {
  border-radius: var(--radius);
  margin: 1.6em 0;
}

/* "Check / cross" lists — when a paragraph has only ✓ ✗ items they look like
   pseudo-bullets. Style them as proper inclusion / exclusion rows. */
.tcrm-page .entry-content p:has(> :not(br)) ~ p {
  /* no-op safety, just here so editor sees the rule exists */
}

/* ─── Blog archive (index.php) ───────────────────────────────────── */
.blog-archive {
  padding: 80px 0 100px;
}
.blog-archive .archive-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.blog-archive .archive-header h1 {
  margin-bottom: .25em;
}
.blog-archive .archive-header p {
  color: var(--muted);
  font-size: 1.1rem;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 26px;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.post-card .post-date {
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.post-card h2 {
  font-size: 1.35rem;
  margin: 0 0 .4em;
  line-height: 1.25;
}
.post-card h2 a {
  color: var(--text);
}
.post-card h2 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.post-card .excerpt {
  color: var(--muted);
  font-size: .96rem;
  margin: 0 0 16px;
  flex: 1;
}
.post-card .read-more {
  font-weight: 600;
  font-size: .92rem;
  color: var(--primary);
  margin-top: auto;
}
.post-card .read-more:hover { text-decoration: none; }
.post-card .read-more::after { content: " →"; }

@media (max-width: 760px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* Pagination */
.posts-pagination {
  margin-top: 56px;
  text-align: center;
}
.posts-pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.posts-pagination a, .posts-pagination .current {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  background: var(--surface);
}
.posts-pagination a:hover { background: var(--surface-2); text-decoration: none; }
.posts-pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Single post template (single.php) ──────────────────────────── */
.single-post-wrap {
  padding: 64px 0 96px;
}
.single-post-wrap article {
  max-width: 720px;
  margin: 0 auto;
}
.single-post-meta {
  text-align: center;
  margin-bottom: 28px;
}
.single-post-meta .post-date {
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}
.single-post-meta h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0 0 .4em;
}
.single-post-meta .author {
  color: var(--muted);
  font-size: .95rem;
}
.single-post-content {
  font-size: 1.08rem;
  line-height: 1.7;
}
.single-post-content > * + * { margin-top: 1.1em; }
.single-post-content h2 {
  font-size: 1.6rem;
  margin-top: 2em;
  margin-bottom: .5em;
}
.single-post-content h3 {
  font-size: 1.25rem;
  margin-top: 1.6em;
  margin-bottom: .4em;
}
.single-post-content p {
  margin: 0;
}
.single-post-content blockquote {
  border-left: 3px solid var(--primary);
  padding: .25em 0 .25em 1.2em;
  margin: 1.4em 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
}
.single-post-content code {
  font-size: .94em;
}
.single-post-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92rem;
  line-height: 1.55;
}
.single-post-content pre code { background: transparent; padding: 0; }
.single-post-content img,
.single-post-content figure img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}
.single-post-content ul, .single-post-content ol {
  padding-left: 1.4em;
}
.single-post-content li + li { margin-top: .35em; }
.single-post-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em auto;
  max-width: 240px;
}
.post-cta {
  margin-top: 64px;
  padding: 28px 32px;
  background: var(--primary-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}
.post-cta p { margin: 0 0 14px; color: var(--text); font-weight: 500; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: .9rem;
}
.post-nav a {
  color: var(--muted);
  display: flex; flex-direction: column; gap: 2px;
  max-width: 45%;
}
.post-nav a:hover { color: var(--text); text-decoration: none; }
.post-nav .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ─── Utility ────────────────────────────────────────────────────── */
.center { text-align: center; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
