/*
Theme Name: Alvin Kibalama Theme
Theme URI: https://alvinkibalama.com
Description: A minimalist, content-led editorial theme for a B2B SaaS Strategist. Focus on clarity, typography, and conversion.
Author: Alvin Kibalama
Author URI: https://alvinkibalama.com
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.4
License: GPL-2.0-or-later
*/

:root {
  /* 
   * TYPOGRAPHY SYSTEM 
   * Font: Inter (already loaded by Astra) or System Stack.
   * Tone: Editorial, Precise, Crisp.
   */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-heading: var(--font-family-base);

  /* Scale (Major Third -ish) */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1.125rem;
  /* 18px - Base readable size */
  --text-lg: 1.25rem;
  /* 20px */
  --text-xl: 1.5rem;
  /* 24px */
  --text-2xl: 2rem;
  /* 32px */
  --text-3xl: 2.5rem;
  /* 40px */
  --text-4xl: 3.5rem;
  /* 56px */

  /* Leading */
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;

  /* 
   * COLOR PALETTE
   * Primary: Purple #7c3aed
   */
  --color-primary: var(--wp--preset--color--primary, #7c3aed);
  --color-primary-hover: var(--wp--preset--color--primary, #6d28d9);
  /* Fallback */

  --color-black: var(--wp--preset--color--black, #111111);
  --color-gray-900: #1f1f1f;
  --color-gray-700: var(--wp--preset--color--secondary, #4a4a4a);
  --color-gray-500: #767676;
  --color-gray-300: #d1d1d1;
  --color-gray-200: #e5e5e5;
  --color-gray-100: var(--wp--preset--color--light, #f5f5f5);
  --color-white: var(--wp--preset--color--white, #ffffff);

  --color-success: #059669;
  --color-error: #dc2626;

  /* Semantic Mapping */
  --color-text-primary: var(--color-black);
  --color-text-secondary: var(--color-gray-700);
  --color-text-tertiary: var(--color-gray-500);
  --color-border: var(--color-gray-300);
  --color-bg-page: var(--color-white);
  --color-bg-subtle: var(--color-gray-100);

  /* ... Keeping spacing vars ... */
  --space-0_5: 4px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* Layout - Full Width */
  --container-width: 100%;
  --container-max-width: min(100%, var(--container-max-width));
  --content-width: 100%;
  --header-height: 80px;
  --radius-sm: 2px;
  --radius-md: 4px;
}

/* ... RESET ... */
/* ... TYPOGRAPHY ... */

/* ... BUTTONS ... */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-black);
  /* Contrast shift */
  border-color: var(--color-black);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-gray-300);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
}

/* Footer Button Visibility (Task 1) */
/* Must be visible at rest regardless of footer bg */
.site-footer .btn-secondary {
  background-color: var(--color-white);
  /* Ensure visible bg */
  border-color: var(--color-white);
  color: var(--color-black);
  /* Text contrast */
  opacity: 1 !important;
  /* Force visibility */
  visibility: visible !important;
}

.site-footer .btn-secondary:hover,
.site-footer .btn-secondary:focus {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white) !important;
  /* Force white text on hover */
}

/* ... Footer Colors ... */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-10);
  padding-bottom: var(--space-6);
  font-size: var(--text-sm);
  background-color: var(--wp--preset--color--black, #111111);
  color: var(--color-white);
}

/* Footer Top Layout */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-headline {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.footer-subtext {
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

/* Footer Nav Row - Inline Links */
.footer-nav-row {
  margin-bottom: 2rem;
}

.footer-nav-row ul {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-row a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav-row a:hover {
  color: var(--color-primary);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-sm);
  color: var(--color-gray-300);
  /* Improved Contrast */
}

.footer-legal {
  display: flex;
  gap: var(--space-3);
}

.footer-legal-list {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal-list li {
  margin: 0;
}

.footer-legal a {
  color: var(--color-gray-300);
  /* Improved Contrast */
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--color-white);
}

/* Footer Link Contrast Fix */
.site-footer a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--color-primary);
}

/* Social Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: all 0.2s ease;
}

.social-icon:hover,
.social-icon:focus {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Header Navigation - Inline Links */
.header-nav {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.header-nav ul,
.header-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline;
}

.header-nav a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0 var(--space-2);
}

.header-nav a:hover {
  color: var(--color-primary);
}

/* Header Inner Layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

/* Header Actions - Same line as nav */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  /* Space between buttons */
}

.header-link {
  color: var(--color-text-primary);
  text-decoration: underline;
  font-weight: 500;
  padding: 10px 20px;
}

.header-link:hover {
  color: var(--color-primary);
}

.site-title-link {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-title-link:hover {
  color: var(--color-primary);
}

/* Site Header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  /* User spec: white pages */
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6,
.text-h1,
.text-h2,
.text-h3 {
  font-family: var(--font-family-heading);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-top: 0;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

h1,
.text-h1 {
  font-size: var(--text-4xl);
}

h2,
.text-h2 {
  font-size: var(--text-3xl);
}

h3,
.text-h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

/* Privacy Policy Alignment Fix (Task 1) */
.page .entry-title,
.entry-header h1 {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  padding-left: 0;
}

p,
.text-body {
  margin-bottom: var(--space-3);
  width: 100%;
  max-width: 100%;
}

ul,
ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
}

small,
.text-small {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

a {
  color: var(--color-primary);
  /* Task 8: Primary Color Links */
  text-decoration: underline;
  text-decoration-color: var(--color-gray-300);
  text-underline-offset: 4px;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration-color: var(--color-primary-hover);
  color: var(--color-primary-hover);
}

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

/* =========================================
   LAYOUT UTILITIES
   ========================================= */

.container {
  width: 100%;
  max-width: min(100%, var(--container-max-width));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Ensure Gutenberg blocks respect container padding */
.about-content-wrapper .wp-block-group.alignfull,
.about-page .alignfull {
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
  width: calc(100% + (var(--space-4) * 2));
}

/* Page content consistency */
.site-main .container {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }

  .about-content-wrapper .wp-block-group.alignfull,
  .about-page .alignfull {
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
    width: calc(100% + (var(--space-6) * 2));
  }
}

.section {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

/* Compact section for page headers */
.section-compact {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  .section-compact {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }
}

.bg-light {
  background-color: var(--color-white) !important;
  /* Override Astra grey */
}

/* Force white backgrounds on all sections */
.ak-hero-strip,
.ak-start-here,
.ak-cta-strip,
.section,
.site-main,
.page-header {
  background-color: var(--color-white) !important;
}

/* Grid System */
.grid-2,
.about-grid,
.contact-grid,
.newsletter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}


/* Safe Grid Strategy: Forces 1 column on small screens */
@media (max-width: 480px) {

  .grid-2,
  .grid-3,
  .about-grid,
  .contact-grid,
  .newsletter-grid,
  .feature-grid,
  .vault-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-6);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

@media (min-width: 768px) {

  .grid-2,
  .about-grid,
  .contact-grid,
  .newsletter-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }

  .about-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Post Grid - 2 columns */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px 10px 20px;
  /* User spec: 10px top/bottom, 20px left/right */
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  /* User spec: 5px all sides */
  transition: all 0.2s ease;
  line-height: 1;
  text-transform: capitalize;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  /* Task 8 */
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-gray-300);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
}

/* Footer Button Visibility (Task 2) */
/* Ensure sufficient contrast and visibility always */
/* Footer Button Visibility (Task 1) */
/* Must be visible at rest regardless of footer bg */
.site-footer .btn-secondary {
  background-color: var(--color-white);
  /* Ensure visible bg */
  border-color: var(--color-white);
  color: var(--color-black);
  /* Text contrast */
  opacity: 1 !important;
  /* Force visibility */
  visibility: visible !important;
}

.site-footer .btn-secondary:hover,
.site-footer .btn-secondary:focus {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* Nav */
.header-nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text-primary);
}

.header-nav a:hover {
  color: var(--color-primary);
}

/* Enhance Nav Current Item */
.header-nav .current-menu-item>a {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 2px;
}

/* Editorial Lists (Cards) */
.card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 0;
  padding-bottom: var(--space-4);
  border-radius: 0;
  transition: border-color 0.2s ease;
  height: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-4);
  overflow: hidden;
  /* Ensure rounded corners clip children */
}

/* Aspect Ratio / Fit Utility */
.ak-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  /* Standard "Box" layout */
  background-color: var(--color-gray-100);
  /* Placeholder bg */
  overflow: hidden;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Default to Cover (Fill box) */
  /* User requested "Fit" without "Cut off" -> implying 'Contain' behavior or just consistent boxes */
  /* If 'Contain' is preferred to avoid ANY crop: object-fit: contain; */
  /* I will use 'cover' as standard professional look, but remove fixed pixel heights */
  /* Wait, user specifically asked 'instead of presenting them as if they are cut off'. */
}

.ak-card-image.fit-contain img {
  object-fit: contain;
  /* Shows full image, no crop. May show background bars. */
}

.card:hover {
  border-color: var(--color-primary);
}

/* Playbook Card */
.playbook-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: var(--space-5);
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}

.playbook-card:hover {
  border-color: var(--color-primary);
}

/* Newsletter Module */
.ak-newsletter-module.card {
  background: var(--color-bg-subtle);
  border: none;
  padding: 2rem;
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.card-title a {
  text-decoration: none;
  color: var(--color-text-primary);
}

.card-title a:hover {
  color: var(--color-primary);
}


.card-meta {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
  display: block;
}

/* Hero Strip */
.ak-hero-strip {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}

/* Header */
.site-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding img,
.custom-logo-link img {
  max-height: 48px;
  width: auto;
}

/* Footer Dark Mode (Implicit from Inline Styles) */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
  font-size: var(--text-sm);
  background-color: var(--wp--preset--color--black, #111111);
  color: var(--color-gray-300);
  /* Improved Contrast */
}

.footer-social-links a {
  margin-right: var(--space-3);
  color: var(--color-gray-500);
  text-decoration: none;
}

.footer-social-links a:hover {
  color: var(--color-white);
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  justify-content: center;
  /* Center filters in hero context */
}

.cat-filter-btn {
  display: inline-block;
  padding: 8px 24px;
  background-color: var(--color-white);
  color: var(--color-text-primary);
  border-radius: 50px;
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--color-gray-300);
  line-height: 1.5;
}

.cat-filter-btn:hover {
  background-color: var(--color-gray-50);
  color: var(--color-text-primary);
  border-color: var(--color-gray-400);
  text-decoration: none;
}

.cat-filter-btn.active {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* =========================================
   FORMS & SEARCH
   ========================================= */

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-white);
  background-clip: padding-box;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
textarea:focus {
  border-color: var(--color-primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

/* Search Form specific */
.search-form {
  display: flex;
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.search-form label {
  flex-grow: 1;
  margin: 0;
  display: flex;
  /* Ensure label behaves as container if needed */
}

/* Search Field (Input) */
.search-form .search-field,
.search-form input[type="search"] {
  width: 0;
  /* Allow flex-grow to work properly */
  min-width: 0;
  /* CSS Grid/Flex trick */
  flex-grow: 1;
  padding: 0 16px;
  /* Horizontal padding only, height set below */
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-300);
  border-radius: 5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  height: 48px;
  box-sizing: border-box;
}

.search-form .search-field:focus,
.search-form input[type="search"]:focus {
  border-color: var(--color-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-form .search-submit,
.search-submit {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  height: 48px;
  white-space: nowrap;
  text-decoration: none;
}

.search-form .search-submit:hover,
.search-submit:hover {
  background-color: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* 404 Page Specific */
.error-404 .search-form {
  justify-content: center;
}

.error-404 .recovery-links {
  margin-top: 2rem;
}

.error-404 .recovery-links .btn {
  margin: 0.5rem;
}

/* Mobile QA patch: typography, header/nav, tags, CookieYes */
html {
  -webkit-text-size-adjust: 100%;
}

:root {
  --mobile-body-size: 16px;
  --mobile-body-lh: 1.6;
  --mobile-gap: 12px;
  --mobile-content-pad: 16px;
}

@media (max-width: 768px) {
  body,
  .wp-site-blocks,
  .entry-content,
  .wp-block-post-content {
    font-size: var(--mobile-body-size);
    line-height: var(--mobile-body-lh);
    font-weight: 400;
  }

  h1,
  .wp-block-post-title,
  .entry-title {
    font-size: clamp(1.6rem, 5.8vw, 2rem);
    line-height: 1.2;
    text-wrap: balance;
    overflow-wrap: break-word;
    margin: 0 0 0.65em;
  }

  h2 {
    font-size: clamp(1.35rem, 4.8vw, 1.7rem);
    line-height: 1.25;
    text-wrap: balance;
    overflow-wrap: break-word;
    margin: 1.1em 0 0.55em;
  }

  h3 {
    font-size: clamp(1.15rem, 3.9vw, 1.35rem);
    line-height: 1.3;
    text-wrap: balance;
    overflow-wrap: break-word;
    margin: 1em 0 0.45em;
  }

  p,
  li {
    margin: 0 0 0.9em;
  }

  .wp-block-group,
  .wp-block-columns,
  .wp-block-cover,
  .wp-block-media-text {
    margin-block: 18px !important;
  }

  .entry-content > * + *,
  .wp-block-post-content > * + * {
    margin-top: 1rem;
  }

  .site-header,
  header.site-header,
  .wp-block-template-part[aria-label*="Header"] {
    padding-inline: var(--mobile-content-pad);
  }

  .site-header .wp-block-group,
  .site-header .wp-block-group__inner-container,
  .site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mobile-gap);
    flex-wrap: nowrap;
  }

  .site-header .custom-logo-link,
  .site-header .wp-block-site-logo {
    flex: 0 0 auto;
    max-width: 58%;
  }

  .site-header .wp-block-button__link,
  .site-header .subscribe,
  .site-header a[class*="subscribe"] {
    min-height: 40px;
    padding: 8px 12px;
    line-height: 1.2;
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .site-header .wp-block-navigation {
    margin-left: auto;
    min-width: 0;
  }

  .wp-block-navigation__responsive-container-open,
  .wp-block-navigation__responsive-container-close {
    min-width: 40px;
    min-height: 40px;
  }

  .site-header .main-navigation ul,
  .site-header nav ul.menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .wp-block-post-terms,
  .post-tags,
  .entry-tags,
  .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .wp-block-post-terms a,
  .post-tags a,
  .entry-tags a,
  .tagcloud a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  #cookieyes,
  .cky-consent-container,
  .cky-banner-element {
    width: calc(100% - 16px) !important;
    max-width: 640px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    max-height: min(46vh, 360px) !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
  }

  .cky-notice,
  .cky-consent-bar,
  .cky-preference-center {
    padding: 12px !important;
  }

  .cky-title,
  .cky-notice-des,
  .cky-notice-group {
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
  }

  .cky-btn,
  .cky-btn-reject,
  .cky-btn-accept {
    min-height: 44px !important;
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
  }
}

@media (max-width: 480px) {
  :root {
    --mobile-body-size: 15.5px;
    --mobile-gap: 10px;
    --mobile-content-pad: 12px;
  }

  .wp-block-post-terms a,
  .post-tags a,
  .entry-tags a,
  .tagcloud a {
    font-size: 0.78rem;
    padding: 4px 9px;
  }

  .site-header .wp-block-button__link,
  .site-header .subscribe,
  .site-header a[class*="subscribe"] {
    padding: 7px 10px;
    font-size: 0.84rem;
  }
}

/* Mobile/Tablet navigation: hamburger menu */
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  background: var(--color-white);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.mobile-menu-toggle__line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-primary);
}

@media (max-width: 900px) {
  .header-inner {
    position: relative;
    gap: 12px;
  }

  .site-branding {
    min-width: 0;
    flex: 1 1 auto;
  }

  .custom-logo-link img,
  .site-branding img {
    max-height: 38px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    order: 3;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }

  .header-actions .btn {
    display: none;
  }

  .header-actions .header-link {
    font-size: 0.85rem;
    padding: 8px 10px;
    text-decoration: none;
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    white-space: nowrap;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 120;
  }

  .header-nav.is-open {
    display: block;
  }

  .header-nav ul,
  .header-nav li {
    display: block;
  }

  .header-nav a {
    display: block;
    padding: 10px 8px;
    border-radius: 8px;
  }

  .header-nav .current-menu-item > a {
    border-bottom: 0;
    background: rgba(124, 58, 237, 0.1);
  }

  body.mobile-nav-open {
    overflow: hidden;
  }
}

/* Button/layout hardening for tablet + mobile */
.header-nav .header-menu-list {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav .header-menu-list > li {
  margin: 0;
}

.hero-actions,
.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions .btn,
.cta-actions .btn {
  min-width: 0;
}

@media (max-width: 1100px) {
  .header-actions .btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-actions,
  .cta-actions {
    justify-content: stretch !important;
    width: 100%;
  }

  .hero-actions .btn,
  .cta-actions .btn {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    text-align: left;
    padding: 12px 14px;
    white-space: normal;
    line-height: 1.15;
  }

  .header-inner {
    padding: 10px 0;
  }

  .header-link {
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}

/* =========================================
   Header + Overlay Refactor (v2.0.11)
   ========================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-content,
.site-main,
.entry-content,
.container,
.wp-block-group,
.wp-block-columns,
iframe,
img,
video,
table {
  max-width: 100%;
  min-width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #f5f5f5;
  border-bottom: 1px solid var(--color-gray-200);
}

.header-top {
  border-bottom: 1px solid var(--color-gray-200);
}

.header-top-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.header-utility {
  justify-self: start;
  min-width: 0;
}

.header-utility-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-utility-menu li {
  margin: 0;
}

.header-utility-menu li + li::before {
  content: "|";
  color: var(--color-gray-500);
  margin: 0 12px;
}

.header-utility-menu a {
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
}

.header-utility-menu li:last-child a {
  color: var(--color-primary);
}

.site-branding {
  justify-self: center;
  min-width: 0;
}

.site-branding img,
.custom-logo-link img {
  max-height: 42px;
  width: auto;
}

.header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
}

.header-action .header-action__label {
  font-size: 1.05rem;
  line-height: 1;
}

.header-action + .header-action::before {
  content: "|";
  color: var(--color-gray-500);
  margin: 0 14px 0 4px;
}

.search-toggle .header-action__icon,
.menu-toggle .header-action__icon {
  color: var(--color-primary);
}

.header-secondary {
  display: block;
  border-top: 1px solid var(--color-gray-100);
}

.header-secondary-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 12px 0;
}

.header-secondary-menu li {
  margin: 0;
}

.header-secondary-menu a {
  display: inline-block;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 6px 0;
}

.header-secondary-menu a:hover {
  color: var(--color-primary);
}

.search-overlay,
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  background: rgba(20, 12, 16, 0.97);
  color: #f8f4f4;
  padding: 20px;
  overflow: auto;
}

.search-overlay[aria-hidden="false"],
.menu-overlay[aria-hidden="false"] {
  display: block;
}

.search-overlay__panel,
.menu-overlay__panel {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.search-overlay__head,
.menu-overlay__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 0 14px;
}

.search-overlay__title,
.menu-overlay__title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  color: #fff;
}

.overlay-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.search-overlay__body {
  padding: 26px 0;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.search-overlay__prompt {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  color: #fff;
}

.search-overlay .search-form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.search-overlay .search-field {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  height: 56px;
  min-height: 56px;
  font-size: 1.1rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 18px;
  line-height: 1;
}

.search-overlay .search-field::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.search-overlay .search-submit {
  align-self: stretch;
  height: 56px;
  min-height: 56px;
  width: 180px;
  flex: 0 0 180px;
  padding: 0 18px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.live-search-results {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 14px;
}

.live-search-results__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.live-search-results__group {
  margin-bottom: 14px;
}

.live-search-results__group h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.live-search-results__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.live-search-results__group li {
  margin: 0 0 6px;
}

.live-search-results__group a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-decoration: none;
  color: #fff;
  padding: 10px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.live-search-results__group a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.live-search-results__title {
  display: block;
  font-weight: 600;
}

.live-search-results__excerpt {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.87rem;
}

.live-search-results__thumb {
  width: 96px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.live-search-results__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-search-results__content {
  min-width: 0;
}

.menu-overlay__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 24px 0;
}

.menu-overlay__list,
.menu-overlay__list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-overlay__list > li {
  margin: 0 0 10px;
}

.menu-overlay__list > li > a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.menu-overlay__list ul {
  margin-top: 8px;
  padding-left: 8px;
}

.menu-overlay__list ul li {
  margin: 0 0 8px;
}

.menu-overlay__list ul a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
}

body.search-open,
body.menu-open {
  overflow: hidden;
}

@media (max-width: 1024px) and (min-width: 768px) {
  .header-top-inner {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
  }

  .header-secondary {
    display: none;
  }

  .header-utility-menu a {
    font-size: 1.2rem;
  }

  .header-utility-menu li + li::before {
    margin: 0 8px;
  }

  .header-action {
    gap: 8px;
  }

  .header-action .header-action__label {
    font-size: 0.95rem;
  }

  .header-action + .header-action::before {
    margin: 0 10px 0 2px;
  }

  .site-main,
  .entry-content,
  .wp-block-post-content {
    font-size: 1.04rem;
    line-height: 1.65;
  }

  .site-main h1,
  .entry-content h1,
  .wp-block-post-content h1 {
    line-height: 1.14;
    margin-bottom: 0.6em;
  }

  .site-main h2,
  .entry-content h2,
  .wp-block-post-content h2 {
    line-height: 1.2;
    margin-top: 1.05em;
    margin-bottom: 0.5em;
  }

  .site-main p,
  .entry-content p,
  .wp-block-post-content p {
    margin-bottom: 0.9em;
  }
}

@media (max-width: 767px) {
  .header-top-inner {
    min-height: 60px;
    gap: 8px;
    grid-template-columns: auto 1fr auto;
  }

  .site-branding {
    justify-self: start;
  }

  .site-branding img,
  .custom-logo-link img {
    max-height: 34px;
  }

  .header-secondary {
    display: none;
  }

  .header-utility-menu {
    display: none;
  }

  .header-action {
    padding: 6px 0;
  }

  .header-action .header-action__label {
    font-size: 0.9rem;
  }

  .menu-overlay__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .search-overlay,
  .menu-overlay {
    padding: 14px;
  }

  .search-overlay .search-form {
    flex-direction: row;
  }

  .search-overlay .search-submit {
    width: 140px;
    flex-basis: 140px;
  }

  .live-search-results__group a {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .live-search-results__thumb {
    width: 72px;
    height: 56px;
  }
}

/* Login page template */
.login-page .login-username,
.login-page .login-password,
.login-page .login-remember,
.login-page .login-submit {
  margin-bottom: 0.9rem;
}

.login-page .login-username label,
.login-page .login-password label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.login-page input[type="text"],
.login-page input[type="password"] {
  width: 100%;
  height: 46px;
}

.login-page .button,
.login-page input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Desktop micro-pass for row-1 fidelity (1440px target) */
@media (min-width: 1280px) {
  .header-top-inner {
    min-height: 78px;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    gap: 20px;
  }

  .header-utility-menu a {
    font-size: 0.92rem;
    line-height: 1;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .header-action {
    font-size: 1rem;
    padding: 6px 0;
    gap: 8px;
  }

  .header-action .header-action__label {
    font-size: 0.96rem;
    line-height: 1;
  }

  .header-action .header-action__icon {
    font-size: 1.02rem;
  }

  .site-branding img,
  .custom-logo-link img {
    max-height: 46px;
  }

  .header-secondary-menu {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 24px;
    padding: 13px 0;
  }

  .header-secondary-menu a {
    font-size: 0.95rem;
    line-height: 1.2;
  }
}

.search-result-row { min-width: 0; }

@media (max-width: 767px) {
  .search-result-row {
    flex-direction: column;
  }

  .search-result-row > a {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Home CTA centering */
.ak-cta-strip .container {
  text-align: center;
}

.ak-cta-strip .text-h3 {
  margin-left: auto;
  margin-right: auto;
}

.ak-cta-strip .cta-actions {
  justify-content: center;
}

/* ================================================
   HEADER V1 - RESPONSIVE NAVIGATION
   Brand Colors: #7c3aef (accent), #1a1a1a (text)
   ================================================ */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.header-container {
    max-width: min(100%, var(--container-max-width));
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    flex-shrink: 0;
    min-width: fit-content;
}

.header-brand a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.header-brand img {
    max-height: 32px;
    width: auto;
}

.header-nav-center {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav-center a {
    font-size: 14px;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-nav-center a:hover,
.header-nav-center a:focus {
    color: #1a1a1a;
}

.header-nav-center li {
    list-style: none;
}

.header-nav-right {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-left: auto;
    list-style: none;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.search-toggle:hover {
    opacity: 0.7;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #666666;
    flex-shrink: 0;
}

.cta-button {
    background: #7c3aef;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover,
.cta-button:focus {
    background: #6d28d9;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    margin: 5px 0;
    transition: 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #f0f0f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.open {
    display: block;
    max-height: 500px;
}

.mobile-menu-nav {
    padding: 20px 40px;
    list-style: none;
    margin: 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-nav a:hover {
    color: #666666;
}

.mobile-menu-nav li:last-child a {
    border-bottom: none;
}

.mobile-menu-footer {
    padding: 16px 40px 24px;
    border-top: 1px solid #f5f5f5;
}

.mobile-menu-footer .cta-button {
    width: 100%;
    text-align: center;
}

.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.search-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.search-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: #1a1a1a;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-close:hover {
    opacity: 0.7;
}

@media (max-width: 1024px) {
    .header-container {
        padding: 22px 36px;
    }

    .header-nav-center {
        gap: 32px;
    }

    .header-nav-center a {
        font-size: 13px;
    }

    .header-nav-right {
        gap: 20px;
    }

    .cta-button {
        padding: 7px 18px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 20px 32px;
        gap: 16px;
    }

    .header-nav-center {
        display: none;
    }

    .header-nav-right {
        gap: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .cta-button {
        padding: 7px 16px;
        font-size: 12px;
    }

    .search-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 16px 20px;
        gap: 12px;
    }

    .header-brand a {
        font-size: 18px;
    }

    .header-nav-right {
        gap: 12px;
    }

    .cta-button {
        padding: 7px 14px;
        font-size: 11px;
    }

    .search-icon {
        width: 16px;
        height: 16px;
    }

    .menu-toggle {
        width: 24px;
        height: 20px;
    }

    .menu-toggle span {
        margin: 4px 0;
    }

    .mobile-menu-nav {
        padding: 16px 20px;
    }

    .mobile-menu-nav a {
        padding: 10px 0;
        font-size: 14px;
    }

    .mobile-menu-footer {
        padding: 12px 20px 16px;
    }

    .search-modal-content {
        margin: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-nav-center a,
    .search-toggle,
    .cta-button,
    .menu-toggle,
    .mobile-menu,
    .search-modal,
    .menu-toggle span {
        transition: none;
    }
}



/* Header V1 visual tweak: Clean & Spacious (screenshot match) */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header-container {
  max-width: min(100%, var(--container-max-width));
  padding: 22px 32px;
  gap: 24px;
}

.header-brand a {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.header-nav-center {
  gap: 36px;
}

.header-nav-center a {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.header-nav-right {
  gap: 16px;
}

.search-toggle {
  padding: 6px;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #666666;
}

.cta-button {
  background: #7c3aef;
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
}

.cta-button:hover,
.cta-button:focus {
  background: #6d28d9;
}

@media (max-width: 1024px) {
  .header-container {
    padding: 18px 24px;
  }

  .header-nav-center {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 16px 20px;
  }

  .header-nav-center {
    display: none;
  }
}

/* Fix desktop nav bullets + spacing */
.header-nav-center ul,
.header-nav-center li,
.header-nav-center .menu,
.header-nav-center .menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav-center ul,
.header-nav-center .menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-nav-center li::marker {
  content: '';
}

/* Mobile: hide "Menu" text label, keep hamburger only */
@media (max-width: 768px) {
  .menu-toggle {
    font-size: 0;
  }

  .menu-toggle .menu-label,
  .menu-toggle .header-action__label,
  .menu-toggle .label,
  .menu-toggle span + span + span + span {
    display: none !important;
  }
}

/* Force main nav to horizontal, no bullets */
.header-nav-center ul,
.header-nav-center .nav-menu,
.header-nav-center li,
.header-nav-center .nav-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.header-nav-center ul,
.header-nav-center .nav-menu {
  display: flex !important;
  align-items: center !important;
  gap: 36px;
}

.header-nav-center li::marker,
.header-nav-center .nav-menu li::marker {
  content: '' !important;
}


/* Featured image frame: 1200x628 */
.ak-card-image {
  aspect-ratio: 1200 / 628;
  background: #f5f5f5;
  border-radius: 6px;
  overflow: hidden;
}

.ak-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* Reading progress + TOC + author bio */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #7c3aef;
  z-index: 999;
}

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

.content-aside {
  position: sticky;
  top: 110px;
  align-self: start;
}

.toc {
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.toc h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 8px 0;
}

.toc a {
  color: #333;
  text-decoration: none;
}

.toc a.active {
  color: #7c3aef;
  font-weight: 600;
}

.entry-content h2 {
  scroll-margin-top: 120px;
}

.summary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #d8c9ff;
  color: #4b2dbb;
  background: #f3edff;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
}

.summary-button:hover {
  background: #e8dcff;
}

.author-bio {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.author-bio img {
  border-radius: 12px;
}

.author-label {
  font-size: 13px;
  color: #666;
  margin: 0 0 4px;
}

.author-name {
  font-weight: 600;
  margin: 0 0 6px;
}

.author-desc {
  margin: 0;
  color: #444;
}

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

  .content-aside {
    position: static;
  }
}


.tts-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
}

.tts-toggle:hover {
  background: #f7f7f7;
}

.tts-toggle[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


.tts-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tts-label {
  font-size: 12px;
  color: #666;
}

.tts-voice,
.tts-rate {
  width: 100%;
}

.tts-rate-value {
  font-size: 12px;
  color: #444;
}


.single-post .entry-content-section.section,
.single-playbook .entry-content-section.section,
.single-recommendation .entry-content-section.section {
  padding-top: 24px;
}


.tts-voice,
.tts-rate {
  border: 1px solid #e0d6ff;
  border-radius: 6px;
  padding: 8px 10px;
}

.tts-voice:focus,
.tts-rate:focus {
  outline: none;
  border-color: #7c3aef;
  box-shadow: 0 0 0 3px rgba(124, 58, 239, 0.15);
}


.forminator-ui .forminator-button,
.forminator-ui .forminator-button-submit {
  background: #7c3aef !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 10px 18px !important;
  width: auto !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.forminator-ui .forminator-button:hover,
.forminator-ui .forminator-button-submit:hover {
  background: #6d28d9 !important;
}


/* Newsletter page tweaks */
.newsletter-page hr {
  border-color: var(--color-primary);
}
.newsletter-page .newsletter-hero {
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: var(--space-8);
}


/* Newsletter page redesign */
.newsletter-page {
  padding: 40px 20px;
}

.newsletter-container {
  max-width: min(100%, var(--content-max-width));
  margin: 0 auto;
}

.newsletter-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: -0.04em;
}

.newsletter-lead {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.newsletter-signup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.newsletter-signup .forminator-ui .forminator-field input[type="email"],
.newsletter-signup .forminator-ui .forminator-field input[type="text"],
.newsletter-signup .forminator-ui .forminator-field input[type="email"].forminator-input {
  padding: 16px !important;
  border: 2px solid var(--color-text-primary) !important;
  font-size: 1rem !important;
  border-radius: 0 !important;
}

.newsletter-signup .forminator-ui .forminator-button,
.newsletter-signup .forminator-ui .forminator-button-submit {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  padding: 16px !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  border-radius: 0 !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.newsletter-signup .forminator-ui .forminator-button:hover,
.newsletter-signup .forminator-ui .forminator-button-submit:hover {
  background: var(--color-primary-hover) !important;
}

.newsletter-micro {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
}

.newsletter-compare {
  width: 100%;
  border-collapse: collapse;
  margin: 60px 0;
  border-top: 2px solid var(--color-primary);
}

.newsletter-compare th {
  text-align: left;
  padding: 20px 10px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-text-tertiary);
}

.newsletter-compare td {
  padding: 20px 10px;
  border-bottom: 1px solid var(--color-gray-200);
  vertical-align: top;
  width: 50%;
}

.compare-enemy {
  color: var(--color-text-tertiary);
  text-decoration: line-through;
}

.compare-solution {
  font-weight: 600;
}

.newsletter-footer {
  margin-top: 80px;
  border-top: 1px solid var(--color-gray-200);
  padding-top: 20px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

@media (max-width: 600px) {
  .newsletter-header h1 {
    font-size: 2.5rem;
  }
}


/* Ensure header respects Customizer content width */
.site-header .header-container {
  width: 100% !important;
  max-width: min(100%, var(--container-max-width)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* --- Overrides: Header menu bullets + TTS brand styling + spacing --- */
.header-nav-center .nav-menu,
.header-nav-center .nav-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.header-nav-center .nav-menu {
  display: flex !important;
  align-items: center !important;
  gap: 36px;
}

/* Remove any list markers that slip through */
.header-nav-center .nav-menu li::marker { content: '' !important; }

/* TTS controls match brand */
.tts-toggle {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.tts-toggle:hover,
.tts-toggle:focus {
  background: var(--color-primary-hover);
}

.tts-controls select,
.tts-controls input[type="range"] {
  background: #fff;
}

.toc li.toc-sub { margin-left: 12px; font-size: 0.95em; }

/* Reduce top gap where featured image used to be */
.single-post .entry-content-section.section,
.single-playbook .entry-content-section.section,
.single-recommendation .entry-content-section.section {
  padding-top: 12px;
}
