:root {
  --page-bg: #f4f4f4;
  --surface: #ffffff;
  --surface-muted: #eef2f7;
  --surface-soft: #f8fafc;
  --text: #4b5563;
  --text-strong: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-dark: #4b5563;
  --primary: #ca1e2e;
  --primary-dark: #a01825;
  --header-dark: #32373c;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --widget-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  --container: 1200px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 32px 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100%, calc(var(--container) + 48px));
  margin: 0 auto;
  padding: 0 24px;
}

.site-shell {
  width: min(100%, var(--container));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  background: var(--surface-muted);
  border-bottom: 1px solid #d9dfe7;
  font-size: 0.9375rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.topbar-links,
.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar a {
  transition: color 0.2s ease;
}

.topbar a:hover,
.topbar a:focus-visible,
.nav-link:hover,
.nav-link:focus-visible,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible,
.post-title a:hover,
.post-title a:focus-visible,
.link-list a:hover,
.link-list a:focus-visible,
.widget-list a:hover,
.widget-list a:focus-visible,
.breadcrumbs a:hover,
.breadcrumbs a:focus-visible,
.post-meta a:hover,
.post-meta a:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  color: var(--primary);
}

.social-link {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-banner {
  background: #1a1a1a;
}

.hero-banner img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.nav-wrapper {
  background: var(--header-dark);
  border-bottom: 1px solid var(--border-dark);
  z-index: 30;
}

.nav-wrapper.is-sticky {
  position: sticky;
  top: 0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}

.nav-inner {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.home-link {
  width: 56px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #ffffff;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.home-link:hover,
.home-link:focus-visible {
  background: var(--primary-dark);
}

.home-link svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  align-self: center;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  padding: 12px 14px;
}

.nav-toggle-bars {
  width: 20px;
  height: 16px;
  display: grid;
  align-content: space-between;
}

.nav-toggle-bars span {
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 32px;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-link,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  transition: color 0.2s ease;
}

.nav-link.is-active {
  color: var(--primary);
}

.nav-dropdown-toggle {
  border: 0;
  background: transparent;
  color: inherit;
}

.has-dropdown {
  position: relative;
}

.chevron-icon {
  width: 14px;
  height: 14px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--header-dark);
  border-top: 2px solid var(--primary);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-dark);
  color: #ffffff;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-main {
  padding: 32px 0 48px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.single-column,
.posts-list {
  min-width: 0;
}

.page-intro {
  margin-bottom: 32px;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.page-kicker {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin: 0 0 12px;
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
}

.page-description {
  margin: 0;
  color: var(--muted);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(202, 30, 46, 0.08);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 600;
}

.breadcrumbs {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumbs--search {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.62rem;
  line-height: 1.2;
}

.breadcrumbs--search a,
.breadcrumbs--search span {
  font-size: inherit;
}

.post-card {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.post-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.post-media,
.article-cover {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f3f4f6;
}

.post-media img,
.article-cover img {
  width: 100%;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.post-media a:hover img,
.post-media a:focus-visible img {
  opacity: 0.92;
  transform: scale(1.01);
}

.post-title,
.article-title {
  margin: 0 0 12px;
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.28;
}

.article-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.post-excerpt {
  margin: 0 0 20px;
  font-size: 0.97rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.25s ease, color 0.25s ease;
}

.read-more:hover,
.read-more:focus-visible {
  background: var(--primary);
  color: #ffffff;
}

.article-body {
  color: var(--text);
  font-size: 1rem;
}

.article-body .cbe-rendered {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.article-body .cbe-rendered h1,
.article-body .cbe-rendered h2,
.article-body .cbe-rendered h3,
.article-body .cbe-rendered h4,
.article-body .cbe-rendered h5,
.article-body .cbe-rendered h6 {
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
}

.article-body .cbe-rendered a {
  color: var(--primary);
}

.article-body .cbe-rendered a:hover,
.article-body .cbe-rendered a:focus-visible {
  color: var(--primary-dark);
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body h2,
.article-body h3 {
  margin: 30px 0 14px;
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.3;
}

.article-body ul {
  margin: 0 0 20px 20px;
  padding: 0;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--primary);
  background: var(--surface-soft);
  color: var(--text-strong);
  font-style: italic;
}

.article-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.archive-list {
  display: grid;
  gap: 40px;
}

.search-results {
  gap: 28px;
}

.search-results .post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.search-results .post-media {
  margin-bottom: 0;
}

.search-results .post-media img {
  height: 145px;
  object-fit: cover;
}

.search-results .post-title {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  margin-bottom: 10px;
}

.search-results .post-meta {
  gap: 12px 18px;
  margin-bottom: 14px;
}

.search-results .post-excerpt {
  margin-bottom: 16px;
}

.search-results .read-more {
  align-self: flex-start;
}

.empty-state {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  background: #fafafa;
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
  font-weight: 400;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.sidebar {
  display: grid;
  gap: 32px;
}

.widget {
  background: var(--surface);
  border: 1px solid #f0f2f4;
  border-radius: 4px;
  box-shadow: var(--widget-shadow);
  overflow: hidden;
}

.search-widget {
  padding: 24px;
}

.search-form {
  position: relative;
}

.search-form input {
  width: 100%;
  border: 1px solid #d1d5db;
  padding: 13px 56px 13px 16px;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(202, 30, 46, 0.12);
}

.search-form button {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  transition: background 0.2s ease;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: var(--primary-dark);
}

.search-form svg {
  width: 18px;
  height: 18px;
  margin: 0 auto;
}

.widget-heading {
  padding: 16px 20px;
  background: #f9fafb;
  border-left: 4px solid var(--primary);
}

.widget-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
}

.widget-body {
  padding: 24px;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.widget-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.widget-list small,
.sidebar-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.sidebar-note {
  margin: 16px 0 0;
}

.site-footer {
  margin-top: 48px;
  background: var(--header-dark);
  border-top: 1px solid var(--border-dark);
  color: #9ca3af;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 0.92rem;
}

.footer-credit {
  color: var(--primary);
}

.cookie-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  background: #32323a;
  color: #ffffff;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.cookie-message {
  margin: 0;
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cookie-button,
.cookie-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 0;
  border-radius: 4px;
  background: #00a99d;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.cookie-button:hover,
.cookie-button:focus-visible,
.cookie-link:hover,
.cookie-link:focus-visible {
  background: #008f85;
}

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

  .search-results .post-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .search-results .post-media img {
    height: 128px;
  }
}

@media (max-width: 860px) {
  body {
    padding: 0;
  }

  .site-shell {
    min-height: 100vh;
  }

  .topbar-inner,
  .footer-inner,
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 12px;
  }

  .nav-wrapper.is-menu-open .primary-nav {
    display: flex;
  }

  .nav-link,
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .has-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    display: none;
    margin-bottom: 8px;
    border-top: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .has-dropdown:hover .dropdown-menu,
  .has-dropdown:focus-within .dropdown-menu {
    display: none;
  }

  .has-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding-left: 0;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .page-intro {
    padding: 22px;
  }

  .search-results .post-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .search-results .post-media img {
    height: auto;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .topbar-links,
  .social-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .site-main {
    padding-top: 24px;
  }

  .post-card {
    padding-bottom: 36px;
    margin-bottom: 36px;
  }

  .cookie-actions,
  .cookie-button,
  .cookie-link {
    width: 100%;
  }

  .article-navigation {
    flex-direction: column;
  }
}

.post-media-placeholder {
  min-height: 240px;
  background: linear-gradient(135deg, #eef2f7 0%, #dbe4ee 100%);
}

.pagination-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 36px 0 0;
}

.pagination-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text-strong);
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pagination-link:hover,
.pagination-link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-link.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.pagination-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.rich-content img,
.rich-content video,
.rich-content iframe {
  max-width: 100%;
  margin: 20px 0;
  border-radius: var(--radius);
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.rich-content th,
.rich-content td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.rich-content pre {
  overflow-x: auto;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rich-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
