/* ==========================================================================
   SECTION 1: CRITICAL CORE (INLINE IN HTML <HEAD>)
   Minimal structural reset, theme design tokens, basic base rules,
   and skeleton layout containers for zero-LCP/CLS header rendering.
   ========================================================================== */

/* ---------- 1.1 STRUCTURAL RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- 1.2 LIGHT / DARK THEME DESIGN TOKENS ---------- */
body[data-theme="light"] {
  background-color: #f8fafc;
  color: #0f172a;
  --cms-bg: #f8fafc;
  --cms-surface: #ffffff;
  --cms-surface-alt: #f1f5f9;
  --cms-text: #0f172a;
  --cms-text-muted: #475569;
  --cms-border: #e2e8f0;
  --cms-primary: #3b82f6;
  --cms-primary-hover: #2563eb;
  --cms-accent: #22c55e;
  --cms-navbar-bg: #0f172a;
  --cms-navbar-text: #f8fafc;
  --cms-footer-bg: #0f172a;
  --cms-footer-text: #cbd5e1;
  --cms-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --cms-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

body[data-theme="dark"] {
  background-color: #0f172a;
  color: #f8fafc;
  --cms-bg: #0f172a;
  --cms-surface: #1e293b;
  --cms-surface-alt: #334155;
  --cms-text: #f8fafc;
  --cms-text-muted: #94a3b8;
  --cms-border: #334155;
  --cms-primary: #3b82f6;
  --cms-primary-hover: #60a5fa;
  --cms-accent: #22c55e;
  --cms-navbar-bg: #020617;
  --cms-navbar-text: #f8fafc;
  --cms-footer-bg: #020617;
  --cms-footer-text: #cbd5e1;
  --cms-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --cms-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* ---------- 1.3 BASE MEDIA & SKELETON HEADER CONTAINERS ---------- */
img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

#site-header {
  min-height: 110px;
  width: 100%;
  display: block;
  contain: layout;
}

.cms-navbar {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  background-color: var(--cms-navbar-bg);
  color: var(--cms-navbar-text);
  box-shadow: var(--cms-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 60px;
  contain: layout;
}

.cms-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  flex-wrap: wrap;
  box-sizing: border-box;
  contain: layout;
}

/* ==========================================================================
   SECTION 2: ASYNC DEFERRABLE LAYER
   Heavy components, typography, dynamic elements, ad placeholders,
   utilities, footers, and complex media queries loaded asynchronously.
   ========================================================================== */

/* ---------- 2.1 TYPOGRAPHY ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--cms-text);
  margin-bottom: 0.75em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

p {
  margin-bottom: 1em;
  color: var(--cms-text);
}

a {
  color: var(--cms-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ---------- 2.2 HEADER BRAND & NAVIGATION LINKS ---------- */
.cms-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cms-navbar-text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  text-decoration: none;
}

.cms-brand:hover {
  color: var(--cms-navbar-text);
}

.cms-brand-logo {
  font-size: 24px;
  line-height: 1;
}

.cms-brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cms-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: 25px;
}

.cms-nav-item {
  color: var(--cms-navbar-text);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.cms-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--cms-navbar-text);
}

/* ---------- 2.3 SEARCH COMPONENT ---------- */
.cms-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 15px;
  flex-shrink: 0;
}

.cms-search-icon {
  position: absolute;
  left: 10px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0.6;
  color: #f8fafc;
}

#cms-tool-search-input {
  padding: 6px 12px 6px 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 13px;
  width: 180px;
  transition: width 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  outline: none;
}

#cms-tool-search-input::placeholder {
  color: rgba(248, 250, 252, 0.5);
}

#cms-tool-search-input.focused {
  width: 240px;
  border-color: #3b82f6;
  background-color: rgba(255, 255, 255, 0.1);
}

#cms-search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 260px;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #475569 #1e293b;
  contain: layout;
}

#cms-search-results-dropdown.visible {
  display: block;
}

#cms-search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}

#cms-search-results-dropdown::-webkit-scrollbar-track {
  background: #1e293b;
}

#cms-search-results-dropdown::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

.cms-search-no-results {
  padding: 12px 16px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.cms-search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease;
}

.cms-search-result-item:hover {
  background-color: #334155;
}

.cms-search-result-name {
  font-size: 13px;
  font-weight: 500;
  color: #f8fafc;
}

.cms-search-result-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  text-transform: uppercase;
}

/* ---------- 2.4 SLIDER NAVIGATION ---------- */
.cms-slider-nav-container {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  min-height: 40px;
  contain: layout;
}

.cms-slider-nav-container::-webkit-scrollbar {
  display: none;
}

.cms-slider-track {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.cms-slider-item {
  flex-shrink: 0;
  padding: 6px 14px;
  background-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
}

.cms-slider-item:hover {
  background-color: rgba(59, 130, 246, 0.2);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.4);
}

.cms-slider-item.active {
  background-color: var(--cms-primary);
  color: #ffffff;
  border-color: var(--cms-primary);
  font-weight: 600;
}

/* ---------- 2.5 RUGGED CLS DEFENSE FOR AD SLOTS ---------- */
/* Optimized Top Leaderboard Slot */
#cms-ad-slot-1 {
  box-sizing: border-box;
  display: block;
  min-height: 90px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  margin: 15px auto;
  overflow: hidden;
}

/* Sticky Sidebar Placeholder (Sits cleanly next to the tool) */
.cms-sticky-panel { 
  position: -webkit-sticky; 
  position: sticky; 
  top: 84px; 
  min-height: 600px; 
  box-sizing: border-box; 
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout;
}
.cms-sticky-panel::before {
  content: "Sponsored Links";
  color: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-family: system-ui, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- 2.6 MAIN LAYOUT GRID ---------- */
.cms-layout-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 15px;
  box-sizing: border-box;
  contain: layout;
}

.cms-content-column {
  flex: 0 0 calc(70% - 15px);
  max-width: calc(70% - 15px);
  width: calc(70% - 15px);
  box-sizing: border-box;
  min-width: 0;
  contain: layout paint;
}

.cms-sidebar-column {
  flex: 0 0 calc(30% - 15px);
  max-width: calc(30% - 15px);
  width: calc(30% - 15px);
  box-sizing: border-box;
  min-width: 0;
  contain: layout paint;
}

/* ---------- 2.7 MAIN / CARD CONTAINERS ---------- */
main,
.dark-theme-page,
.calc-container {
  background-color: var(--cms-surface);
  color: var(--cms-text);
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--cms-shadow);
  border: 1px solid var(--cms-border);
  contain: layout paint;
}

body[data-theme="light"] main,
body[data-theme="light"] .calc-container {
  background-color: #ffffff;
}

/* ---------- 2.8 FORMS & UI CONTROLS ---------- */
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--cms-border);
  border-radius: 6px;
  background-color: var(--cms-surface);
  color: var(--cms-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cms-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

button,
.calc-submit-btn,
input[type="button"],
input[type="submit"] {
  display: inline-block;
  padding: 10px 22px;
  background-color: var(--cms-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover,
.calc-submit-btn:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: var(--cms-primary-hover);
}

button:active,
.calc-submit-btn:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--cms-text);
  font-size: 14px;
}

/* ---------- 2.9 COMPLIANCE DISCLAIMER ---------- */
.cms-compliance-disclaimer {
  max-width: 1280px;
  margin: 25px auto;
  padding: 16px 20px;
  background-color: rgba(234, 179, 8, 0.08);
  border-left: 4px solid #eab308;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cms-text-muted);
  box-sizing: border-box;
  contain: layout;
}

.cms-compliance-disclaimer p {
  margin: 0;
}

.cms-compliance-disclaimer strong {
  color: #eab308;
}

/* ---------- 2.10 DYNAMIC AFFILIATE PANEL ---------- */
.cms-affiliate-box {
  margin-top: 25px;
  padding: 25px;
  border-radius: 8px;
  border: 2px dashed #22c55e;
  background: #022c22;
  color: #f8fafc;
  font-family: sans-serif;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  contain: layout;
}

.cms-affiliate-box.verified {
  border-style: solid;
}

.cms-affiliate-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.cms-affiliate-progress-track {
  height: 6px;
  background: #064e3b;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.cms-affiliate-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: #22c55e;
  animation: cmsLoadingBar 1.5s infinite linear;
}

.cms-affiliate-verified-heading {
  margin: 0 0 10px 0;
  color: #4ade80;
  font-size: 18px;
}

.cms-affiliate-verified-text {
  margin: 0 0 15px 0;
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}

.cms-affiliate-cta-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #22c55e;
  color: #022c22 !important;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.cms-affiliate-cta-btn:hover,
#cms-dynamic-action-affiliate a:hover {
  background: #16a34a !important;
}

/* ---------- 2.11 TOAST NOTIFICATION ---------- */
.cms-notification-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background-color: var(--cms-surface);
  color: var(--cms-text);
  border: 1px solid var(--cms-border);
  border-radius: 10px;
  box-shadow: var(--cms-shadow-lg);
  padding: 16px;
  z-index: 9998;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  contain: layout;
}

.cms-notification-toast.reveal {
  opacity: 1;
  transform: translateY(0);
}

.cms-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cms-toast-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cms-primary);
}

.cms-toast-close {
  background: transparent;
  border: none;
  color: var(--cms-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cms-toast-close:hover {
  color: var(--cms-text);
  background: transparent;
}

.cms-toast-body {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--cms-text);
}

.cms-toast-action {
  display: inline-block;
  padding: 8px 14px;
  background-color: var(--cms-primary);
  color: #ffffff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.cms-toast-action:hover {
  background-color: var(--cms-primary-hover);
  color: #ffffff !important;
}

/* ---------- 2.12 FOOTER ---------- */
#site-footer {
  width: 100%;
  background-color: #0f172a;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
  font-family: system-ui, -apple-system, sans-serif;
  margin-top: 60px;
  contain: layout;
}

.cms-footer {
  background-color: var(--cms-footer-bg);
  color: var(--cms-footer-text);
  padding: 50px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  contain: layout;
}

.cms-footer .cms-container {
  flex-direction: column;
  align-items: stretch;
  gap: 30px;
  min-height: auto;
}

.cms-footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.cms-footer-brand h3 {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 10px;
}

.cms-footer-brand p {
  color: var(--cms-footer-text);
  font-size: 14px;
  line-height: 1.6;
  max-width: 500px;
}

.cms-footer-column h4,
.cms-footer-catalog-matrix h4 {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cms-footer-links {
  list-style: none;
  padding: 0;
}

.cms-footer-links li {
  margin-bottom: 8px;
}

.cms-footer-links a {
  color: var(--cms-footer-text);
  font-size: 14px;
  transition: color 0.2s ease;
}

.cms-footer-links a:hover {
  color: #ffffff;
}

.cms-footer-catalog-matrix {
  width: 100%;
  max-width: 1280px;
  margin: 30px auto 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
}

.cms-footer-catalog-matrix h4 {
  margin-bottom: 16px;
}

.cms-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 20px;
}

.cms-footer-grid a {
  color: var(--cms-footer-text);
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.cms-footer-grid a:hover {
  color: #ffffff;
}

.cms-footer-bottom {
  max-width: 1280px;
  margin: 30px auto 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
}

.cms-footer-bottom p {
  color: var(--cms-footer-text);
  font-size: 13px;
  margin: 0;
}

/* ---------- 2.13 UTILITIES & KEYFRAMES ---------- */
.cms-text-center {
  text-align: center;
}

.cms-mt-1 {
  margin-top: 8px;
}

.cms-mt-2 {
  margin-top: 16px;
}

.cms-mt-3 {
  margin-top: 24px;
}

@keyframes cmsLoadingBar {
  0% {
    left: -40%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

@keyframes cmsFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 2.14 RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 991px) {
  .cms-content-column,
  .cms-sidebar-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    contain: layout paint;
  }

  .cms-sticky-panel {
    position: static !important;
    min-height: 250px !important;
    margin-top: 25px;
  }

  .cms-footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cms-footer-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .cms-container {
    padding: 10px 15px;
    min-height: 60px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cms-brand-title {
    font-size: 16px;
  }

  .cms-brand-logo {
    font-size: 22px;
  }

  .cms-nav-links {
    gap: 2px;
    margin: 0 auto;
    justify-content: center;
  }

  .cms-nav-item {
    padding: 6px 10px;
    font-size: 13px;
  }

  #cms-tool-search-input {
    width: 150px !important;
    font-size: 12px !important;
  }

  #cms-tool-search-input:focus,
  #cms-tool-search-input.focused {
    width: 180px !important;
  }

  main,
  .dark-theme-page,
  .calc-container {
    padding: 18px;
    border-radius: 8px;
    contain: layout paint;
  }

  .cms-layout-wrapper {
    padding: 15px 10px;
    gap: 20px;
  }

  .cms-footer {
    padding: 40px 20px 20px;
  }

  .cms-footer-content {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .cms-container {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 12px;
    gap: 8px;
  }

  .cms-brand {
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .cms-brand-title {
    font-size: 15px;
  }

  .cms-nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .cms-search-wrapper {
    order: 2;
    margin-left: 0 !important;
    flex-shrink: 1;
  }

  #cms-tool-search-input {
    width: 130px !important;
    padding: 6px 10px 6px 28px !important;
  }

  #cms-tool-search-input:focus,
  #cms-tool-search-input.focused {
    width: 160px !important;
  }

  #cms-search-results-dropdown {
    right: 0;
    left: auto;
    min-width: 240px !important;
    max-width: 90vw;
  }

  .cms-slider-track {
    padding: 8px 12px;
    gap: 6px;
  }

  .cms-slider-item {
    font-size: 12px;
    padding: 5px 11px;
  }

  main,
  .dark-theme-page,
  .calc-container {
    padding: 15px;
  }

  .cms-layout-wrapper {
    padding: 12px 8px;
    gap: 16px;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  button,
  .calc-submit-btn {
    width: 100%;
    padding: 12px 20px;
  }

  .cms-notification-toast {
    width: calc(100vw - 24px);
    right: 12px;
    left: 12px;
    bottom: 12px;
    padding: 14px;
  }

  .cms-footer {
    padding: 30px 15px 15px;
  }

  .cms-footer-brand h3 {
    font-size: 18px;
  }

  .cms-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }

  .cms-footer-grid a {
    font-size: 12px;
  }

  #cms-dynamic-action-affiliate {
    padding: 18px !important;
  }
}

@media (max-width: 380px) {
  .cms-brand-title {
    display: none;
  }

  #cms-tool-search-input {
    width: 110px !important;
  }

  .cms-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 2.15 ACCESSIBILITY & PRINT ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .cms-navbar,
  .cms-slider-nav-container,
  #cms-ad-slot-top,
  .cms-sidebar-column,
  .cms-notification-toast,
  #cms-dynamic-action-affiliate,
  .cms-footer,
  #site-footer {
    display: none !important;
  }

  .cms-content-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
}

/* ==========================================================================
   YMYL Compliance Disclaimer Suppression (Media & Developer Utilities)
   ========================================================================== */

/* Hide YMYL Notice on Media Utility Pages */
.media-previewer-container #cms-compliance-notice,
.media-workspace #cms-compliance-notice,
.aspect-ratio-previewer #cms-compliance-notice,
.safe-zone-analyzer #cms-compliance-notice,

/* Hide YMYL Notice on Developer & Schema Tool Pages */
.schema-parser-container #cms-compliance-notice,
.dev-workspace #cms-compliance-notice,
.code-utility-container #cms-compliance-notice {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}



/* --- CoreMetricSuite Mobile-First Responsive Pagination Elements --- */
.cms-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.cms-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background-color: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #475569);
    border-radius: var(--border-radius-sm, 6px);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.cms-page-btn:hover {
    border-color: var(--accent-primary, #2563eb);
    color: var(--accent-primary, #2563eb);
    background-color: var(--bg-secondary, #f8fafc);
}

.cms-page-btn.active {
    background-color: var(--accent-primary, #2563eb);
    color: #ffffff;
    border-color: var(--accent-primary, #2563eb);
}

@media (max-width: 640px) {
    .cms-pagination-container {
        gap: 0.35rem;
        margin-top: 1.75rem;
        margin-bottom: 2.5rem;
    }
    .cms-page-btn {
        min-width: 42px; /* Responsive mobile scaling with safe tactile sizing targets */
        min-height: 42px; 
        font-size: 0.875rem;
    }
}
