/*
Theme Name: ToolScope AI
Author: Custom Build
Description: Professional, mobile-responsive WordPress blog theme for the AI Tools & Software niche with a magazine-style homepage, sidebar widgets, reviews, tutorials, and news sections.
Version: 1.7.3
Text Domain: toolscope-ai
*/

:root {
  --ts-accent: #00448F;
  --ts-accent-2: #00448F;
  --ts-heading: #111827;
  --ts-text: #485468;
  --ts-muted: #788496;
  --ts-bg: #f7f9fc;
  --ts-surface: #ffffff;
  --ts-surface-2: #eef3f9;
  --ts-border: #e2e8f0;
  --ts-dark: #081424;
  --ts-dark-2: #0f2034;
  --ts-shadow: 0 10px 35px rgba(15, 35, 65, 0.08);
  --ts-shadow-soft: 0 5px 18px rgba(15, 35, 65, 0.06);
  --ts-radius: 16px;
  --ts-radius-lg: 24px;
  --ts-content: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ts-text);
  background: var(--ts-bg);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ts-accent-2); }
img { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  color: var(--ts-heading);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.container { width: min(var(--ts-content), calc(100% - 32px)); margin: 0 auto; }
.section-space-sm { padding-top: 20px; }
.section-space-lg { padding: 26px 0 30px; }
.home-main { padding-bottom: 10px; }
.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;
}
.skip-link:focus {
  position: fixed !important; left: 12px; top: 12px; z-index: 9999;
  width: auto; height: auto; margin: 0; padding: 10px 14px;
  clip: auto; background: #fff; border-radius: 10px; border: 1px solid var(--ts-border);
}

/* Topbar */
.site-topbar {
  background: #fff;
  border-bottom: 1px solid var(--ts-border);
  font-size: 12px;
  color: var(--ts-muted);
}
.topbar-inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-left { min-width: 0; }
.topbar-left span:last-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right a {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ts-surface-2); color: var(--ts-heading);
  font-size: 11px; font-weight: 700;
}
.topbar-sep { opacity: .5; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,.9);
}
.header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.site-branding { min-width: 0; }
.custom-logo-link img { max-height: 54px; width: auto; }
.branding-fallback { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, #00448F, #00448F);
  color: #fff; font-weight: 900; letter-spacing: -.04em;
  box-shadow: var(--ts-shadow-soft);
}
.site-title { margin: 0; font-size: 32px; font-weight: 800; line-height: 1; }
.brand-text .site-title { font-size: 28px; }
.site-title a { color: var(--ts-heading); }
.site-tagline { margin: 4px 0 0; font-size: 13px; color: var(--ts-muted); }
.primary-nav { min-width: 0; }
.primary-nav ul {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  list-style: none; margin: 0; padding: 0;
}
.primary-nav li { position: relative; }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px;
  font-size: 15px; color: var(--ts-heading); border-radius: 10px; font-weight: 600;
}
.primary-nav .current-menu-item > a,
.primary-nav a:hover { color: var(--ts-accent-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .menu-toggle {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--ts-border); background: #fff; border-radius: 12px;
  color: var(--ts-heading); font-size: 18px;
}
.header-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--ts-accent); color: #fff; font-weight: 700;
  box-shadow: 0 8px 22px rgba(25,197,182,.24);
}
.menu-toggle { display: none; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 120; display: none; padding: 24px;
  background: rgba(7, 17, 31, 0.55);
}
.search-overlay.is-open { display: grid; place-items: start center; }
.search-panel {
  width: min(780px, 100%); margin-top: 90px; padding: 24px; background: #fff;
  border-radius: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.2);
}
.search-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-close {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--ts-border); background: #fff; font-size: 22px;
}
.search-form { display: flex; gap: 10px; }
.search-field, input[type="search"], input[type="email"], input[type="text"], input[type="url"], textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--ts-border); background: #fff; color: var(--ts-heading);
}
textarea { min-height: 160px; padding: 14px; }
.search-submit,
button[type="submit"],
input[type="submit"] {
  min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--ts-accent-2); color: #fff; font-weight: 700;
}

/* Hero */
.hero-layout {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 24px;
}
.hero-featured-card {
  position: relative; overflow: hidden; border-radius: var(--ts-radius-lg); background: #0a1b33;
  min-height: 470px; box-shadow: var(--ts-shadow);
}
.hero-featured-media, .hero-featured-media img { width: 100%; height: 100%; }
.hero-featured-media img { object-fit: cover; }
.hero-featured-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,17,34,.92) 0%, rgba(7,18,35,.55) 48%, rgba(7,18,35,.18) 100%);
}
.hero-featured-overlay {
  position: absolute; left: 32px; bottom: 32px; z-index: 2; max-width: 48%; color: #fff;
}
.hero-featured-title { font-size: clamp(30px, 4.2vw, 48px); margin: 10px 0 10px; }
.hero-featured-title a, .hero-featured-overlay { color: #fff; }
.hero-featured-excerpt { color: rgba(255,255,255,.82); margin-bottom: 12px; }
.hero-featured-meta { color: rgba(255,255,255,.72); font-size: 13px; }
.hero-featured-badge {
  position: absolute; left: 24px; top: 24px; z-index: 2;
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: var(--ts-accent-2); color: #fff; font-size: 12px; font-weight: 700;
}
.hero-secondary { display: grid; gap: 14px; }
.compact-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: stretch;
  padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--ts-border);
  box-shadow: var(--ts-shadow-soft);
}
.compact-card-media, .compact-card-media img { width: 100%; height: 100%; }
.compact-card-media img { object-fit: cover; border-radius: 12px; min-height: 100px; }
.compact-card-title { margin: 4px 0 8px; font-size: 21px; line-height: 1.25; }
.compact-card-meta { color: var(--ts-muted); font-size: 13px; }

.card-tax, .section-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ts-accent-2);
}
.card-tax.small { font-size: 11px; }
.card-tax.light a { color: #bfe0ff; }

/* Layout */
.content-with-sidebar.home-content-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start;
}
.content-main-column { min-width: 0; }
.home-section-block { margin-bottom: 36px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-bottom: 18px;
}
.section-title { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.section-title.with-icon::before {
  content: "✦"; display: inline-block; margin-right: 10px; color: var(--ts-accent);
}
.section-link { font-size: 13px; font-weight: 700; color: var(--ts-accent-2); }
.post-grid.home-four-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.post-card {
  overflow: hidden; border-radius: 18px; background: #fff; border: 1px solid var(--ts-border);
  box-shadow: var(--ts-shadow-soft);
}
.post-card-media, .post-card-media img { width: 100%; }
.post-card-media img {
  aspect-ratio: 1.28 / 1; object-fit: cover; background: linear-gradient(135deg,#dce8ff,#f1f5fb);
}
.post-card-placeholder, .compact-card .post-card-placeholder, .list-post .post-card-placeholder {
  display: grid; place-items: center; background: linear-gradient(135deg,#0f3e98,#00448F); color: #fff;
  width: 100%; height: 100%; font-weight: 900; letter-spacing: -.05em;
}
.post-card-body { padding: 14px 14px 16px; }
.post-card-title { font-size: 18px; margin: 7px 0 8px; line-height: 1.3; }
.post-card-excerpt { font-size: 14px; color: var(--ts-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; color: var(--ts-muted); font-size: 12px; }
.post-card-badge { display: none; }

/* Sidebar widgets */
.sidebar { position: sticky; top: 110px; display: grid; gap: 20px; }
.widget {
  padding: 22px; background: #fff; border: 1px solid var(--ts-border);
  border-radius: 18px; box-shadow: var(--ts-shadow-soft);
}
.widget-title { margin: 0 0 14px; font-size: 28px; }
.author-widget { text-align: center; }
.author-widget-avatar img { border-radius: 50%; margin: 0 auto 12px; }
.author-widget-title { margin-bottom: 10px; }
.widget p, .widget small { color: var(--ts-muted); }
.widget-link { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--ts-accent-2); }
.recent-posts-stack, .footer-recent-stack { display: grid; gap: 12px; }
.list-post { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; }
.list-post-media, .list-post-media img { width: 100%; height: 72px; }
.list-post-media img, .list-post-media .post-card-placeholder {
  object-fit: cover; border-radius: 12px;
}
.list-post-title { font-size: 15px; line-height: 1.35; margin: 0 0 4px; }
.list-post-meta { color: var(--ts-muted); font-size: 12px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget_categories li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--ts-border); font-size: 14px;
}
.widget_categories li:last-child { border-bottom: 0; }
.widget_categories .children { margin-top: 8px; padding-left: 14px; }
.social-follow-grid { display: grid; gap: 10px; }
.social-follow-grid a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; color: #fff; font-weight: 700;
}
.social-follow-grid a:nth-child(1) { background: #1d9bf0; }
.social-follow-grid a:nth-child(2) { background: #0a66c2; }
.social-follow-grid a:nth-child(3) { background: #ff3b30; }
.social-follow-grid a:nth-child(4) { background: #8a63ff; }
.newsletter-form { display: grid; gap: 10px; }
.newsletter-form button { width: 100%; }

/* Promo banner */
.promo-banner {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: center;
  padding: 28px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #dde9ff 0%, #ffffff 12%, #f6fbff 18%, #dfefff 100%);
  border: 1px solid #cddffd; margin: 30px 0 34px;
}
.promo-banner-content h2 { font-size: clamp(34px, 4vw, 46px); margin-bottom: 8px; }
.promo-banner-content p { color: #617089; margin-bottom: 0; max-width: 650px; }
.promo-eyebrow { display: inline-flex; margin-bottom: 10px; color: var(--ts-accent-2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.promo-form { display: grid; gap: 10px; }
.promo-form input { background: #fff; }

/* Archive / generic content */
.site-main { min-height: 50vh; }
.archive-main, .page-main, .single-main { padding: 36px 0 20px; }
.archive-header, .page-card {
  padding: 28px; border-radius: 20px; border: 1px solid var(--ts-border); background: #fff; box-shadow: var(--ts-shadow-soft);
}
.archive-title, .entry-title { font-size: clamp(34px, 5vw, 54px); margin-bottom: 12px; }
.archive-description, .entry-deck { color: var(--ts-muted); max-width: 820px; }
.archive-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: var(--ts-muted); font-size: 13px; }
.single-layout, .content-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.single-article { min-width: 0; }
.article-header { margin-bottom: 24px; }
.entry-category { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.entry-category a {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px;
  background: #e9f8f6; color: #0e9387; font-size: 12px; font-weight: 800; text-transform: uppercase;
}
.entry-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  color: var(--ts-muted); font-size: 14px; margin-top: 14px;
}
.author-chip { display: flex; align-items: center; gap: 10px; color: var(--ts-heading); font-weight: 700; }
.author-chip img { border-radius: 50%; }
.article-hero { overflow: hidden; border-radius: 22px; margin-bottom: 28px; }
.article-hero img { width: 100%; max-height: 640px; object-fit: cover; }
.entry-content {
  background: #fff; border: 1px solid var(--ts-border); border-radius: 20px; box-shadow: var(--ts-shadow-soft);
  padding: 28px;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 34px; margin-top: 1.5em; }
.entry-content h3 { font-size: 26px; margin-top: 1.35em; }
.entry-content a { color: var(--ts-accent-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  margin: 1.5em 0; padding: 18px 20px; border-left: 4px solid var(--ts-accent-2);
  border-radius: 0 16px 16px 0; background: #f4f8ff;
}
.entry-content pre {
  background: #0f172a; color: #f8fafc; padding: 18px; overflow: auto; border-radius: 16px;
}
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--ts-border); padding: 10px 12px; text-align: left; }
.entry-content th { background: #f8fbff; }
.article-tags, .post-nav, .author-box, .comments-area, .related-posts { margin-top: 28px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a {
  padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--ts-border); font-size: 13px; color: var(--ts-muted);
}
.author-box {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--ts-border); box-shadow: var(--ts-shadow-soft);
}
.author-box img { border-radius: 18px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-nav a {
  display: block; padding: 16px; border-radius: 16px; border: 1px solid var(--ts-border); background: #fff; box-shadow: var(--ts-shadow-soft);
}
.post-nav .label { display: block; color: var(--ts-muted); font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.post-nav strong { display: block; margin-top: 6px; color: var(--ts-heading); }
.related-posts .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; gap: 18px; }
.page-card .entry-content, .page-card .entry-title { padding: 0; background: transparent; border: 0; box-shadow: none; }
.comments-area { padding: 22px; border-radius: 18px; border: 1px solid var(--ts-border); background: #fff; box-shadow: var(--ts-shadow-soft); }
.comment-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.comment-list .children { list-style: none; margin-top: 16px; padding-left: 24px; }
.comment-body { padding: 18px; border: 1px solid var(--ts-border); border-radius: 16px; background: #fff; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; }
.comment-meta { font-size: 13px; color: var(--ts-muted); }
.comment-content { margin-top: 10px; }
.comment-respond { margin-top: 24px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.empty-state {
  padding: 60px 24px; text-align: center; border-radius: 20px; border: 1px dashed var(--ts-border); background: #fff;
}
.error-shell { padding: 50px 0; }
.error-code { font-size: clamp(70px, 13vw, 160px); line-height: .9; color: rgba(38,104,246,.15); margin: 0 0 10px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center;
  border: 1px solid var(--ts-border); border-radius: 10px; background: #fff; font-weight: 700;
}
.page-numbers.current, .page-numbers:hover { background: var(--ts-accent-2); color: #fff; border-color: var(--ts-accent-2); }

/* Footer */
.site-footer { margin-top: 24px; background: linear-gradient(180deg, #0a1628, #0f2038); color: #d9e4f3; }
.footer-newsletter-strip {
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(90deg, rgba(25,197,182,.10), rgba(38,104,246,.10));
}
.footer-newsletter-inner {
  padding: 32px 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: center;
}
.footer-newsletter-inner h2 { color: #fff; font-size: clamp(28px, 3vw, 42px); margin-bottom: 0; }
.footer-subscribe-form { display: flex; gap: 10px; }
.footer-subscribe-form input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.footer-top {
  padding: 42px 0 34px; display: grid; grid-template-columns: 1.1fr .8fr 1fr .85fr; gap: 28px;
}
.footer-branding .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.footer-brand .site-title a, .footer-title { color: #fff; }
.footer-brand p { color: #a7bbd4; }
.footer-title { font-size: 20px; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a, .footer-links li { color: #a7bbd4; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; font-size: 13px; font-weight: 700;
}
.footer-recent-stack .list-post { grid-template-columns: 62px 1fr; }
.footer-recent-stack .list-post-title a, .footer-recent-stack .list-post-meta { color: #d9e4f3; }
.footer-recent-stack .list-post-title { font-size: 14px; }
.footer-bottom {
  padding: 18px 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid rgba(255,255,255,.08); color: #95aac5; font-size: 13px;
}
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-bottom-links a { color: #95aac5; }
.footer-bottom-links a:hover { color: #fff; }

/* WordPress core */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--ts-muted); font-size: 13px; }
.sticky { outline: 0; }
.bypostauthor { outline: 0; }

/* Responsive */
@media (max-width: 1180px) {
  .post-grid.home-four-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .topbar-left span:last-child { display: none; }
  .header-inner { grid-template-columns: auto auto; }
  .primary-nav {
    position: fixed; top: 89px; left: 16px; right: 16px; z-index: 70; display: none;
    padding: 16px; background: #fff; border-radius: 18px; border: 1px solid var(--ts-border); box-shadow: var(--ts-shadow);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul, .primary-nav .menu { flex-direction: column; align-items: stretch; }
  .primary-nav a { min-height: 44px; justify-content: flex-start; }
  .menu-toggle { display: grid; }
  .header-cta { display: none; }
  .hero-layout,
  .content-with-sidebar.home-content-grid,
  .single-layout, .content-with-sidebar,
  .promo-banner,
  .footer-newsletter-inner { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
  .hero-featured-overlay { max-width: 70%; }
}
@media (max-width: 820px) {
  .topbar-inner, .footer-bottom, .section-head { flex-direction: column; align-items: flex-start; }
  .compact-card { grid-template-columns: 120px 1fr; }
  .archive-posts, .related-posts .post-grid { grid-template-columns: 1fr; }
  .footer-subscribe-form, .search-form { flex-direction: column; }
}
@media (max-width: 680px) {
  .container { width: min(var(--ts-content), calc(100% - 20px)); }
  .site-header { position: static; }
  .site-topbar { display: none; }
  .header-inner { min-height: 78px; gap: 12px; }
  .brand-text .site-title { font-size: 24px; }
  .site-tagline { display: none; }
  .icon-button, .menu-toggle { width: 40px; height: 40px; }
  .hero-featured-card { min-height: 400px; }
  .hero-featured-overlay { left: 18px; right: 18px; bottom: 18px; max-width: none; }
  .hero-featured-title { font-size: 28px; }
  .compact-card { grid-template-columns: 98px 1fr; }
  .post-grid.home-four-grid { grid-template-columns: 1fr; }
  .post-card-title { font-size: 17px; }
  .widget-title { font-size: 24px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-newsletter-inner { padding: 24px 0; }
  .footer-subscribe-form { display: grid; }
  .archive-header, .page-card, .entry-content, .comments-area, .widget, .promo-banner { padding: 18px; }
  .search-panel { padding: 18px; margin-top: 70px; }
  .post-nav { grid-template-columns: 1fr; }
}

/* ==========================================================
   Reference layout overrides - v1.2
   Matches the supplied magazine screenshot more closely.
   ========================================================== */

:root {
  --ts-content: 1180px;
  --ts-accent: #00448F;
  --ts-accent-2: #00448F;
  --ts-heading: #141923;
  --ts-text: #535d69;
  --ts-muted: #8a939e;
  --ts-bg: #ffffff;
  --ts-surface: #ffffff;
  --ts-surface-2: #f7f8f9;
  --ts-border: #edf0f2;
  --ts-shadow: 0 5px 18px rgba(15, 23, 42, .05);
  --ts-shadow-soft: 0 3px 12px rgba(15, 23, 42, .035);
}
body { background: #fff; font-size: 14px; }
.container { width: min(var(--ts-content), calc(100% - 40px)); }

/* Header as reference: date/logo/social row + centered menu row */
.site-topbar { border-bottom: 1px solid #f0f1f2; background: #fff; }
.topbar-inner.topbar-three-col {
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.topbar-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #65707d;
}
.topbar-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ts-accent); }
.topbar-branding { justify-self: center; }
.text-logo,
.footer-text-logo {
  display: inline-block;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -1px;
}
.topbar-branding .custom-logo-link img { max-height: 34px; width: auto; }
.topbar-socials {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar-socials a {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #5e6874;
  background: #f7f8f9;
  font-size: 9px;
  font-weight: 700;
}
.site-header {
  position: relative;
  top: auto;
  background: #fff;
  border-bottom: 1px solid #eff1f3;
  backdrop-filter: none;
}
.header-inner.header-nav-row {
  min-height: 50px;
  grid-template-columns: 1fr auto;
  gap: 20px;
}
.primary-nav ul,
.primary-nav .menu {
  justify-content: center;
  gap: 4px;
}
.primary-nav a {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  color: #303842;
}
.primary-nav .current-menu-item > a,
.primary-nav a:hover { color: var(--ts-accent); }
.header-actions { justify-self: end; gap: 9px; }
.header-actions .icon-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 16px;
}
.header-language { font-size: 10px; color: #5f6975; font-weight: 700; }

/* Hero exact structure */
.reference-home { padding: 0; }
.reference-hero { padding: 20px 0 24px; }
.hero-reference-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 18px;
  align-items: stretch;
}
.hero-slider {
  position: relative;
  min-width: 0;
  height: 345px;
  overflow: hidden;
  background: #0c0f14;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide-media,
.hero-slide-media img,
.hero-slide-media .post-card-placeholder {
  width: 100%;
  height: 100%;
}
.hero-slide-media img { object-fit: cover; }
.hero-slide-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,12,18,.04) 35%, rgba(8,12,18,.88) 100%);
}
.hero-slide-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
}
.hero-slide-content h1 {
  margin: 7px 0 8px;
  max-width: 90%;
  font-size: 25px;
  line-height: 1.22;
}
.hero-slide-content h1 a { color: #fff; }
.reference-category {
  color: var(--ts-accent);
  font-size: 10px;
  font-weight: 800;
}
.reference-category::before { content: "•"; margin-right: 5px; }
.reference-meta {
  color: #9098a2;
  font-size: 10px;
  line-height: 1.5;
}
.hero-slide-content .reference-meta { color: rgba(255,255,255,.72); }
.reference-meta span { margin: 0 3px; }
.hero-arrows {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  display: flex;
  gap: 4px;
}
.hero-arrow {
  width: 26px;
  height: 26px;
  border: 0;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}
.hero-side-posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 13px 18px;
}
.hero-side-posts .compact-card {
  grid-template-columns: 102px 1fr;
  gap: 11px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  min-height: 100px;
}
.hero-side-posts .compact-card-media,
.hero-side-posts .compact-card-media img,
.hero-side-posts .compact-card-media .post-card-placeholder { height: 100px; }
.hero-side-posts .compact-card-media img,
.hero-side-posts .compact-card-media .post-card-placeholder { border-radius: 0; object-fit: cover; }
.hero-side-posts .compact-card-title {
  margin: 3px 0 4px;
  font-size: 13px;
  line-height: 1.32;
  letter-spacing: -.01em;
}
.hero-side-posts .compact-card-meta { font-size: 9px; }
.hero-side-posts .card-tax.small { font-size: 9px; }

/* Main/sidebar split */
.reference-content-area { padding: 4px 0 0; }
.reference-main-sidebar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
  align-items: start;
}
.reference-main-column { min-width: 0; }
.reference-section { margin: 0 0 34px; }
.reference-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eff1f2;
}
.reference-section-head h2 {
  margin: 0 0 2px;
  font-size: 17px;
  letter-spacing: -.02em;
}
.reference-section-head p {
  margin: 0;
  color: #8e969f;
  font-size: 9px;
}
.reference-view-link {
  white-space: nowrap;
  font-size: 9px;
  color: #232c35;
  font-weight: 700;
}
.reference-view-link span { color: var(--ts-accent); margin-left: 4px; }
.reference-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px 18px;
}
.reference-home .post-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.reference-home .post-card-media,
.reference-home .post-card-media img,
.reference-home .post-card-media .post-card-placeholder { border-radius: 0; }
.reference-home .post-card-media img {
  aspect-ratio: 1.42 / 1;
  object-fit: cover;
}
.reference-home .post-card-body { padding: 8px 0 0; }
.reference-home .post-card-title {
  margin: 3px 0 5px;
  font-size: 13px;
  line-height: 1.34;
  letter-spacing: -.01em;
}
.reference-home .post-card-excerpt { display: none; }
.reference-home .post-card-meta { margin-top: 0; gap: 4px; font-size: 9px; }
.reference-home .card-tax { font-size: 9px; }

/* Buy-and-sell inspired feature mosaic */
.feature-news-layout {
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 15px 18px;
}
.feature-news-large { min-width: 0; }
.feature-news-media {
  position: relative;
  display: block;
  height: 305px;
  overflow: hidden;
  background: #f1f3f5;
}
.feature-news-media img,
.feature-news-media .post-card-placeholder { width: 100%; height: 100%; object-fit: cover; }
.play-dot {
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.9); border-radius: 50%;
  background: rgba(0,0,0,.25); color: #fff; font-size: 11px;
}
.feature-news-large-body { padding-top: 10px; }
.feature-news-large-body h3 { margin: 3px 0 5px; font-size: 14px; }
.feature-news-list {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}
.feature-news-list .compact-card,
.feature-news-bottom .compact-card,
.review-list-grid .compact-card,
.best-side-grid .compact-card {
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.feature-news-list .compact-card-media,
.feature-news-list .compact-card-media img,
.feature-news-list .compact-card-media .post-card-placeholder { height: 82px; }
.feature-news-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 2px;
}
.feature-news-bottom .compact-card-media,
.feature-news-bottom .compact-card-media img,
.feature-news-bottom .compact-card-media .post-card-placeholder { height: 76px; }
.compact-card-title { font-size: 12px; line-height: 1.35; }
.compact-card-meta { font-size: 9px; }

/* Ad banners */
.reference-ad-banner {
  min-height: 160px;
  margin: 10px 0 36px;
  padding: 26px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 82% 30%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(120deg, #10607a 0%, #2f4e8c 48%, #814d8e 100%);
}
.reference-ad-banner::after {
  content: "AI";
  position: absolute;
  right: 34px;
  bottom: -30px;
  font-size: 130px;
  font-weight: 900;
  color: rgba(255,255,255,.08);
  letter-spacing: -.12em;
}
.reference-ad-banner > * { position: relative; z-index: 2; }
.reference-ad-banner span { color: #55e4d1; font-size: 10px; font-weight: 800; }
.reference-ad-banner h2 { margin: 4px 0 4px; color: #fff; font-size: 30px; }
.reference-ad-banner p { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; }
.reference-ad-banner > a {
  color: #fff;
  border: 1px solid rgba(255,255,255,.65);
  padding: 9px 13px;
  font-size: 10px;
  font-weight: 700;
}
.reference-ad-two { background: linear-gradient(120deg, #37749a 0%, #4b88a6 45%, #d39b72 100%); }

/* Reviews structure */
.review-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}
.review-feature-grid .post-card-media img { aspect-ratio: 1.8 / 1; }
.review-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.review-list-grid .compact-card-media,
.review-list-grid .compact-card-media img,
.review-list-grid .compact-card-media .post-card-placeholder { height: 70px; }

/* Best section */
.best-layout {
  display: grid;
  grid-template-columns: 46% 54%;
  gap: 18px;
}
.best-feature-media { display: block; height: 230px; }
.best-feature-media img,
.best-feature-media .post-card-placeholder { width: 100%; height: 100%; object-fit: cover; }
.best-feature-body { padding-top: 9px; }
.best-feature-body h3 { margin: 3px 0 5px; font-size: 14px; }
.best-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.best-side-grid .compact-card { grid-template-columns: 100px 1fr; }
.best-side-grid .compact-card-media,
.best-side-grid .compact-card-media img,
.best-side-grid .compact-card-media .post-card-placeholder { height: 72px; }

/* Sidebar exact visual language */
.reference-sidebar {
  position: static;
  display: grid;
  gap: 22px;
}
.reference-widget {
  position: relative;
  padding: 22px 15px 16px;
  border: 1px solid #eceff1;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.reference-widget .widget-label {
  position: absolute;
  left: 0;
  top: -12px;
  min-width: 90px;
  padding: 6px 10px;
  color: #fff;
  background: var(--ts-accent);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}
.author-widget { text-align: center; padding-top: 28px; }
.author-widget-avatar img { width: 58px; height: 58px; margin: 2px auto 9px; border-radius: 50%; }
.author-widget-title { margin: 0 0 7px; font-size: 13px; }
.author-widget p { margin: 0 auto 10px; max-width: 150px; font-size: 9px; line-height: 1.5; color: #777f88; }
.author-social-row { display: flex; justify-content: center; gap: 10px; margin: 9px 0; }
.author-social-row span { font-size: 8px; color: #78828b; }
.widget-more-link { color: var(--ts-accent); font-size: 9px; font-weight: 700; }
.reference-widget .recent-posts-stack { gap: 9px; }
.reference-widget .list-post { grid-template-columns: 50px 1fr; gap: 8px; }
.reference-widget .list-post-media,
.reference-widget .list-post-media img,
.reference-widget .list-post-media .post-card-placeholder { height: 44px; }
.reference-widget .list-post-title { font-size: 9px; line-height: 1.4; margin: 0 0 2px; }
.reference-widget .list-post-meta { font-size: 8px; }
.reference-widget.widget_categories li {
  padding: 6px 0;
  border: 0;
  font-size: 9px;
  color: #606972;
}
.reference-widget.widget_categories li a { color: #4a535c; }
.social-mini-list { display: grid; gap: 9px; }
.social-mini-list a {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  color: #6f7881;
}
.social-mini-list strong { color: #4b5560; font-size: 8px; }
.social-dot {
  width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%;
  background: #f4f6f8; color: #4f5963; font-weight: 700;
}
.twitter-widget { text-align: center; }
.update-icon,
.newsletter-round-icon {
  width: 36px; height: 36px; margin: 3px auto 10px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ts-accent); color: #fff; font-weight: 800;
}
.twitter-widget p,
.newsletter-widget p { font-size: 9px; line-height: 1.55; color: #777f88; }
.newsletter-widget { text-align: center; }
.newsletter-widget h3 { margin: 0 0 10px; font-size: 11px; }
.newsletter-form { gap: 7px; }
.newsletter-form input { min-height: 32px; border-radius: 0; font-size: 8px; padding: 0 9px; }
.newsletter-form button { min-height: 32px; border-radius: 0; background: #2d3339; font-size: 8px; }

/* Gallery/footer strip */
.footer-gallery {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  height: 120px;
  overflow: hidden;
  background: #0c1420;
}
.footer-gallery a,
.footer-gallery img,
.footer-gallery .post-card-placeholder { width: 100%; height: 100%; }
.footer-gallery img { object-fit: cover; }
.footer-gallery .post-card-placeholder { display: grid; place-items: center; background: #1d3855; color: #fff; }
.site-footer { margin-top: 0; background: #1d2430; color: #cfd6dd; }
.footer-newsletter-strip { border-bottom: 0; background: #1d2430; }
.reference-footer-newsletter {
  min-height: 100px;
  padding: 24px 0 18px;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: center;
}
.footer-newsletter-kicker { display: block; color: var(--ts-accent); font-size: 9px; font-weight: 800; margin-bottom: 4px; }
.reference-footer-newsletter h2 { margin: 0; color: #fff; font-size: 18px; line-height: 1.2; }
.footer-subscribe-form { max-width: 520px; display: flex; justify-self: end; width: 100%; }
.footer-subscribe-form input {
  min-height: 38px; border: 1px solid #343c49; border-radius: 0; background: #252d3a; color: #fff; font-size: 9px;
}
.footer-subscribe-form button {
  min-width: 105px; min-height: 38px; border-radius: 0; background: var(--ts-accent); font-size: 9px;
}
.reference-footer-grid {
  padding: 22px 0 26px;
  grid-template-columns: 1.1fr 1fr .75fr .95fr;
  gap: 34px;
}
.footer-text-logo { color: #fff; font-size: 24px; margin-bottom: 10px; }
.footer-brand p { max-width: 205px; margin: 0 0 12px; color: #9ca8b5; font-size: 9px; line-height: 1.6; }
.footer-socials { gap: 7px; }
.footer-socials a { width: 24px; height: 24px; font-size: 8px; background: #2a3341; }
.footer-title { margin: 0 0 13px; font-size: 11px; color: #fff; }
.footer-links { gap: 7px; }
.footer-links a,
.footer-links li { font-size: 9px; color: #a5b0bc; }
.footer-recent-stack { gap: 7px; }
.footer-recent-stack .list-post { grid-template-columns: 42px 1fr; gap: 7px; }
.footer-recent-stack .list-post-media,
.footer-recent-stack .list-post-media img,
.footer-recent-stack .list-post-media .post-card-placeholder { height: 34px; }
.footer-recent-stack .list-post-title { font-size: 8px; line-height: 1.3; }
.footer-recent-stack .list-post-meta { font-size: 7px; color: #7f8b98; }
.footer-contact-list li { display: flex; gap: 7px; align-items: flex-start; }
.footer-contact-list span { color: var(--ts-accent); }
.footer-bottom {
  min-height: 42px;
  padding: 13px 0;
  justify-content: center;
  border-top: 1px solid #2c3440;
  font-size: 8px;
  color: #8995a2;
  position: relative;
}
.scroll-top {
  position: absolute;
  right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ts-accent); color: #fff;
  font-size: 12px;
}

/* Keep archive/single readable while using compact global header */
.archive-shell,
.single-shell,
.page-shell { padding: 32px 0; }
.archive-shell .content-with-sidebar,
.single-shell.content-with-sidebar { grid-template-columns: minmax(0,1fr) 260px; }
.archive-shell .sidebar,
.single-shell .sidebar { position: sticky; top: 20px; }

@media (max-width: 1100px) {
  .hero-reference-grid { grid-template-columns: 44% 56%; }
  .hero-side-posts .compact-card { grid-template-columns: 88px 1fr; }
  .reference-main-sidebar-grid { grid-template-columns: minmax(0,1fr) 180px; gap: 22px; }
}
@media (max-width: 940px) {
  .topbar-inner.topbar-three-col { grid-template-columns: 1fr auto 1fr; }
  .header-inner.header-nav-row { grid-template-columns: 1fr auto; }
  .menu-toggle { display: grid; width: 30px; height: 30px; border: 0; }
  .primary-nav {
    position: fixed;
    top: 104px;
    left: 14px;
    right: 14px;
    z-index: 90;
    display: none;
    padding: 14px;
    background: #fff;
    border: 1px solid #edf0f2;
    box-shadow: 0 10px 28px rgba(0,0,0,.1);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul,
  .primary-nav .menu { flex-direction: column; align-items: stretch; }
  .primary-nav a { justify-content: flex-start; }
  .hero-reference-grid { grid-template-columns: 1fr; }
  .hero-slider { height: 390px; }
  .hero-side-posts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reference-main-sidebar-grid { grid-template-columns: 1fr; }
  .reference-sidebar {
    grid-template-columns: repeat(3, minmax(0,1fr));
    align-items: start;
  }
  .reference-widget { height: 100%; }
  .reference-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-gallery { grid-template-columns: repeat(4, minmax(0,1fr)); height: 180px; }
}
@media (max-width: 720px) {
  .container { width: min(var(--ts-content), calc(100% - 22px)); }
  .site-topbar { display: block; }
  .topbar-inner.topbar-three-col { min-height: 48px; grid-template-columns: 1fr auto; }
  .topbar-date { display: none; }
  .topbar-branding { justify-self: start; }
  .topbar-socials { justify-self: end; }
  .site-header { min-height: 44px; }
  .header-inner.header-nav-row { min-height: 44px; }
  .hero-slider { height: 330px; }
  .hero-side-posts { grid-template-columns: 1fr; }
  .hero-side-posts .compact-card { grid-template-columns: 110px 1fr; }
  .reference-grid-three { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .feature-news-layout,
  .best-layout { grid-template-columns: 1fr; }
  .feature-news-list { grid-template-rows: auto; }
  .feature-news-bottom,
  .review-feature-grid,
  .review-list-grid,
  .best-side-grid { grid-template-columns: 1fr; }
  .reference-sidebar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reference-ad-banner { min-height: 140px; padding: 22px; }
  .reference-ad-banner h2 { font-size: 24px; }
  .reference-ad-banner > a { display: none; }
  .reference-footer-newsletter { grid-template-columns: 1fr; gap: 15px; }
  .footer-subscribe-form { justify-self: stretch; max-width: none; }
  .footer-gallery { grid-template-columns: repeat(4, minmax(0,1fr)); height: 140px; }
}
@media (max-width: 520px) {
  .topbar-socials a:nth-child(n+4) { display: none; }
  .hero-slider { height: 300px; }
  .hero-slide-content { left: 16px; right: 16px; bottom: 16px; }
  .hero-slide-content h1 { font-size: 21px; max-width: 100%; }
  .reference-grid-three { grid-template-columns: 1fr; }
  .reference-section-head { align-items: flex-start; }
  .reference-section-head p { max-width: 220px; }
  .reference-sidebar { grid-template-columns: 1fr; }
  .reference-footer-grid { grid-template-columns: 1fr; }
  .footer-subscribe-form { flex-direction: column; }
  .footer-gallery { grid-template-columns: repeat(2, minmax(0,1fr)); height: 220px; }
  .scroll-top { right: 4px; }
}


/* =========================================================
   ToolScope AI 1.3 responsive layout + Customizer variables
   ========================================================= */
:root {
  --ts-sidebar-width: 300px;
  --ts-grid-gap: 38px;
  --ts-card-gap: 24px;
  --ts-section-gap: 48px;
  --ts-desktop-gutter: 32px;
  --ts-tablet-gutter: 24px;
  --ts-mobile-gutter: 18px;
  --ts-hero-height: 420px;
  --ts-mobile-thumb: 112px;
  --ts-body-size: 16px;
  --ts-tablet-size: 15px;
  --ts-mobile-size: 15px;
  --ts-nav-size: 14px;
  --ts-hero-title-size: 34px;
  --ts-section-title-size: 22px;
  --ts-card-title-size: 16px;
  --ts-compact-title-size: 15px;
  --ts-meta-size: 12px;
  --ts-single-title-size: 48px;
}

html, body { max-width: 100%; overflow-x: clip; }
body { font-size: var(--ts-body-size); }
.container {
  width: min(var(--ts-content), calc(100% - (var(--ts-desktop-gutter) * 2)));
  max-width: var(--ts-content);
}
.primary-nav a { font-size: var(--ts-nav-size); }
.reference-category,
.reference-meta,
.reference-home .card-tax,
.reference-home .post-card-meta,
.compact-card-meta { font-size: var(--ts-meta-size); }
.hero-slide-content h1 { font-size: var(--ts-hero-title-size); }
.reference-section-head h2 { font-size: var(--ts-section-title-size); }
.reference-home .post-card-title { font-size: var(--ts-card-title-size); }
.compact-card-title { font-size: var(--ts-compact-title-size); }
.entry-title { font-size: clamp(34px, 4.4vw, var(--ts-single-title-size)); }

/* Desktop: 1500px content canvas with balanced editorial spacing */
.reference-hero { padding: 30px 0 38px; }
.hero-reference-grid {
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.27fr);
  gap: 30px;
}
.hero-slider { height: var(--ts-hero-height); }
.hero-side-posts { gap: 22px 28px; }
.hero-side-posts .compact-card {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 15px;
  min-height: 112px;
}
.hero-side-posts .compact-card-media,
.hero-side-posts .compact-card-media img,
.hero-side-posts .compact-card-media .post-card-placeholder { height: 112px; }
.hero-side-posts .compact-card-title {
  font-size: var(--ts-compact-title-size);
  line-height: 1.35;
  margin: 5px 0 7px;
}
.hero-side-posts .compact-card-meta,
.hero-side-posts .card-tax.small { font-size: var(--ts-meta-size); }
.compact-card-body,
.list-post-body,
.reference-main-column,
.reference-main-sidebar-grid > * { min-width: 0; }
.compact-card-title,
.post-card-title,
.list-post-title,
.hero-slide-content h1 { overflow-wrap: anywhere; }

.reference-content-area { padding: 6px 0 0; }
.reference-main-sidebar-grid {
  grid-template-columns: minmax(0, 1fr) var(--ts-sidebar-width);
  gap: var(--ts-grid-gap);
}
.reference-section { margin-bottom: var(--ts-section-gap); }
.reference-section-head {
  align-items: end;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.reference-section-head > div { min-width: 0; }
.reference-section-head p {
  margin-top: 6px;
  font-size: max(12px, calc(var(--ts-meta-size) + 1px));
  line-height: 1.55;
  max-width: 760px;
}
.reference-view-link {
  flex: 0 0 auto;
  padding: 7px 0;
  font-size: max(12px, var(--ts-meta-size));
}
.reference-grid-three { gap: 30px var(--ts-card-gap); }
.reference-home .post-card-body { padding-top: 11px; }
.reference-home .post-card-title {
  line-height: 1.38;
  margin: 5px 0 8px;
}
.reference-home .post-card-meta { line-height: 1.45; }

.feature-news-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px 28px;
}
.feature-news-media { height: 360px; }
.feature-news-large-body { padding-top: 13px; }
.feature-news-large-body h3,
.best-feature-body h3 { font-size: calc(var(--ts-card-title-size) + 1px); line-height: 1.38; }
.feature-news-list { gap: 17px; }
.feature-news-list .compact-card,
.feature-news-bottom .compact-card,
.review-list-grid .compact-card,
.best-side-grid .compact-card {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 15px;
}
.feature-news-list .compact-card-media,
.feature-news-list .compact-card-media img,
.feature-news-list .compact-card-media .post-card-placeholder { height: 92px; }
.feature-news-bottom { gap: 20px var(--ts-card-gap); padding-top: 8px; }
.feature-news-bottom .compact-card-media,
.feature-news-bottom .compact-card-media img,
.feature-news-bottom .compact-card-media .post-card-placeholder { height: 86px; }

.reference-ad-banner {
  min-height: 180px;
  margin: 14px 0 var(--ts-section-gap);
  padding: 34px 42px;
  gap: 28px;
}
.reference-ad-banner h2 { font-size: clamp(30px, 3vw, 42px); }
.reference-ad-banner p { font-size: max(12px, var(--ts-meta-size)); }
.reference-ad-banner span,
.reference-ad-banner > a { font-size: max(11px, var(--ts-meta-size)); }
.reference-ad-banner > a { padding: 11px 16px; }

.review-feature-grid { gap: var(--ts-card-gap); margin-bottom: 22px; }
.review-list-grid { gap: 18px var(--ts-card-gap); }
.review-list-grid .compact-card-media,
.review-list-grid .compact-card-media img,
.review-list-grid .compact-card-media .post-card-placeholder { height: 82px; }
.best-layout { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: var(--ts-card-gap); }
.best-feature-media { height: 300px; }
.best-side-grid { gap: 18px var(--ts-card-gap); }
.best-side-grid .compact-card { grid-template-columns: 124px minmax(0, 1fr); }
.best-side-grid .compact-card-media,
.best-side-grid .compact-card-media img,
.best-side-grid .compact-card-media .post-card-placeholder { height: 86px; }

/* Desktop sidebar */
.reference-sidebar { gap: 26px; }
.reference-widget { padding: 20px; }
.widget-label {
  font-size: max(12px, var(--ts-meta-size));
  margin-bottom: 17px;
}
.author-widget-title { font-size: 17px; }
.author-widget p,
.twitter-widget p,
.newsletter-widget p { font-size: 13px; line-height: 1.65; }
.widget-more-link { font-size: 12px; }
.recent-posts-stack { gap: 14px; }
.reference-widget .list-post { grid-template-columns: 82px minmax(0,1fr); gap: 12px; }
.reference-widget .list-post-media,
.reference-widget .list-post-media img,
.reference-widget .list-post-media .post-card-placeholder { height: 66px; }
.reference-widget .list-post-title { font-size: 13px; line-height: 1.38; }
.reference-widget .list-post-meta { font-size: 11px; }
.enhanced-categories li { font-size: 12px; padding: 8px 0; }
.social-mini-list a { font-size: 12px; min-height: 34px; }
.newsletter-widget h3 { font-size: 15px; }
.newsletter-form input,
.newsletter-form button { min-height: 40px; font-size: 12px; }

/* Archive/single use the same desktop width system */
.archive-shell,
.single-shell,
.page-shell { padding: 44px 0; }
.archive-shell .content-with-sidebar,
.single-shell.content-with-sidebar,
.single-shell .content-with-sidebar {
  grid-template-columns: minmax(0, 1fr) var(--ts-sidebar-width);
  gap: var(--ts-grid-gap);
}
.archive-header { margin-bottom: 30px; }
.archive-posts { gap: var(--ts-card-gap); }
.entry-content { font-size: 1em; }

/* Footer spacing and readable typography */
.footer-gallery { height: 150px; }
.reference-footer-newsletter {
  min-height: 126px;
  padding: 30px 0 24px;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 42px;
}
.footer-newsletter-kicker { font-size: 12px; }
.reference-footer-newsletter h2 { font-size: 26px; }
.footer-subscribe-form { max-width: 680px; }
.footer-subscribe-form input,
.footer-subscribe-form button { min-height: 46px; font-size: 12px; }
.footer-subscribe-form button { min-width: 130px; }
.reference-footer-grid { padding: 34px 0 40px; gap: 44px; }
.footer-text-logo { font-size: 28px; }
.footer-brand p { max-width: 300px; font-size: 12px; }
.footer-title { font-size: 15px; }
.footer-links a,
.footer-links li { font-size: 12px; }
.footer-recent-stack .list-post { grid-template-columns: 62px minmax(0,1fr); gap: 10px; }
.footer-recent-stack .list-post-media,
.footer-recent-stack .list-post-media img,
.footer-recent-stack .list-post-media .post-card-placeholder { height: 50px; }
.footer-recent-stack .list-post-title { font-size: 11px; }
.footer-recent-stack .list-post-meta { font-size: 10px; }
.footer-bottom { min-height: 54px; padding: 16px 0; font-size: 11px; }

/* Large tablets / small laptops */
@media (max-width: 1199px) {
  body { font-size: var(--ts-tablet-size); }
  .container {
    width: min(var(--ts-content), calc(100% - (var(--ts-tablet-gutter) * 2)));
  }
  .hero-reference-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-slider { height: min(var(--ts-hero-height), 430px); }
  .hero-side-posts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reference-main-sidebar-grid {
    grid-template-columns: minmax(0,1fr) minmax(250px, 280px);
    gap: 28px;
  }
  .reference-grid-three { gap: 24px 20px; }
  .feature-news-layout { gap: 22px; }
  .reference-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Tablet */
@media (max-width: 991px) {
  .reference-main-sidebar-grid,
  .archive-shell .content-with-sidebar,
  .single-shell.content-with-sidebar,
  .single-shell .content-with-sidebar { grid-template-columns: 1fr; }
  .reference-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 20px;
  }
  .reference-widget { height: auto; }
  .feature-news-media { height: 320px; }
  .best-feature-media { height: 260px; }
}

/* Mobile */
@media (max-width: 767px) {
  body { font-size: var(--ts-mobile-size); }
  .container {
    width: min(var(--ts-content), calc(100% - (var(--ts-mobile-gutter) * 2)));
  }
  .reference-hero { padding: 16px 0 24px; }
  .hero-reference-grid { gap: 18px; }
  .hero-slider { height: 290px; }
  .hero-slide-content { left: 18px; right: 18px; bottom: 18px; }
  .hero-slide-content h1 {
    font-size: clamp(23px, 7vw, var(--ts-hero-title-size));
    line-height: 1.22;
    max-width: 100%;
  }
  .hero-side-posts { grid-template-columns: 1fr; gap: 16px; }
  .hero-side-posts .compact-card,
  .feature-news-list .compact-card,
  .feature-news-bottom .compact-card,
  .review-list-grid .compact-card,
  .best-side-grid .compact-card {
    grid-template-columns: var(--ts-mobile-thumb) minmax(0, 1fr);
    gap: 14px;
    padding: 0 0 16px;
    border-bottom: 1px solid #eef1f4;
  }
  .hero-side-posts .compact-card:last-child,
  .feature-news-list .compact-card:last-child,
  .feature-news-bottom .compact-card:last-child,
  .review-list-grid .compact-card:last-child,
  .best-side-grid .compact-card:last-child { border-bottom: 0; }
  .hero-side-posts .compact-card-media,
  .hero-side-posts .compact-card-media img,
  .hero-side-posts .compact-card-media .post-card-placeholder,
  .feature-news-list .compact-card-media,
  .feature-news-list .compact-card-media img,
  .feature-news-list .compact-card-media .post-card-placeholder,
  .feature-news-bottom .compact-card-media,
  .feature-news-bottom .compact-card-media img,
  .feature-news-bottom .compact-card-media .post-card-placeholder,
  .review-list-grid .compact-card-media,
  .review-list-grid .compact-card-media img,
  .review-list-grid .compact-card-media .post-card-placeholder,
  .best-side-grid .compact-card-media,
  .best-side-grid .compact-card-media img,
  .best-side-grid .compact-card-media .post-card-placeholder {
    width: var(--ts-mobile-thumb);
    height: 88px;
    object-fit: cover;
  }
  .compact-card-title,
  .hero-side-posts .compact-card-title {
    font-size: max(14px, var(--ts-compact-title-size));
    line-height: 1.35;
    margin: 4px 0 7px;
  }
  .compact-card-meta,
  .hero-side-posts .compact-card-meta,
  .hero-side-posts .card-tax.small,
  .reference-category,
  .reference-meta { font-size: max(10px, calc(var(--ts-meta-size) - 1px)); }

  .reference-section { margin-bottom: max(34px, calc(var(--ts-section-gap) * .75)); }
  .reference-section-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: end;
    gap: 8px 14px;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .reference-section-head h2 {
    font-size: clamp(20px, 5.8vw, var(--ts-section-title-size));
    line-height: 1.2;
  }
  .reference-section-head p {
    max-width: none;
    font-size: 12px;
    line-height: 1.5;
  }
  .reference-view-link {
    align-self: start;
    font-size: 11px;
    padding-top: 3px;
  }
  .reference-grid-three,
  .review-feature-grid,
  .feature-news-bottom,
  .review-list-grid,
  .best-side-grid { grid-template-columns: 1fr; gap: 22px; }
  .reference-home .post-card-title { font-size: max(15px, var(--ts-card-title-size)); }
  .reference-home .post-card-media img { aspect-ratio: 16 / 9; }

  .feature-news-layout,
  .best-layout { grid-template-columns: 1fr; gap: 20px; }
  .feature-news-media,
  .best-feature-media {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .feature-news-media img,
  .feature-news-media .post-card-placeholder,
  .best-feature-media img,
  .best-feature-media .post-card-placeholder { height: 100%; }
  .feature-news-list { gap: 0; }
  .feature-news-bottom { padding-top: 2px; }

  .reference-ad-banner {
    min-height: 0;
    padding: 26px 20px;
    margin: 6px 0 38px;
    display: grid;
    justify-items: start;
  }
  .reference-ad-banner h2 { font-size: clamp(25px, 7vw, 34px); line-height: 1.12; }
  .reference-ad-banner p { font-size: 12px; }
  .reference-ad-banner > a { display: inline-flex; font-size: 11px; }
  .reference-ad-banner::after { right: 16px; font-size: 100px; }

  .reference-sidebar { grid-template-columns: 1fr; gap: 18px; }
  .reference-widget { padding: 18px; }
  .reference-widget .list-post { grid-template-columns: 76px minmax(0,1fr); }
  .reference-widget .list-post-media,
  .reference-widget .list-post-media img,
  .reference-widget .list-post-media .post-card-placeholder { height: 62px; }

  .archive-shell,
  .single-shell,
  .page-shell { padding: 28px 0; }
  .archive-header,
  .page-card,
  .entry-content,
  .comments-area { padding: 20px; }
  .archive-posts,
  .related-posts .post-grid { grid-template-columns: 1fr; }
  .entry-title { font-size: clamp(30px, 9vw, var(--ts-single-title-size)); }

  .footer-gallery { grid-template-columns: repeat(4, minmax(0,1fr)); height: 150px; }
  .reference-footer-newsletter { grid-template-columns: 1fr; gap: 16px; padding: 26px 0; }
  .reference-footer-newsletter h2 { font-size: 24px; }
  .footer-subscribe-form { max-width: none; justify-self: stretch; }
  .reference-footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 30px 0; }
  .footer-brand p { max-width: 100%; }
}

@media (max-width: 520px) {
  .topbar-socials a:nth-child(n+4) { display: none; }
  .footer-gallery { grid-template-columns: repeat(2, minmax(0,1fr)); height: 200px; }
  .footer-subscribe-form { flex-direction: column; }
  .footer-subscribe-form button { width: 100%; }
  .scroll-top { right: 4px; }
}


/* =========================================================
   v1.4.0 — review-grid spacing + metadata overflow repair
   ========================================================= */

/* Metadata should never turn into a long overflowing line. */
.reference-meta,
.post-card-meta,
.compact-card-meta,
.list-post-meta {
  overflow-wrap: normal;
  word-break: normal;
}

/* Match the open editorial spacing of the reference layout on desktop. */
@media (min-width: 1200px) {
  .reviews-section .review-feature-grid {
    column-gap: 28px;
    row-gap: 28px;
    margin-bottom: 34px;
  }

  .reviews-section .review-feature-grid .post-card-body {
    padding-top: 13px;
  }

  .reviews-section .review-list-grid {
    column-gap: 42px;
    row-gap: 34px;
  }

  .reviews-section .review-list-grid .compact-card {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    min-height: 126px;
  }

  .reviews-section .review-list-grid .compact-card-media,
  .reviews-section .review-list-grid .compact-card-media img,
  .reviews-section .review-list-grid .compact-card-media .post-card-placeholder {
    width: 180px;
    height: 126px;
    object-fit: cover;
  }

  .reviews-section .review-list-grid .compact-card-body {
    padding: 5px 0 0;
    min-width: 0;
  }

  .reviews-section .review-list-grid .compact-card-title {
    margin: 7px 0 10px;
    line-height: 1.42;
  }

  .reviews-section .review-list-grid .compact-card-meta {
    margin-top: 0;
    line-height: 1.55;
  }
}

/* Tablet: keep generous spacing without making the text column too narrow. */
@media (min-width: 768px) and (max-width: 1199px) {
  .reviews-section .review-feature-grid {
    gap: 24px;
    margin-bottom: 28px;
  }

  .reviews-section .review-list-grid {
    gap: 28px 26px;
  }

  .reviews-section .review-list-grid .compact-card {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .reviews-section .review-list-grid .compact-card-media,
  .reviews-section .review-list-grid .compact-card-media img,
  .reviews-section .review-list-grid .compact-card-media .post-card-placeholder {
    width: 150px;
    height: 108px;
    object-fit: cover;
  }
}

/* Mobile: clear separation between stories, matching the reference rhythm. */
@media (max-width: 767px) {
  .reviews-section .review-feature-grid {
    gap: 28px;
    margin-bottom: 30px;
  }

  .reviews-section .review-list-grid {
    gap: 0;
  }

  .reviews-section .review-list-grid .compact-card {
    margin: 0;
    padding: 0 0 20px;
  }

  .reviews-section .review-list-grid .compact-card + .compact-card {
    padding-top: 20px;
  }

  .reviews-section .review-list-grid .compact-card:last-child {
    padding-bottom: 0;
  }
}

/* The large-feature + stacked-stories section follows the same roomy rhythm. */
@media (min-width: 1200px) {
  .feature-news-layout {
    column-gap: 34px;
    row-gap: 32px;
  }

  .feature-news-media {
    height: 390px;
  }

  .feature-news-list {
    gap: 26px;
  }

  .feature-news-list .compact-card,
  .feature-news-bottom .compact-card {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .feature-news-list .compact-card-media,
  .feature-news-list .compact-card-media img,
  .feature-news-list .compact-card-media .post-card-placeholder,
  .feature-news-bottom .compact-card-media,
  .feature-news-bottom .compact-card-media img,
  .feature-news-bottom .compact-card-media .post-card-placeholder {
    width: 170px;
    height: 118px;
    object-fit: cover;
  }

  .feature-news-bottom {
    gap: 30px 34px;
    padding-top: 14px;
  }
}

/* =========================================================
   Single post reference layout v1.4
   ========================================================= */
.single-reference-page {
  background: #fff;
}
.single-title-banner {
  position: relative;
  min-height: var(--ts-single-banner-height, 270px);
  display: grid;
  place-items: center;
  background-color: #111923;
  background-size: cover;
  background-position: center 48%;
  overflow: hidden;
}
.single-title-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,10,16,.80), rgba(10,15,21,.70), rgba(5,10,16,.80));
}
.single-title-banner-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 34px var(--ts-desktop-gutter, 32px);
}
.single-banner-title {
  max-width: 1120px;
  margin: 0 auto 18px;
  color: #fff;
  font-size: clamp(34px, 3.7vw, var(--ts-single-title-size, 48px));
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.single-banner-breadcrumbs {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.35;
}
.single-banner-breadcrumbs a { color: #fff; }
.single-banner-breadcrumbs a:hover { color: var(--ts-accent); }
.single-banner-breadcrumbs span:last-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.single-reference-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--ts-single-article-width, 940px)) var(--ts-sidebar-width, 300px);
  justify-content: center;
  align-items: start;
  gap: var(--ts-single-gap, 48px);
  padding-top: 64px;
  padding-bottom: 76px;
}
.single-reference-article { min-width: 0; }
.single-reference-featured {
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf2f7;
}
.single-reference-featured img {
  width: 100%;
  aspect-ratio: 16 / 9.6;
  object-fit: cover;
}
.single-reference-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 24px;
  padding: 0 0 22px;
  color: #8995a5;
  font-size: 13px;
  border-bottom: 1px solid #eef1f4;
}
.single-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8995a5;
}
.single-meta-item span[aria-hidden="true"] { color: var(--ts-accent-2); }
.single-meta-item:hover { color: var(--ts-accent-2); }

.single-reference-content.entry-content {
  padding: 24px 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #667383;
  font-size: 15px;
  line-height: 1.85;
}
.single-reference-content.entry-content p { margin: 0 0 22px; }
.single-reference-content.entry-content h2,
.single-reference-content.entry-content h3,
.single-reference-content.entry-content h4 {
  color: #1c2430;
  margin-top: 1.55em;
  margin-bottom: .65em;
}
.single-reference-content.entry-content h2 { font-size: 30px; }
.single-reference-content.entry-content h3 { font-size: 24px; }
.single-reference-content.entry-content img {
  border-radius: 3px;
}
.single-reference-content.entry-content .wp-block-gallery,
.single-reference-content.entry-content .gallery {
  margin-top: 26px;
  margin-bottom: 26px;
  gap: 18px;
}
.single-reference-content.entry-content blockquote,
.single-reference-content.entry-content .wp-block-quote {
  position: relative;
  margin: 28px 0;
  padding: 32px 36px 32px 78px;
  border: 0;
  border-radius: 5px;
  background: var(--ts-accent-2);
  color: #fff;
  box-shadow: none;
}
.single-reference-content.entry-content blockquote::before,
.single-reference-content.entry-content .wp-block-quote::before {
  content: "“";
  position: absolute;
  top: 20px;
  left: 28px;
  color: rgba(255,255,255,.96);
  font-size: 70px;
  line-height: 1;
  font-family: Georgia, serif;
  font-weight: 700;
}
.single-reference-content.entry-content blockquote p,
.single-reference-content.entry-content .wp-block-quote p {
  color: #fff;
  margin-bottom: 0;
  font-weight: 600;
}
.single-reference-content.entry-content blockquote cite,
.single-reference-content.entry-content .wp-block-quote cite { color: rgba(255,255,255,.8); }

.single-taxonomy-row {
  margin-top: 30px;
  display: grid;
  gap: 13px;
  padding-top: 22px;
  border-top: 1px solid #eef1f4;
}
.single-taxonomy-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.single-taxonomy-label {
  color: #2d3642;
  font-size: 13px;
  font-weight: 700;
}
.single-taxonomy-links { display: flex; flex-wrap: wrap; gap: 8px; }
.single-taxonomy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--ts-accent-2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.single-taxonomy-links a:hover { background: #1551c8; color: #fff; }

.single-related-posts {
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid #edf0f4;
}
.single-related-heading { margin-bottom: 20px; }
.single-related-heading .section-title { font-size: 26px; }
.single-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
}
.single-related-grid .post-card {
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #e8edf2;
}
.single-related-grid .post-card-media img { aspect-ratio: 1.5 / 1; }
.single-related-grid .post-card-body { padding: 14px; }
.single-related-grid .post-card-title { font-size: 15px; }
.single-related-grid .post-card-excerpt { display: none; }

/* Single post sidebar */
.single-reference-sidebar {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 24px;
}
.single-reference-widget {
  padding: 24px;
  border: 1px solid #e3e7ec;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}
.single-widget-title {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 12px;
  color: #1d2733;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.single-widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 2px;
  background: var(--ts-accent-2);
}
.single-search-widget .search-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  gap: 0;
}
.single-search-widget .search-form label { min-width: 0; }
.single-search-widget .search-field {
  min-height: 46px;
  border-radius: 24px 0 0 24px;
  border-right: 0;
  padding-left: 17px;
}
.single-search-widget .search-submit {
  width: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
  font-size: 0;
}
.single-search-widget .search-submit::after {
  content: "⌕";
  font-size: 18px;
}
.single-category-list,
.single-category-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.single-category-list > li {
  position: relative;
  padding: 10px 0 10px 15px;
  border-bottom: 1px solid #edf0f3;
  color: #596675;
  font-size: 13px;
}
.single-category-list > li:last-child { border-bottom: 0; }
.single-category-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 4px;
  height: 4px;
  background: var(--ts-accent-2);
  border-radius: 50%;
}
.single-category-list a { color: #596675; }
.single-category-list .children { padding-left: 12px; margin-top: 7px; }
.single-recent-posts { display: grid; gap: 13px; }
.single-recent-item {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  gap: 11px;
  align-items: center;
}
.single-recent-thumb,
.single-recent-thumb img,
.single-recent-placeholder {
  width: 58px;
  height: 48px;
}
.single-recent-thumb img,
.single-recent-placeholder {
  object-fit: cover;
  border-radius: 3px;
}
.single-recent-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,var(--ts-accent-2),var(--ts-accent));
  color: #fff;
  font-weight: 800;
}
.single-recent-item h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
}
.single-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.single-tag-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--ts-accent-2);
  color: #fff;
  font-size: 12px !important;
  font-weight: 600;
}
.single-tag-cloud a:hover { background: #1551c8; color: #fff; }
.single-promo-widget {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: #fff;
  background: linear-gradient(160deg, #e9eef5 0 42%, #5a48dd 42% 100%);
}
.single-promo-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 0 44%, rgba(255,216,0,.94) 44% 47%, transparent 47%);
  pointer-events: none;
}
.single-promo-art {
  position: absolute;
  top: 35px;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg,#00448F,#00448F);
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 16px 35px rgba(38,104,246,.22);
}
.single-promo-widget h2,
.single-promo-widget p,
.single-promo-widget .single-promo-button { position: relative; z-index: 1; }
.single-promo-widget h2 { margin-bottom: 7px; color: #fff; font-size: 22px; }
.single-promo-widget p { margin-bottom: 14px; color: rgba(255,255,255,.85); font-size: 13px; }
.single-promo-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 4px;
  background: #ffd500;
  color: #201a66;
  font-size: 12px;
  font-weight: 800;
}
.single-promo-button:hover { color: #201a66; filter: brightness(.96); }

/* Comment form matching the reference */
.single-comments-area.comments-area {
  margin-top: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.single-comments-area .comments-title,
.single-comments-area .comment-reply-title {
  margin: 0 0 22px;
  color: #1d2733;
  font-size: 22px;
}
.single-comments-area .comment-list { margin-bottom: 34px; }
.single-comments-area .comment-body {
  border-color: #e6eaf0;
  border-radius: 5px;
  box-shadow: none;
}
.single-comments-area .comment-respond { margin-top: 0; padding: 0; border: 0; background: transparent; }
.single-comments-area .comment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 15px 22px;
}
.single-comments-area .comment-form-author,
.single-comments-area .comment-form-email { grid-column: span 1; }
.single-comments-area .comment-form-url,
.single-comments-area .comment-form-comment,
.single-comments-area .comment-notes,
.single-comments-area .logged-in-as,
.single-comments-area .comment-form-cookies-consent,
.single-comments-area .form-submit { grid-column: 1 / -1; }
.single-comments-area .comment-form input:not([type="checkbox"]),
.single-comments-area .comment-form textarea {
  width: 100%;
  border: 1px solid #e2e7ed;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  box-shadow: none;
  outline: 0;
}
.single-comments-area .comment-form input:not([type="checkbox"]) {
  min-height: 48px;
  padding: 0 18px;
}
.single-comments-area .comment-form textarea {
  min-height: 150px;
  padding: 17px 18px;
  border-radius: 5px;
  resize: vertical;
}
.single-comments-area .comment-form input:focus,
.single-comments-area .comment-form textarea:focus { border-color: var(--ts-accent-2); }
.single-comments-area .form-submit { margin-top: 2px; }
.single-comments-area .single-comment-submit {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ts-accent-2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1199px) {
  .single-reference-grid {
    grid-template-columns: minmax(0, 1fr) minmax(270px, var(--ts-sidebar-width, 300px));
    gap: 32px;
    padding-top: 48px;
  }
  .single-reference-content.entry-content { font-size: 14.5px; }
}
@media (max-width: 980px) {
  .single-reference-grid { grid-template-columns: 1fr; }
  .single-reference-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0,1fr));
    align-items: start;
  }
  .single-promo-widget { min-height: 330px; }
}
@media (max-width: 767px) {
  .single-title-banner { min-height: min(var(--ts-single-banner-height, 270px), 240px); }
  .single-title-banner-inner { padding: 30px var(--ts-mobile-gutter, 18px); }
  .single-banner-title { font-size: clamp(28px, 8.8vw, 40px); margin-bottom: 14px; }
  .single-banner-breadcrumbs { padding: 8px 12px; font-size: 11px; }
  .single-reference-grid { padding-top: 32px; padding-bottom: 50px; }
  .single-reference-meta { gap: 8px 15px; font-size: 12px; }
  .single-reference-content.entry-content { padding-top: 20px; font-size: 14px; line-height: 1.78; }
  .single-reference-content.entry-content blockquote,
  .single-reference-content.entry-content .wp-block-quote { padding: 26px 22px 26px 58px; }
  .single-reference-content.entry-content blockquote::before,
  .single-reference-content.entry-content .wp-block-quote::before { left: 18px; top: 18px; font-size: 52px; }
  .single-related-grid { grid-template-columns: 1fr; }
  .single-reference-sidebar { grid-template-columns: 1fr; }
  .single-comments-area .comment-form { grid-template-columns: 1fr; }
  .single-comments-area .comment-form-author,
  .single-comments-area .comment-form-email { grid-column: 1 / -1; }
}

/* =========================================================
   v1.5 Category archive: featured post + 3-column grid
   ========================================================= */
.category-archive-shell {
  padding: 44px 0 74px;
  background: var(--ts-bg);
}
.category-archive-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ts-border);
}
.category-archive-header .breadcrumbs { margin-bottom: 14px; }
.category-archive-header .archive-title {
  margin: 4px 0 8px;
  font-size: clamp(34px, 3.8vw, 58px);
  line-height: 1.04;
}
.category-archive-header .archive-description {
  max-width: 850px;
  margin: 0;
  font-size: 15px;
  color: var(--ts-muted);
}
.category-featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .8fr);
  min-height: 430px;
  overflow: hidden;
  margin-bottom: 48px;
  border: 1px solid var(--ts-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--ts-shadow-soft);
}
.category-featured-media {
  min-height: 430px;
  background: var(--ts-surface-2);
}
.category-featured-media img,
.category-featured-media .post-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}
.category-featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
}
.category-featured-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ts-accent) 12%, white);
  color: var(--ts-accent);
  font-size: var(--ts-meta-size, 12px);
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.category-featured-title {
  margin: 16px 0 13px;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1.08;
}
.category-featured-title a { color: var(--ts-heading); }
.category-featured-excerpt {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--ts-muted);
  font-size: 16px;
  line-height: 1.7;
}
.category-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--ts-muted);
  font-size: var(--ts-meta-size, 12px);
}
.category-featured-button {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ts-accent);
  color: #fff;
  font-weight: 750;
}
.category-featured-button:hover { color: #fff; filter: brightness(.96); }
.category-posts-section { margin-top: 0; }
.category-posts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.category-posts-heading h2 {
  margin: 0;
  font-size: var(--ts-section-title-size, 22px);
}
.category-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ts-card-gap, 24px);
}
.category-post-grid .post-card-media img {
  aspect-ratio: 1.62 / 1;
}
.category-post-grid .post-card-body { padding: 16px 16px 18px; }
.category-post-grid .post-card-title {
  font-size: var(--ts-card-title-size, 16px);
  line-height: 1.35;
}
.category-archive-shell .pagination { margin-top: 34px; }

/* =========================================================
   v1.5 Contact page
   ========================================================= */
.contact-page-shell {
  padding: 34px 0 70px;
  background:
    radial-gradient(circle at 82% 4%, rgba(25,197,182,.07), transparent 26%),
    linear-gradient(180deg, #fff 0, #fbfcfe 100%);
}
.contact-page-container { max-width: var(--ts-content); }
.contact-page-header { margin-bottom: 30px; }
.contact-page-header .breadcrumbs {
  margin-bottom: 20px;
  color: #637082;
}
.contact-page-heading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: center;
}
.contact-page-title {
  margin: 0 0 12px;
  font-size: clamp(40px, 4.2vw, 64px);
  line-height: 1;
}
.contact-page-intro {
  max-width: 820px;
  margin: 0;
  color: #5f6d7e;
  font-size: 16px;
  line-height: 1.8;
}
.contact-hero-art {
  position: relative;
  min-height: 145px;
}
.contact-art-headset,
.contact-art-chat,
.contact-art-box {
  position: absolute;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.contact-art-headset {
  right: 42px;
  top: 8px;
  width: 112px;
  height: 112px;
  border: 18px solid #222c39;
  border-bottom-color: transparent;
  border-radius: 50%;
  color: transparent;
  transform: rotate(-3deg);
}
.contact-art-headset::before,
.contact-art-headset::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 32px;
  height: 55px;
  border-radius: 14px;
  background: #0e8c72;
  box-shadow: inset 0 0 0 7px #1f2d3a;
}
.contact-art-headset::before { left: -28px; }
.contact-art-headset::after { right: -28px; }
.contact-art-chat {
  right: 0;
  top: 8px;
  min-width: 54px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px 8px 8px 2px;
  background: #089447;
  color: #fff;
  letter-spacing: 3px;
}
.contact-art-box {
  left: 50px;
  bottom: 3px;
  width: 92px;
  height: 60px;
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(135deg, #ffb300, #f07b00);
  color: #fff;
  box-shadow: 0 12px 28px rgba(245,145,0,.18);
}
.contact-alert {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 650;
}
.contact-alert-success {
  color: #0b6d3f;
  background: #eaf8f0;
  border: 1px solid #c9ecd7;
}
.contact-alert-error {
  color: #9b2633;
  background: #fff0f1;
  border: 1px solid #f5cdd2;
}
.contact-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: var(--ts-contact-gap, 24px);
  align-items: stretch;
}
.contact-card {
  padding: 30px;
  border: 1px solid #e3e7ec;
  border-radius: var(--ts-contact-radius, 16px);
  background: #fff;
  box-shadow: 0 5px 20px rgba(20,37,63,.035);
}
.contact-card > h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.contact-card > p {
  margin: 0 0 24px;
  color: #657286;
}
.toolscope-contact-form { display: grid; gap: 20px; }
.contact-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.contact-field { min-width: 0; }
.contact-field label {
  display: block;
  margin-bottom: 8px;
  color: #202936;
  font-size: 14px;
  font-weight: 700;
}
.contact-field label span { color: #e12d39; }
.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  background: #fff;
  color: #1d2733;
  outline: 0;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-field input,
.contact-field select { padding: 0 14px; }
.contact-field textarea {
  min-height: 148px;
  padding: 14px;
  resize: vertical;
}
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--ts-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ts-accent) 12%, transparent);
}
.contact-submit-button,
.contact-direction-button,
.contact-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  background: var(--ts-accent);
  color: #fff;
  font-weight: 750;
  box-shadow: none;
}
.contact-submit-button { justify-self: start; }
.contact-submit-button:hover,
.contact-direction-button:hover,
.contact-help-button:hover { color: #fff; background: var(--ts-accent-2); }
.contact-methods { display: grid; }
.contact-method {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid #e8ebef;
}
.contact-method:first-child { padding-top: 4px; border-top: 0; }
.contact-method-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf8ef;
  color: var(--ts-accent);
  font-size: 23px;
  font-weight: 800;
}
.contact-method h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.contact-method p {
  margin: 0 0 4px;
  color: #657286;
  line-height: 1.55;
}
.contact-method a {
  color: var(--ts-accent);
  font-weight: 750;
}
.contact-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid #e3e7ec;
  border-radius: var(--ts-contact-radius, 16px);
  background: #fff;
}
.contact-benefit {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 22px;
  border-left: 1px solid #edf0f3;
}
.contact-benefit:first-child { border-left: 0; }
.contact-benefit > span {
  font-size: 34px;
  color: var(--ts-accent);
  line-height: 1;
}
.contact-benefit h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.contact-benefit p {
  margin: 0;
  color: #687589;
  font-size: 13px;
  line-height: 1.5;
}
.contact-map-card {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  margin: 0 0 22px;
  border: 1px solid #e3e7ec;
  border-radius: var(--ts-contact-radius, 16px);
  background: #eef3f5;
}
.contact-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.contact-location-panel {
  position: relative;
  z-index: 2;
  width: min(350px, calc(100% - 40px));
  margin: 22px;
  padding: 26px;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(18,34,55,.12);
}
.contact-location-panel h2 { margin: 0 0 10px; font-size: 21px; }
.contact-location-panel p { color: #657286; }
.contact-location-panel strong { display: block; margin-bottom: 6px; color: #202936; }
.contact-direction-button { width: 100%; margin-top: 8px; }
.contact-help-bar {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: var(--ts-contact-radius, 16px);
  background: linear-gradient(90deg, #edf8ef, #f8fcf9);
  border: 1px solid #e0eee3;
}
.contact-help-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcefe2;
  color: var(--ts-accent);
  font-size: 28px;
}
.contact-help-copy h2 { margin: 0 0 4px; color: var(--ts-accent); font-size: 21px; }
.contact-help-copy p { margin: 0; color: #5f6d7e; }
.contact-help-button {
  min-width: 190px;
  background: transparent;
  color: var(--ts-accent);
  border: 1px solid var(--ts-accent);
}
.contact-help-button:hover { color: #fff; }
.contact-extra-content { margin-top: 24px; }

@media (max-width: 1100px) {
  .category-featured-post {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  }
  .category-featured-content { padding: 30px; }
  .category-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-main-grid { grid-template-columns: 1fr; }
  .contact-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-benefit:nth-child(3) { border-left: 0; border-top: 1px solid #edf0f3; }
  .contact-benefit:nth-child(4) { border-top: 1px solid #edf0f3; }
}

@media (max-width: 767px) {
  .category-archive-shell { padding: 26px 0 48px; }
  .category-archive-header { margin-bottom: 20px; padding-bottom: 18px; }
  .category-featured-post { grid-template-columns: 1fr; min-height: 0; margin-bottom: 34px; }
  .category-featured-media,
  .category-featured-media img,
  .category-featured-media .post-card-placeholder { min-height: 230px; height: 230px; }
  .category-featured-content { padding: 22px 18px 24px; }
  .category-featured-title { font-size: 28px; }
  .category-featured-excerpt { font-size: 14px; }
  .category-post-grid { grid-template-columns: 1fr; gap: 18px; }

  .contact-page-shell { padding: 24px 0 48px; }
  .contact-page-heading-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-hero-art { display: none; }
  .contact-page-title { font-size: 38px; }
  .contact-page-intro { font-size: 14px; }
  .contact-main-grid { gap: 16px; }
  .contact-card { padding: 20px 18px; }
  .contact-card > h2 { font-size: 22px; }
  .contact-form-row { grid-template-columns: 1fr; gap: 18px; }
  .contact-benefits { grid-template-columns: 1fr; }
  .contact-benefit,
  .contact-benefit:nth-child(3),
  .contact-benefit:nth-child(4) { border-left: 0; border-top: 1px solid #edf0f3; }
  .contact-benefit:first-child { border-top: 0; }
  .contact-map-card { min-height: 500px; }
  .contact-location-panel { width: calc(100% - 28px); margin: 14px; padding: 20px; }
  .contact-help-bar { grid-template-columns: 48px 1fr; padding: 20px 18px; gap: 14px; }
  .contact-help-icon { width: 44px; height: 44px; font-size: 22px; }
  .contact-help-button { grid-column: 1 / -1; width: 100%; }
}

/* =========================================================
   v1.5.2 Category archive + non-sticky single sidebar
   ========================================================= */
.category-archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ts-sidebar-width, 300px);
  gap: var(--ts-single-gap, 48px);
  align-items: start;
}
.category-archive-main { min-width: 0; }
.category-archive-layout > .sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.category-featured-post {
  position: relative;
  display: block;
  min-height: 530px;
  margin: 0 0 42px;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: #10141b;
  box-shadow: none;
}
.category-featured-media {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: #10141b;
}
.category-featured-media img,
.category-featured-media .post-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.category-featured-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,10,15,.08) 18%, rgba(7,10,15,.25) 46%, rgba(7,10,15,.90) 100%),
    linear-gradient(90deg, rgba(7,10,15,.40), transparent 58%);
}
.category-featured-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  padding: 42px 46px 40px;
  color: #fff;
}
.category-featured-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ts-accent);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.category-featured-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
}
.category-featured-title {
  max-width: 840px;
  margin: 16px 0 16px;
  font-size: clamp(34px, 3.1vw, 52px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.category-featured-title a,
.category-featured-title a:hover { color: #fff; }
.category-featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  font-weight: 600;
}
.category-featured-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.category-featured-nav {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  display: flex;
  gap: 12px;
}
.category-featured-nav a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ts-accent);
  background: #fff;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  transition: .2s ease;
}
.category-featured-nav a:hover {
  background: var(--ts-accent);
  color: #fff;
}
.category-posts-section { margin-top: 0; }
.category-posts-heading { margin-bottom: 22px; }
.category-post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ts-card-gap, 24px);
}
.category-post-grid .post-card { height: 100%; }
.category-post-grid .post-card-media img,
.category-post-grid .post-card-media .post-card-placeholder {
  aspect-ratio: 1.55 / 1;
}
.category-post-grid .post-card-body { padding: 16px 16px 18px; }

/* The single-post sidebar should scroll naturally with the page. */
.single-reference-sidebar {
  position: static !important;
  top: auto !important;
  align-self: start;
}

@media (max-width: 1180px) {
  .category-archive-layout {
    grid-template-columns: minmax(0, 1fr) minmax(250px, var(--ts-sidebar-width, 300px));
    gap: 30px;
  }
  .category-featured-post { min-height: 470px; }
  .category-featured-content { padding: 34px 34px 32px; }
  .category-featured-title { font-size: clamp(30px, 3.3vw, 44px); }
  .category-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .category-archive-layout { grid-template-columns: 1fr; }
  .category-archive-layout > .sidebar {
    position: static;
    top: auto;
  }
  .category-featured-post { min-height: 440px; }
}

@media (max-width: 767px) {
  .category-featured-post {
    min-height: 410px;
    margin-bottom: 30px;
  }
  .category-featured-content { padding: 24px 20px 24px; }
  .category-featured-label { font-size: 13px; }
  .category-featured-title {
    margin: 12px 0 14px;
    font-size: clamp(27px, 8vw, 36px);
  }
  .category-featured-meta { gap: 8px 14px; font-size: 12px; }
  .category-featured-nav { top: 14px; right: 14px; gap: 8px; }
  .category-featured-nav a { width: 40px; height: 40px; font-size: 24px; }
  .category-post-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* =========================================================
   v1.5.2 Category featured carousel + author fallback fix
   ========================================================= */
.category-featured-carousel {
  position: relative;
  min-height: 530px;
  margin: 0 0 42px;
  overflow: hidden;
  border-radius: 2px;
  background: #10141b;
}
.category-carousel-track {
  position: relative;
  width: 100%;
  min-height: inherit;
}
.category-featured-slide {
  position: absolute;
  inset: 0;
  min-height: inherit;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility .45s ease;
}
.category-featured-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.category-featured-slide .category-featured-media,
.category-featured-slide .category-featured-shade,
.category-featured-slide .category-featured-content {
  position: absolute;
}
.category-featured-slide .category-featured-media,
.category-featured-slide .category-featured-shade { inset: 0; }
.category-featured-slide .category-featured-content {
  left: 0;
  right: 0;
  bottom: 0;
}
.category-featured-carousel .category-featured-nav {
  z-index: 8;
}
.category-featured-carousel .category-featured-nav button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ts-accent);
  border-radius: 0;
  background: #fff;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.category-featured-carousel .category-featured-nav button:hover,
.category-featured-carousel .category-featured-nav button:focus-visible {
  background: var(--ts-accent);
  color: #fff;
  border-color: var(--ts-accent);
}
.category-carousel-dots {
  position: absolute;
  z-index: 8;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 7px;
}
.category-carousel-dots button {
  width: 8px;
  height: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.48);
  box-shadow: none;
}
.category-carousel-dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--ts-accent);
}

@media (max-width: 1180px) {
  .category-featured-carousel { min-height: 470px; }
}
@media (max-width: 940px) {
  .category-featured-carousel { min-height: 440px; }
}
@media (max-width: 767px) {
  .category-featured-carousel {
    min-height: 410px;
    margin-bottom: 30px;
  }
  .category-featured-carousel .category-featured-nav button {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .category-carousel-dots {
    right: 18px;
    bottom: 16px;
  }
}

/* =========================================================
   v1.6 polish: sidebar thumbnails, header, prefooter, comments
   ========================================================= */

/* Header readability and real inline search */
.topbar-date { font-size: 13px; font-weight: 600; color: #5c6774; }
.text-logo, .topbar-branding .text-logo { font-size: 36px; }
.topbar-socials { gap: 8px; }
.topbar-socials a {
  width: 28px;
  height: 28px;
  font-size: 11px;
  background: #f4f6f8;
  border: 1px solid #edf0f3;
}
.header-inner.header-nav-row {
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.primary-nav ul,
.primary-nav .menu { gap: 10px; }
.primary-nav a {
  min-height: 62px;
  padding: 0 15px;
  font-size: 15px;
  font-weight: 650;
}
.header-actions { gap: 10px; }
.header-language { font-size: 12px; }
.header-inline-search {
  width: 230px;
  height: 40px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 42px;
  overflow: hidden;
  border: 1px solid #dde3e9;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,35,65,.045);
}
.header-inline-search input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 38px;
  padding: 0 5px 0 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: 0;
  font-size: 12px;
}
.header-inline-search button {
  width: 42px;
  min-width: 42px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #17202b;
  font-size: 18px;
}
.header-inline-search:focus-within {
  border-color: var(--ts-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ts-accent) 10%, transparent);
}
.header-mobile-search { display: none !important; }

/* Right sidebar: image-led recent posts, gentle shadow and breathing room */
.reference-sidebar { gap: 28px; }
.reference-widget {
  border: 1px solid #e7ebef;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(21, 38, 63, .055);
}
.reference-widget .recent-posts-stack { gap: 0; }
.reference-widget .list-post {
  grid-template-columns: 86px minmax(0,1fr);
  gap: 13px;
  padding: 0 0 15px;
  margin: 0 0 15px;
  border-bottom: 1px solid #eef1f4;
}
.reference-widget .list-post:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.reference-widget .list-post-media,
.reference-widget .list-post-media img,
.reference-widget .list-post-media .post-card-placeholder {
  height: 66px;
  border-radius: 7px;
  object-fit: cover;
}
.reference-widget .list-post-title { font-size: 13px; line-height: 1.42; }
.reference-widget .list-post-meta { margin-top: 4px; font-size: 10px; }

/* Best AI Guides: one compact article per row in the right column */
.best-side-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  align-content: start;
}
.best-side-grid .compact-card {
  grid-template-columns: 132px minmax(0,1fr) !important;
  gap: 16px;
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid #edf0f3;
}
.best-side-grid .compact-card:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.best-side-grid .compact-card-media,
.best-side-grid .compact-card-media img,
.best-side-grid .compact-card-media .post-card-placeholder { height: 92px !important; }
.best-side-grid .compact-card-title { font-size: var(--ts-compact-title-size, 15px); }

/* Distinct prefooter vs footer */
.footer-gallery {
  height: 132px;
  background: #fff;
  border-top: 1px solid #edf0f3;
}
.footer-gallery a { opacity: .94; }
.prefooter-newsletter {
  padding: 34px 0;
  background: linear-gradient(135deg, #edfafa 0%, #f5f9ff 52%, #eef3ff 100%);
  border-top: 1px solid #e2ecef;
  border-bottom: 1px solid #dce7eb;
}
.prefooter-newsletter-card {
  min-height: 0;
  padding: 28px 34px;
  display: grid;
  grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr);
  gap: 46px;
  align-items: center;
  border: 1px solid rgba(25,197,182,.20);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 34px rgba(15,35,65,.06);
}
.prefooter-newsletter .footer-newsletter-kicker { color: var(--ts-accent); font-size: 12px; }
.prefooter-newsletter h2 { margin: 3px 0 7px; color: #111827; font-size: 27px; }
.prefooter-newsletter p { margin: 0; max-width: 520px; color: #687589; font-size: 13px; }
.prefooter-newsletter .footer-subscribe-form { max-width: none; }
.prefooter-newsletter .footer-subscribe-form input {
  min-height: 48px;
  border: 1px solid #d8e0e7;
  background: #fff;
  color: #1f2937;
}
.prefooter-newsletter .footer-subscribe-form button {
  min-height: 48px;
  background: var(--ts-accent);
}
.site-footer {
  background: #111a29;
  border-top: 0;
}
.reference-footer-grid { padding-top: 48px; padding-bottom: 44px; }
.footer-bottom { background: transparent !important; }

/* Comment form: working, visible button and correct logged-in state */
.single-comments-area {
  margin-top: 38px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.single-comments-area .comment-reply-title { margin-bottom: 14px; font-size: 25px; }
.single-comments-area .logged-in-as,
.single-comments-area .comment-notes { margin: 0 0 8px; color: #667386; font-size: 14px; }
.single-comments-area .comment-form { gap: 16px 22px; }
.single-comments-area .comment-form-comment { margin: 0; }
.single-comments-area .comment-form textarea { min-height: 190px; }
.single-comments-area .form-submit {
  width: auto;
  margin: 2px 0 0;
  justify-self: start;
}
.single-comments-area input#submit.single-comment-submit,
.single-comments-area .single-comment-submit {
  width: auto !important;
  min-width: 150px;
  min-height: 46px;
  padding: 0 24px !important;
  border: 1px solid var(--ts-accent) !important;
  border-radius: 999px !important;
  background: var(--ts-accent) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(25,197,182,.18) !important;
  opacity: 1 !important;
  cursor: pointer;
}
.single-comments-area input#submit.single-comment-submit:hover,
.single-comments-area .single-comment-submit:hover {
  background: #00386F !important;
  border-color: #00386F !important;
}

/* AI-specific contact page: no physical-location or generic customer-service blocks */
.ai-contact-page .contact-main-grid { align-items: stretch; }
.ai-contact-page .contact-card {
  box-shadow: 0 10px 30px rgba(20,37,63,.055);
}
.ai-contact-page .contact-method { padding: 18px 0; }
.ai-contact-page .contact-method-icon {
  background: #eaf9f6;
  color: #00448F;
}
.ai-contact-page .contact-help-bar {
  margin-top: 24px;
  background: linear-gradient(90deg, #eaf9f5, #f4f9ff);
  box-shadow: 0 8px 24px rgba(20,37,63,.04);
}
.ai-contact-page .contact-help-icon {
  font-size: 15px;
  font-weight: 900;
}
.ai-contact-page .contact-help-copy h2 { color: #0b8f82; }

@media (max-width: 1050px) {
  .header-inline-search { width: 185px; }
  .primary-nav a { padding: 0 10px; font-size: 14px; }
  .prefooter-newsletter-card { grid-template-columns: 1fr; gap: 20px; }
  .prefooter-newsletter .footer-subscribe-form { justify-self: stretch; }
}

@media (max-width: 880px) {
  .header-inline-search { display: none; }
  .header-mobile-search { display: grid !important; }
  .topbar-socials a { width: 26px; height: 26px; }
  .text-logo, .topbar-branding .text-logo { font-size: 32px; }
}

@media (max-width: 767px) {
  .text-logo, .topbar-branding .text-logo { font-size: 29px; }
  .primary-nav a { min-height: 48px; font-size: 15px; }
  .reference-widget { border-radius: 10px; }
  .reference-widget .list-post { grid-template-columns: 92px minmax(0,1fr); gap: 14px; }
  .reference-widget .list-post-media,
  .reference-widget .list-post-media img,
  .reference-widget .list-post-media .post-card-placeholder { height: 72px; }
  .best-side-grid .compact-card { grid-template-columns: 108px minmax(0,1fr) !important; }
  .best-side-grid .compact-card-media,
  .best-side-grid .compact-card-media img,
  .best-side-grid .compact-card-media .post-card-placeholder { height: 78px !important; }
  .prefooter-newsletter { padding: 22px 0; }
  .prefooter-newsletter-card { padding: 22px 18px; border-radius: 12px; }
  .prefooter-newsletter h2 { font-size: 23px; }
  .prefooter-newsletter .footer-subscribe-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .single-comments-area .form-submit { justify-self: stretch; width: 100%; }
  .single-comments-area input#submit.single-comment-submit,
  .single-comments-area .single-comment-submit { width: 100% !important; }
}

/* Single-post right sidebar gets the same gentle card treatment. */
.single-reference-widget {
  border-color: #e7ebef;
  box-shadow: 0 8px 26px rgba(21, 38, 63, .055);
}
.single-recent-posts { gap: 0; }
.single-recent-item {
  padding: 0 0 14px;
  margin: 0 0 14px;
  border-bottom: 1px solid #eef1f4;
}
.single-recent-item:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }


/* v1.6.1 footer restoration + primary blue */
:root {
  --ts-accent: #00448F;
  --ts-accent-2: #00448F;
}
.footer-gallery {
  border-bottom: 0;
}
.site-footer {
  background: #111a29;
  color: #d9e4f3;
}
.site-footer .footer-newsletter-strip {
  background: #18283c;
  border-top: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-footer .footer-newsletter-inner {
  min-height: 116px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.site-footer .footer-newsletter-inner h2 {
  color: #fff;
}
.site-footer .footer-newsletter-kicker {
  color: #76a8d8;
}
.site-footer .footer-subscribe-form input {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.13);
  color: #fff;
}
.site-footer .footer-subscribe-form input::placeholder { color: #899bb0; }
.site-footer .footer-subscribe-form button,
.scroll-top {
  background: #00448F;
  color: #fff;
}
.site-footer .footer-subscribe-form button:hover,
.scroll-top:hover { background: #00386F; color: #fff; }
.footer-contact-list span,
.footer-newsletter-kicker { color: #76a8d8; }

/* Best AI Guides: exactly three stacked articles on the right. */
.best-side-grid {
  grid-template-columns: 1fr !important;
}

/* v1.6.2 - single-post author bio and dedicated author profile page */
.single-author-bio {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--ts-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 35, 65, .06);
}
.single-author-avatar img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #f2f6fb;
}
.single-author-kicker,
.author-profile-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--ts-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.single-author-name {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
}
.single-author-name a { color: var(--ts-heading); }
.single-author-description {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--ts-muted);
  font-size: 14px;
  line-height: 1.7;
}
.single-author-button,
.author-profile-website {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ts-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.single-author-button:hover,
.author-profile-website:hover {
  background: #00386f;
  color: #fff;
}

.author-profile-page { padding: 36px 0 56px; }
.author-profile-container { max-width: var(--ts-content); }
.author-profile-breadcrumbs { margin-bottom: 22px; }
.author-profile-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 34px;
  border: 1px solid var(--ts-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 35, 65, .07);
}
.author-profile-avatar img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #f2f6fb;
}
.author-profile-name {
  margin: 0 0 10px;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1;
}
.author-profile-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--ts-muted);
  font-size: 13px;
}
.author-profile-stat strong { color: var(--ts-accent); font-size: 18px; }
.author-profile-bio-title { margin: 0 0 10px; font-size: 19px; }
.author-profile-bio {
  max-width: 900px;
  color: var(--ts-text);
  font-size: 15px;
  line-height: 1.8;
}
.author-profile-bio p:last-child { margin-bottom: 0; }
.author-profile-website { margin-top: 18px; }
.author-posts-section { margin-top: 44px; }
.author-posts-heading { margin-bottom: 20px; }
.author-post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Copyright row must not have its own filled background. */
.site-footer .footer-bottom { background: transparent !important; }

@media (max-width: 1050px) {
  .author-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .single-author-bio {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }
  .single-author-avatar img { width: 72px; height: 72px; border-width: 3px; }
  .single-author-name { font-size: 20px; }
  .single-author-description { font-size: 13px; }
  .author-profile-page { padding: 24px 0 40px; }
  .author-profile-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }
  .author-profile-avatar img { width: 120px; height: 120px; }
  .author-profile-name { font-size: 34px; }
  .author-post-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   v1.6.3 Author editorial profile + outlined single bio CTA
   ========================================================= */
.single-author-button {
  background: transparent !important;
  color: var(--ts-accent) !important;
  border: 1.5px solid var(--ts-accent);
  box-shadow: none;
}
.single-author-button:hover,
.single-author-button:focus-visible {
  background: rgba(0, 68, 143, .06) !important;
  color: #00386f !important;
  border-color: #00386f;
}

.author-editorial-page {
  background: #fff;
  padding: 0 0 64px;
}
.author-editorial-hero {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  background: linear-gradient(135deg, #062f62 0%, #00448F 58%, #0b5fad 100%);
}
.author-editorial-shape {
  position: absolute;
  pointer-events: none;
  opacity: .9;
}
.author-editorial-shape-one {
  inset: -22% 22% auto -12%;
  height: 360px;
  background: rgba(255,255,255,.07);
  clip-path: polygon(0 18%, 100% 0, 56% 100%);
}
.author-editorial-shape-two {
  right: -6%;
  top: -10%;
  width: 44%;
  height: 115%;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.02));
  clip-path: polygon(24% 0, 100% 0, 68% 88%, 0 100%);
}
.author-editorial-hero-container {
  position: relative;
  z-index: 2;
  padding-top: 72px;
}
.author-editorial-card {
  width: min(1120px, 86%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: stretch;
  padding: 34px 34px 34px 42px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, .12);
  box-shadow: 0 20px 54px rgba(0, 20, 48, .16);
  transform: translateY(72px);
}
.author-editorial-copy {
  align-self: center;
  min-width: 0;
}
.author-editorial-name {
  margin: 0 0 14px;
  font-size: clamp(44px, 5vw, 66px);
  line-height: .98;
  letter-spacing: -.045em;
}
.author-editorial-role {
  margin: 0 0 16px;
  color: #526071;
  font-size: 16px;
  font-weight: 600;
}
.author-editorial-bio {
  max-width: 760px;
  color: #2f3945;
  font-size: 19px;
  line-height: 1.48;
}
.author-editorial-bio p:last-child { margin-bottom: 0; }
.author-editorial-photo {
  min-height: 265px;
  overflow: hidden;
  background: #eef3f8;
}
.author-editorial-photo img {
  width: 100%;
  height: 100%;
  min-height: 265px;
  object-fit: cover;
  filter: grayscale(100%);
}
.author-editorial-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.author-editorial-social {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #111827;
  border-radius: 50%;
  color: #111827;
  font-weight: 700;
}
.author-editorial-social:hover {
  color: var(--ts-accent);
  border-color: var(--ts-accent);
}
.author-editorial-website {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--ts-border);
  color: var(--ts-heading);
  font-size: 13px;
  font-weight: 800;
}
.author-editorial-website:hover {
  border-color: var(--ts-accent);
  color: var(--ts-accent);
}

.author-latest-section {
  padding: 132px 0 0;
  background: #fff;
}
.author-latest-heading {
  margin-bottom: 34px;
}
.author-latest-heading h2 {
  margin: 0;
  font-size: clamp(38px, 4vw, 56px);
  letter-spacing: -.045em;
}
.author-editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}
.author-editorial-main { min-width: 0; }
.author-featured-post {
  position: relative;
  min-height: 430px;
  margin-bottom: 26px;
  overflow: hidden;
  background: #0c1522;
}
.author-featured-media,
.author-featured-media img,
.author-featured-media .post-card-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.author-featured-media img,
.author-featured-media .post-card-placeholder { object-fit: cover; }
.author-featured-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 12, 22, .05) 20%, rgba(4, 12, 22, .26) 52%, rgba(4, 12, 22, .92) 100%),
    linear-gradient(90deg, rgba(4, 12, 22, .38), transparent 58%);
}
.author-featured-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 34px;
  color: #fff;
}
.author-featured-kicker {
  display: inline-flex;
  margin-right: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.author-featured-category {
  color: #8fc2f4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.author-featured-title {
  max-width: 820px;
  margin: 10px 0 12px;
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1.1;
}
.author-featured-title a,
.author-featured-title a:hover { color: #fff; }
.author-featured-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

.author-story-list {
  border-top: 1px solid #dfe4ea;
}
.author-story-item {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 126px;
  padding: 16px 0;
  border-bottom: 1px solid #dfe4ea;
}
.author-story-thumb {
  width: 174px;
  height: 98px;
  overflow: hidden;
  background: #eef2f6;
}
.author-story-thumb img,
.author-story-thumb .post-card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-story-category {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--ts-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.author-story-title {
  margin: 0 0 7px;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -.025em;
}
.author-story-title a { color: var(--ts-heading); }
.author-story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #718096;
  font-size: 13px;
}

.author-page-sidebar {
  position: sticky;
  top: 24px;
}
.author-sidebar-promo {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 34px 28px;
  background: linear-gradient(180deg, #eaf5ff 0%, #dceeff 62%, #c9e4ff 100%);
  border: 8px solid #eef4f9;
}
.author-sidebar-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.author-sidebar-art::before,
.author-sidebar-art::after,
.author-sidebar-art span {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.author-sidebar-art::before {
  width: 156px;
  height: 156px;
  left: 50%;
  top: 140px;
  transform: translateX(-50%);
  border: 28px solid rgba(0,68,143,.10);
}
.author-sidebar-art::after {
  width: 48px;
  height: 48px;
  right: 34px;
  top: 42px;
  background: rgba(0,68,143,.16);
}
.author-sidebar-art span {
  width: 72px;
  height: 72px;
  left: 22px;
  bottom: 58px;
  background: rgba(255,255,255,.55);
}
.author-sidebar-kicker,
.author-sidebar-promo h3,
.author-sidebar-promo p,
.author-sidebar-promo a {
  position: relative;
  z-index: 2;
}
.author-sidebar-kicker {
  display: block;
  color: var(--ts-accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.author-sidebar-promo h3 {
  margin: 205px 0 10px;
  font-size: 26px;
  line-height: 1.15;
}
.author-sidebar-promo p {
  color: #55677c;
  font-size: 14px;
}
.author-sidebar-promo a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  background: var(--ts-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .author-editorial-card {
    width: min(1180px, 92%);
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
  }
  .author-editorial-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .author-editorial-hero { min-height: auto; padding-bottom: 0; }
  .author-editorial-card {
    grid-template-columns: 1fr 230px;
    padding: 28px;
    transform: translateY(50px);
  }
  .author-editorial-name { font-size: 46px; }
  .author-editorial-bio { font-size: 16px; }
  .author-latest-section { padding-top: 100px; }
  .author-editorial-layout { grid-template-columns: 1fr; }
  .author-page-sidebar { position: static; }
  .author-sidebar-promo { min-height: 350px; }
  .author-sidebar-promo h3 { margin-top: 115px; }
}

@media (max-width: 680px) {
  .author-editorial-hero-container { padding-top: 28px; }
  .author-editorial-card {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    transform: translateY(34px);
  }
  .author-editorial-copy { order: 2; }
  .author-editorial-photo { order: 1; min-height: 250px; }
  .author-editorial-photo img { min-height: 250px; }
  .author-editorial-name { font-size: 38px; }
  .author-editorial-role { font-size: 14px; }
  .author-editorial-bio { font-size: 15px; }
  .author-latest-section { padding-top: 76px; }
  .author-latest-heading { margin-bottom: 22px; }
  .author-latest-heading h2 { font-size: 34px; }
  .author-featured-post { min-height: 350px; }
  .author-featured-content { padding: 22px 18px; }
  .author-featured-title { font-size: 27px; }
  .author-story-item {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    min-height: 104px;
    padding: 13px 0;
  }
  .author-story-thumb { width: 110px; height: 78px; }
  .author-story-title { font-size: 16px; }
  .author-story-meta { font-size: 11px; }
  .author-sidebar-promo { min-height: 320px; }
  .single-author-button { min-height: 40px; padding: 0 14px; }
}

/* v1.6.4 - author carousel, full-width archive, tech hero background */
.author-editorial-hero {
  min-height: 470px;
  background:
    linear-gradient(90deg, rgba(0, 24, 52, .25), rgba(0, 68, 143, .10)),
    url('assets/images/author-tech-bg.svg') center center / cover no-repeat;
}
.author-editorial-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 21, 45, .12), rgba(0, 68, 143, .05));
  pointer-events: none;
}
.author-editorial-card {
  box-shadow: 0 18px 44px rgba(0, 27, 58, .13);
}
.author-latest-container {
  max-width: var(--ts-content);
}
.author-editorial-main {
  width: 100%;
  min-width: 0;
}
.author-featured-carousel {
  margin-bottom: 30px;
}
.author-featured-stage {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  background: #0c1522;
}
.author-featured-post {
  position: absolute;
  inset: 0;
  min-height: 500px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.author-featured-post.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.author-featured-controls {
  position: absolute;
  z-index: 5;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
}
.author-carousel-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.94);
  color: var(--ts-heading);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.09);
}
.author-carousel-arrow:hover,
.author-carousel-arrow:focus-visible {
  border-color: var(--ts-accent);
  color: var(--ts-accent);
}
.author-featured-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}
.author-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c8d2de;
}
.author-carousel-dot.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--ts-accent);
}
.author-story-list {
  margin-top: 30px;
}
.author-story-list + .pagination,
.author-story-list + nav.pagination,
.author-editorial-main > .pagination,
.author-editorial-main > nav.pagination {
  margin-top: 36px !important;
  padding-top: 4px;
}
.author-story-item:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .author-featured-stage,
  .author-featured-post {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .author-editorial-hero {
    min-height: auto;
  }
  .author-featured-stage,
  .author-featured-post {
    min-height: 350px;
  }
  .author-featured-controls {
    top: 12px;
    right: 12px;
  }
  .author-carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .author-featured-carousel {
    margin-bottom: 24px;
  }
  .author-story-list {
    margin-top: 22px;
  }
  .author-story-list + .pagination,
  .author-story-list + nav.pagination,
  .author-editorial-main > .pagination,
  .author-editorial-main > nav.pagination {
    margin-top: 28px !important;
  }
}


/* v1.6.5 - author archive featured carousel styled like the provided reference */
.author-featured-carousel {
  position: relative;
  margin-bottom: 40px;
}
.author-featured-stage {
  min-height: 530px;
  border: 1px solid #dce4ee;
  overflow: hidden;
}
.author-featured-post,
.author-featured-stage .author-featured-media,
.author-featured-stage .author-featured-media img,
.author-featured-stage .author-featured-media .post-card-placeholder {
  width: 100%;
  height: 100%;
}
.author-featured-shade {
  background:
    linear-gradient(180deg, rgba(4, 12, 22, .04) 10%, rgba(4, 12, 22, .24) 44%, rgba(4, 12, 22, .92) 100%),
    linear-gradient(90deg, rgba(4, 12, 22, .62), rgba(4, 12, 22, .10) 58%, rgba(4, 12, 22, .06) 100%);
}
.author-featured-content {
  max-width: 840px;
  padding: 44px 38px 40px;
}
.author-featured-kicker,
.author-featured-category {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.author-featured-kicker {
  margin-right: 12px;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: .05em;
}
.author-featured-category {
  color: #6fb3ff;
  font-size: 13px;
  letter-spacing: .05em;
}
.author-featured-title {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(46px, 4.3vw, 64px);
  line-height: 1.05;
  letter-spacing: -.05em;
}
.author-featured-meta {
  gap: 14px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 600;
}
.author-featured-controls {
  top: 22px;
  right: 22px;
  gap: 10px;
}
.author-carousel-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.84);
  background: rgba(255,255,255,.98);
  box-shadow: 0 10px 24px rgba(7, 24, 46, .14);
}
.author-featured-dots {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 5;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}
.author-carousel-dot {
  width: 9px;
  height: 9px;
  background: rgba(255,255,255,.5);
}
.author-carousel-dot.is-active {
  width: 22px;
  background: var(--ts-accent);
}
.author-story-list {
  margin-top: 4px;
}
.author-story-item {
  gap: 24px;
  min-height: 132px;
  padding: 17px 0;
}
.author-story-item:last-child {
  border-bottom: 1px solid #dfe4ea;
}
.author-story-list + .pagination,
.author-story-list + nav.pagination,
.author-editorial-main > .pagination,
.author-editorial-main > nav.pagination {
  margin-top: 44px !important;
  padding-top: 0;
}

@media (max-width: 1024px) {
  .author-featured-stage,
  .author-featured-post {
    min-height: 470px;
  }
  .author-featured-content {
    max-width: 720px;
    padding: 34px 28px 30px;
  }
  .author-featured-title {
    font-size: clamp(34px, 4.1vw, 50px);
  }
}

@media (max-width: 680px) {
  .author-featured-stage,
  .author-featured-post {
    min-height: 360px;
  }
  .author-featured-content {
    max-width: 100%;
    padding: 22px 18px 24px;
  }
  .author-featured-title {
    margin: 14px 0 12px;
    font-size: 32px;
    line-height: 1.1;
  }
  .author-featured-meta {
    gap: 8px;
    font-size: 12px;
  }
  .author-featured-controls {
    top: 14px;
    right: 14px;
  }
  .author-carousel-arrow {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }
  .author-featured-dots {
    right: 18px;
    bottom: 18px;
  }
  .author-story-list + .pagination,
  .author-story-list + nav.pagination,
  .author-editorial-main > .pagination,
  .author-editorial-main > nav.pagination {
    margin-top: 30px !important;
  }
}


/* v1.6.6 - blank sidebar spacing restored on author page + stronger shadow */
.author-editorial-layout--hero,
.author-editorial-layout--archive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}
.author-editorial-layout--hero .author-editorial-card {
  width: 100%;
  margin: 0;
}
.author-editorial-card--shadowed,
.author-editorial-layout--hero .author-editorial-card {
  box-shadow: 0 18px 50px rgba(0, 24, 54, .16), 0 2px 10px rgba(0, 24, 54, .06);
}
.author-blank-sidebar {
  min-height: 100%;
}
.author-editorial-layout--archive .author-blank-sidebar {
  min-height: 640px;
}
.author-editorial-layout--archive .author-editorial-main {
  min-width: 0;
}
.author-editorial-layout--hero .author-blank-sidebar {
  min-height: 1px;
}

@media (max-width: 1050px) {
  .author-editorial-layout--hero,
  .author-editorial-layout--archive {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .author-editorial-layout--hero,
  .author-editorial-layout--archive {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .author-blank-sidebar {
    display: none;
  }
}


/* v1.6.7 - author hero full width, archive keeps right sidebar */
.author-editorial-card--fullwidth {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.author-editorial-card--fullwidth.author-editorial-card--shadowed {
  box-shadow: 0 18px 50px rgba(0, 24, 54, .16), 0 2px 10px rgba(0, 24, 54, .06);
}


/* v1.6.8 - author promo sidebar, bordered author card, refined title scale */
.author-editorial-card--fullwidth {
  border: 1px solid #d8dee8;
  box-shadow: 0 16px 40px rgba(0, 30, 68, .11), 0 2px 8px rgba(0, 30, 68, .05);
}
.author-latest-heading h2 {
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.08;
}
.author-featured-title {
  max-width: 720px;
  font-size: 36px;
  line-height: 1.08;
}
.author-promo-sidebar {
  position: static;
  width: 100%;
}
.author-promo-widget.single-promo-widget {
  min-height: 360px;
  padding: 26px 24px 24px;
  border: 1px solid #e4e9f1;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 31, 70, .06);
}
.author-promo-widget .single-promo-art {
  width: 116px;
  height: 116px;
  top: 36px;
}
.author-promo-widget h2 {
  font-size: 22px;
  line-height: 1.15;
}
.author-promo-widget p {
  font-size: 13px;
  line-height: 1.55;
}
.author-promo-widget .single-promo-button {
  min-height: 40px;
  padding-inline: 17px;
}

@media (max-width: 1050px) {
  .author-featured-title {
    font-size: 34px;
  }
}

@media (max-width: 900px) {
  .author-promo-sidebar {
    display: block;
    margin-top: 26px;
  }
  .author-promo-widget.single-promo-widget {
    max-width: 420px;
    min-height: 330px;
  }
}

@media (max-width: 680px) {
  .author-latest-heading h2 {
    font-size: 30px;
  }
  .author-featured-title {
    font-size: 28px;
  }
  .author-promo-widget.single-promo-widget {
    max-width: none;
    min-height: 320px;
  }
}


/* v1.7.0 - single post desktop content canvas uses full 1500px */
@media (min-width: 1200px) {
  .single-reference-page .single-title-banner-inner,
  .single-reference-page .single-reference-grid {
    width: min(1500px, calc(100% - (var(--ts-desktop-gutter, 32px) * 2)));
    max-width: 1500px;
  }
  .single-reference-page .single-reference-grid {
    grid-template-columns: minmax(0, 1fr) var(--ts-sidebar-width, 300px);
    justify-content: stretch;
    gap: var(--ts-single-gap, 48px);
  }
}


/* v1.7.3 - website About card replaces author card in magazine sidebar */
.website-about-widget {
  text-align: center;
}
.website-about-logo {
  width: 74px;
  height: 74px;
  margin: 4px auto 12px;
  display: grid;
  place-items: center;
}
.website-about-logo-image {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 14px;
}
.website-about-logo-fallback {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef4fb;
  color: var(--ts-accent);
  border: 1px solid #d8e4f1;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.website-about-title {
  margin-bottom: 8px;
  color: var(--ts-heading);
  font-size: 17px;
}
.website-about-widget p {
  max-width: 220px;
  margin: 0 auto 12px;
  color: #687587;
  font-size: 13px;
  line-height: 1.65;
}
.website-about-widget .author-social-row {
  margin: 10px 0 12px;
}
.website-about-widget .author-social-row span {
  font-size: 10px;
}
.website-about-widget .widget-more-link {
  display: inline-flex;
  align-items: center;
  color: var(--ts-accent);
  font-size: 12px;
  font-weight: 800;
}


/* v1.7.3 - author hero card overlaps the next section */
.author-editorial-hero {
  overflow: visible;
}
.author-editorial-hero-container {
  padding-bottom: 0;
}
.author-editorial-card {
  position: relative;
  top: 72px;
  transform: none;
  margin-bottom: -118px;
}
.author-latest-section {
  position: relative;
  z-index: 1;
  padding-top: 170px;
}
.author-editorial-card--shadowed,
.author-editorial-card--fullwidth.author-editorial-card--shadowed,
.author-editorial-layout--hero .author-editorial-card {
  box-shadow: 0 18px 50px rgba(0, 24, 54, .16), 0 2px 10px rgba(0, 24, 54, .06);
}

@media (max-width: 900px) {
  .author-editorial-card {
    top: 50px;
    margin-bottom: -84px;
  }
  .author-latest-section {
    padding-top: 126px;
  }
}

@media (max-width: 680px) {
  .author-editorial-card {
    top: 34px;
    margin-bottom: -46px;
  }
  .author-latest-section {
    padding-top: 82px;
  }
}
