/*
Theme Name: AdVantage Press
Author: Editorial Publishing Studio
Description: Ultra-lightweight, Core Web Vitals optimized editorial WordPress theme inspired by clean typography-first publishing themes. Features 200+ layout, header, palette, and font combinations, zero jQuery, smart category navigation, breadcrumbs, table of contents, author E-E-A-T bio cards, and related posts.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: advantage-press
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, accessibility-ready, translation-ready
*/

:root {
  --ap-bg: #ffffff;
  --ap-surface: #f8fafc;
  --ap-surface-2: #f1f5f9;
  --ap-ink: #0f172a;
  --ap-ink-soft: #334155;
  --ap-muted: #64748b;
  --ap-border: #e2e8f0;
  --ap-accent: #1d4ed8;
  --ap-accent-hover: #1e40af;
  --ap-accent-soft: #eff6ff;
  --ap-footer-bg: #0f172a;
  --ap-footer-ink: #cbd5e1;
  --ap-footer-border: #1e293b;
  --ap-font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --ap-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --ap-radius: 14px;
  --ap-max: 1180px;
  --ap-ratio: 16 / 9;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-family: var(--ap-font-body);
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ap-accent);
  text-decoration: none;
}

a:hover {
  color: var(--ap-accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ap-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--ap-accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

.ap-wrap {
  max-width: var(--ap-max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   Headers (15 Modern Architectural Presets) & Off-Canvas Slide Drawer
   ========================================================================== */
.ap-header {
  background: var(--ap-bg);
  border-bottom: 1px solid var(--ap-border);
  position: relative;
  z-index: 40;
}

.ap-header--sticky {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}

.ap-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 10px 0;
}

.ap-header-row--slim {
  min-height: 50px;
  padding: 6px 0;
}

.ap-header-row--flush {
  min-height: 48px;
  padding: 0;
}

.ap-header-row--3col {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.ap-header-row--3col > :last-child {
  justify-self: end;
}

.ap-brand-nav-inline {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex-shrink: 0;
}

.ap-brand-logo img,
.ap-brand-logo svg {
  max-height: 42px;
  width: auto;
}

.ap-site-title {
  margin: 0;
  font-family: var(--ap-font-head);
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ap-site-title a {
  color: var(--ap-ink);
  text-decoration: none;
}

.ap-site-desc {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--ap-muted);
  line-height: 1.25;
  max-width: 34ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-masthead-top {
  padding: 18px 0 14px;
}

.ap-masthead-center {
  display: flex;
  justify-content: center;
  text-align: center;
}

.ap-masthead-center .ap-brand {
  flex-direction: column;
  gap: 6px;
}

.ap-hdr--broadsheet-masthead .ap-site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
}

.ap-masthead-bold .ap-site-title {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Topbars & Colored Bands */
.ap-topbar {
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ap-topbar--accent {
  background: linear-gradient(90deg, var(--ap-accent) 0%, var(--ap-accent-hover) 100%);
  color: #ffffff;
}

.ap-topbar--light {
  background: var(--ap-surface);
  color: var(--ap-ink-soft);
}

.ap-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
}

.ap-util-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ap-util-links a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.92;
}

.ap-util-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.ap-util-links--dark a {
  color: var(--ap-ink-soft);
  font-size: 0.84rem;
}

.ap-hdr-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ap-muted);
  white-space: nowrap;
}

.ap-hdr-date--inv {
  color: rgba(255, 255, 255, 0.9);
}

.ap-nav-subbar {
  border-top: 1px solid var(--ap-border);
  background: var(--ap-bg);
}

.ap-nav-band {
  background: var(--ap-ink);
  color: #ffffff;
}

.ap-nav-band--accent {
  background: linear-gradient(90deg, var(--ap-accent) 0%, var(--ap-accent-hover) 100%);
}

.ap-nav-band--dark {
  background: #1c1917;
}

.ap-nav-band--navy {
  background: #0f294a;
}

.ap-nav-band--black {
  background: #09090b;
}

.ap-nav-band--tall .ap-header-row {
  min-height: 68px;
}

.ap-nav-band .ap-site-title a,
.ap-nav-band .ap-site-desc {
  color: #ffffff;
}

.ap-nav-floating-pill {
  background: var(--ap-accent);
  color: #ffffff;
  border-radius: 12px;
  padding: 4px 18px;
  margin: 4px auto 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.ap-hdr--newsfy-slim {
  border-top: 4px solid var(--ap-accent);
}

.ap-hdr--saas-cta {
  border-top: 3px solid var(--ap-ink);
  background: var(--ap-surface);
}

.ap-hdr--floating-pill {
  border-bottom: 0;
}

.ap-hdr--vivid-full {
  border-bottom: 0;
}

/* Primary Nav Variants */
.ap-nav {
  min-width: 0;
}

.ap-nav--center {
  margin: 0 auto;
}

.ap-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ap-nav a {
  display: inline-block;
  padding: 10px 2px;
  color: var(--ap-ink);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.ap-nav li {
  position: relative;
}

.ap-nav .menu-item-has-children > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 5px;
  font-size: 0.78em;
  opacity: 0.75;
}

.ap-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 90;
  min-width: 220px;
  background: var(--ap-bg);
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  padding: 6px 0;
  margin: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.ap-nav li:hover > .sub-menu,
.ap-nav li:focus-within > .sub-menu {
  display: flex;
}

.ap-nav .sub-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 0.87rem;
  color: var(--ap-ink) !important;
  text-transform: none;
  letter-spacing: 0;
  border-left: 0 !important;
  margin-left: 0 !important;
}

.ap-nav .sub-menu a::after {
  display: none !important;
}

.ap-nav .sub-menu a:hover {
  background: var(--ap-accent-soft);
  color: var(--ap-accent) !important;
}

.ap-nav a:hover,
.ap-nav .current-menu-item > a {
  color: var(--ap-accent);
}

.ap-nav--caps a {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.ap-nav--underline .current-menu-item > a::after,
.ap-nav--underline a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ap-accent);
}

.ap-nav--dot .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ap-accent);
}

.ap-nav--dividers ul {
  gap: 0;
}

.ap-nav--dividers li + li a {
  padding-left: 14px;
  margin-left: 14px;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
}

.ap-nav--inverse a {
  color: rgba(255, 255, 255, 0.94);
  padding: 12px 6px;
}

.ap-nav--inverse a:hover,
.ap-nav--inverse .current-menu-item > a {
  color: #ffffff;
  text-decoration: none;
}

.ap-nav--active-box .current-menu-item > a {
  background: #ffffff;
  color: var(--ap-accent) !important;
  padding: 10px 16px;
  border-radius: 6px;
}

/* Header Tools, Buttons, Search & SVG Icons */
.ap-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ap-icon-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ap-icon-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  text-decoration: none;
}

.ap-icon-links--dark a {
  color: var(--ap-ink-soft);
}

.ap-icon-links--boxed a {
  border: 1px solid var(--ap-border);
  color: var(--ap-ink);
  width: 34px;
  height: 34px;
}

.ap-icon-links--boxed-dark a {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 32px;
  height: 32px;
}

.ap-icon-links--round a {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.ap-icon-links--colored a {
  background: var(--ap-accent);
  color: #ffffff;
  width: 34px;
  height: 34px;
}

.ap-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  background: var(--ap-bg);
  color: var(--ap-ink);
  cursor: pointer;
}

.ap-icon-btn--plain {
  border-color: transparent;
  background: transparent;
}

.ap-icon-btn--inv {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ap-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ap-icon-circle--accent {
  background: var(--ap-accent);
  color: #ffffff;
}

.ap-icon-circle--muted {
  background: var(--ap-surface-2);
  color: var(--ap-ink);
}

.ap-icon-circle--soft {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  color: var(--ap-ink);
}

.ap-band-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.14);
  color: #ffffff;
  cursor: pointer;
}

.ap-band-search-btn--dark {
  background: #27272a;
}

.ap-search-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  color: var(--ap-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}

.ap-search-text-btn--line {
  border-bottom: 1px solid var(--ap-border);
}

.ap-cta-pill,
.ap-cta-filled,
.ap-cta-outline,
.ap-cta-accent-sq,
.ap-cta-dark-sq,
.ap-cta-inv-outline,
.ap-cta-outline-light,
.ap-cta-solid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.ap-cta-pill {
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  color: var(--ap-ink);
  background: var(--ap-bg);
}

.ap-cta-filled,
.ap-cta-solid {
  border-radius: 8px;
  background: var(--ap-accent);
  color: #ffffff !important;
}

.ap-cta-outline {
  border: 1.5px solid var(--ap-accent);
  border-radius: 8px;
  color: var(--ap-accent) !important;
}

.ap-cta-accent-sq {
  border-radius: 4px;
  background: var(--ap-accent);
  color: #ffffff !important;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.ap-cta-dark-sq {
  border-radius: 4px;
  background: var(--ap-ink);
  color: #ffffff !important;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.ap-cta-inv-outline,
.ap-cta-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: #ffffff !important;
}

.ap-spot-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--ap-accent-soft);
  color: var(--ap-accent);
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.ap-inline-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  background: var(--ap-bg);
  overflow: hidden;
}

.ap-inline-search input {
  border: 0;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.85rem;
  width: 195px;
  background: transparent;
  color: var(--ap-ink);
}

.ap-inline-search input:focus {
  outline: none;
}

.ap-inline-search button {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ap-muted);
}

.ap-inline-search--dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.ap-inline-search--dark input {
  color: #ffffff;
}

/* Ticker Bar */
.ap-ticker-bar {
  background: var(--ap-surface);
  border-top: 1px solid var(--ap-border);
  border-bottom: 1px solid var(--ap-border);
  padding: 7px 0;
}

.ap-ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ap-ticker-left,
.ap-ticker-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ap-ticker-badge {
  display: inline-block;
  padding: 3px 9px;
  background: var(--ap-accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ap-ticker-link,
.ap-ticker-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ap-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-mobile-only {
  display: none;
}

/* Slide-In Off-Canvas Drawer */
.ap-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ap-drawer-backdrop.is-open {
  opacity: 1;
}

.ap-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(330px, 88vw);
  z-index: 9999;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 12px 0 36px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.22s ease;
}

.ap-drawer.is-open {
  transform: translateX(0);
}

.ap-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.ap-drawer-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ap-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ap-drawer-nav li + li {
  border-top: 1px solid #f1f5f9;
}

.ap-drawer-nav a {
  display: block;
  padding: 10px 2px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
}

.ap-drawer-nav .sub-menu {
  padding-left: 14px;
  border-left: 2px solid var(--ap-accent);
  margin: 0 0 8px 4px;
}

.ap-drawer-nav .sub-menu a {
  padding: 7px 2px;
  font-size: 0.88rem;
  color: var(--ap-ink-soft);
}

.ap-drawer-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.ap-drawer-legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.85rem;
}

.ap-compact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-compact-item {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.ap-compact-thumb {
  width: 56px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.ap-thumb-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ap-accent-soft);
  color: var(--ap-accent);
  font-weight: 800;
  font-size: 0.85rem;
}

.ap-compact-meta strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.3;
  color: inherit;
}

.ap-compact-meta small {
  display: block;
  font-size: 0.76rem;
  opacity: 0.72;
  margin-top: 2px;
}

.ap-compact-fallback {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.9rem;
}

html.ap-dark-mode body {
  background: #0f172a;
  color: #e2e8f0;
  --ap-bg: #1e293b;
  --ap-surface: #0f172a;
  --ap-surface-2: #334155;
  --ap-ink: #f8fafc;
  --ap-ink-soft: #cbd5e1;
  --ap-border: #334155;
}

.ap-search-bar {
  border-top: 1px solid var(--ap-border);
  background: var(--ap-surface);
  padding: 14px 0;
}

.ap-search-bar[hidden] {
  display: none;
}

.ap-search-form {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.ap-search-form input[type="search"] {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.96rem;
  background: #fff;
  color: var(--ap-ink);
}

.ap-btn,
.ap-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ap-accent);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.ap-btn:hover,
.ap-search-form button:hover {
  background: var(--ap-accent-hover);
  color: #fff;
  text-decoration: none;
}

/* Main Layout */
.ap-main {
  padding: 36px 0 60px;
}

.ap-layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 38px;
  align-items: start;
}

.ap-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ap-widget {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 20px;
}

.ap-widget-title {
  margin: 0 0 14px;
  font-family: var(--ap-font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-ink);
}

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

.ap-widget li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ap-border);
}

.ap-widget li a {
  color: var(--ap-ink-soft);
  font-weight: 500;
  font-size: 0.94rem;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ap-widget li a:hover {
  color: var(--ap-accent);
}

.ap-count-pill {
  font-size: 0.78rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ap-surface-2);
  color: var(--ap-muted);
}

/* Hero / Intro */
.ap-hero {
  background: linear-gradient(135deg, var(--ap-accent-soft) 0%, var(--ap-surface) 100%);
  border: 1px solid var(--ap-border);
  border-radius: calc(var(--ap-radius) + 4px);
  padding: clamp(24px, 4vw, 42px);
  margin-bottom: 32px;
}

.ap-hero--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}

.ap-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ap-accent);
  margin-bottom: 8px;
}

.ap-hero h1 {
  margin: 0 0 10px;
  font-family: var(--ap-font-head);
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ap-hero p {
  margin: 0;
  color: var(--ap-ink-soft);
  max-width: 68ch;
  font-size: 1.03rem;
}

.ap-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ap-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ap-border);
  color: var(--ap-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.ap-cat-pill:hover {
  border-color: var(--ap-accent);
  color: var(--ap-accent);
  text-decoration: none;
}

/* Section headings */
.ap-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ap-border);
}

.ap-section-head h2 {
  margin: 0;
  font-family: var(--ap-font-head);
  font-size: 1.38rem;
  letter-spacing: -0.02em;
}

.ap-section-link {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Post Grids & Cards */
.ap-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ap-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ap-list-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ap-card {
  background: var(--ap-bg);
  border-radius: var(--ap-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ap-card--bordered {
  border: 1px solid var(--ap-border);
}

.ap-card--elevated {
  border: 1px solid var(--ap-border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.ap-card--elevated:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.ap-card--minimal {
  border: 0;
  border-bottom: 1px solid var(--ap-border);
  border-radius: 0;
  padding-bottom: 18px;
}

.ap-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ap-surface-2);
  aspect-ratio: var(--ap-ratio);
}

.ap-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ap-card--minimal .ap-card-body {
  padding: 14px 0 0;
}

.ap-card--lead {
  margin-bottom: 26px;
}

.ap-card--lead .ap-card-title {
  font-size: clamp(1.38rem, 2.5vw, 1.85rem);
}

.ap-card--horizontal {
  flex-direction: row;
  align-items: stretch;
}

.ap-card--horizontal .ap-card-media {
  width: 34%;
  min-width: 220px;
  aspect-ratio: 4 / 3;
}

.ap-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ap-muted);
  margin-bottom: 8px;
}

.ap-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--ap-accent-soft);
  color: var(--ap-accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.ap-card-title {
  margin: 0 0 8px;
  font-family: var(--ap-font-head);
  font-size: 1.15rem;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

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

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

.ap-card-excerpt {
  margin: 0;
  color: var(--ap-ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.ap-hub-section {
  margin-top: 38px;
}

/* Single & Page Article Styling */
.ap-article-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.ap-breadcrumbs {
  font-size: 0.85rem;
  color: var(--ap-muted);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-breadcrumbs a {
  color: var(--ap-muted);
}

.ap-article-header h1 {
  margin: 10px 0 14px;
  font-family: var(--ap-font-head);
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.ap-featured-figure {
  margin: 22px 0 28px;
  border-radius: var(--ap-radius);
  overflow: hidden;
  background: var(--ap-surface-2);
  aspect-ratio: 16 / 9;
}

.ap-featured-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-entry-content {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--ap-ink-soft);
}

.ap-entry-content h2,
.ap-entry-content h3,
.ap-entry-content h4 {
  font-family: var(--ap-font-head);
  color: var(--ap-ink);
  letter-spacing: -0.02em;
  line-height: 1.28;
  margin: 1.75em 0 0.65em;
  scroll-margin-top: 84px;
}

.ap-entry-content h2 {
  font-size: 1.55rem;
}

.ap-entry-content h3 {
  font-size: 1.26rem;
}

.ap-entry-content p,
.ap-entry-content ul,
.ap-entry-content ol {
  margin: 0 0 1.2em;
}

.ap-entry-content ul,
.ap-entry-content ol {
  padding-left: 1.4em;
}

.ap-entry-content li + li {
  margin-top: 0.45em;
}

.ap-entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--ap-accent);
  background: var(--ap-surface);
  border-radius: 0 10px 10px 0;
  color: var(--ap-ink);
}

.ap-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}

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

.ap-entry-content th {
  background: var(--ap-surface);
  color: var(--ap-ink);
}

/* Table of Contents */
.ap-toc {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 16px 20px;
  margin: 22px 0 28px;
}

.ap-toc summary {
  cursor: pointer;
  font-family: var(--ap-font-head);
  font-weight: 700;
  color: var(--ap-ink);
  font-size: 1rem;
}

.ap-toc ol {
  margin: 12px 0 0;
  padding-left: 1.25em;
  font-size: 0.94rem;
}

.ap-toc li.ap-toc-sub {
  margin-left: 1em;
  list-style-type: circle;
}

/* Author Box */
.ap-author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 22px;
  margin: 36px 0;
}

.ap-author-avatar {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ap-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  overflow: hidden;
}

.ap-author-avatar img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

.ap-author-name {
  margin: 0;
  font-family: var(--ap-font-head);
  font-size: 1.08rem;
}

.ap-author-role {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ap-accent);
  margin: 2px 0 6px;
}

.ap-author-bio {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ap-ink-soft);
}

/* Post Navigation & Related */
.ap-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

.ap-post-nav a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-weight: 600;
  font-size: 0.93rem;
}

.ap-post-nav span {
  display: block;
  font-size: 0.78rem;
  color: var(--ap-muted);
  margin-bottom: 4px;
}

.ap-related {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--ap-border);
}

/* Pagination */
.ap-pagination {
  margin: 34px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ap-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  color: var(--ap-ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.ap-pagination .page-numbers.current {
  background: var(--ap-accent);
  border-color: var(--ap-accent);
  color: #fff;
}

/* Safe Ad Containers (Zero CLS) */
.ap-ad-slot {
  margin: 26px auto;
  text-align: center;
  background: var(--ap-surface);
  border: 1px dashed var(--ap-border);
  border-radius: 10px;
  padding: 8px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ap-ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ap-muted);
  margin-bottom: 4px;
}

/* Empty / Archive / Search States */
.ap-empty-box {
  padding: 36px;
  border: 1px dashed var(--ap-border);
  border-radius: var(--ap-radius);
  background: var(--ap-surface);
}

.ap-empty-box h2 {
  margin-top: 0;
}

/* Comments */
.ap-comments {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--ap-border);
}

.ap-comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.ap-comment-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--ap-border);
}

.ap-comments input[type="text"],
.ap-comments input[type="email"],
.ap-comments input[type="url"],
.ap-comments textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  font: inherit;
}

.ap-comments input[type="submit"] {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--ap-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Footers (12 Modern Editorial, Newsroom & Light/Dark Architectures)
   ========================================================================== */
.ap-footer {
  background: var(--ap-footer-bg);
  color: var(--ap-footer-ink);
  margin-top: 52px;
}

.ap-footer a {
  color: inherit;
  text-decoration: none;
}

.ap-footer a:hover {
  text-decoration: underline;
}

.ap-ftr-grid {
  display: grid;
  gap: 28px;
  padding: 46px 0 36px;
}

.ap-ftr-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-ftr-grid--4col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-ftr-grid--kicker {
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1.3fr;
}

.ap-ftr-grid--soledad {
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
}

.ap-ftr-grid--central {
  grid-template-columns: 1fr 1fr 1fr 1.1fr;
}

.ap-footer-title {
  color: #ffffff;
  font-family: var(--ap-font-head);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.ap-ftr-big {
  font-size: 1.6rem;
  text-transform: none;
  margin: 0;
}

.ap-footer-brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.ap-footer-desc {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.ap-footer-note {
  margin: 0 0 10px;
  font-size: 0.85rem;
  opacity: 0.78;
  line-height: 1.5;
}

.ap-footer-contact {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.ap-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.ap-footer-menu li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ap-ftr-count {
  font-size: 0.78rem;
  opacity: 0.65;
}

.ap-footer-menu--inline,
.ap-footer-menu--inline-dots {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.ap-footer-menu--inline-dots {
  justify-content: center;
}

.ap-footer-menu--inline-dots li + li::before {
  content: "•";
  margin-right: 16px;
  opacity: 0.5;
}

.ap-footer-menu--arrows a::before {
  content: "▸ ";
  color: var(--ap-accent);
  font-size: 0.8em;
}

.ap-footer-menu--divided li + li {
  border-top: 1px solid var(--ap-border);
  padding-top: 7px;
}

.ap-ftr-2col-list ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
}

.ap-footer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ap-footer-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--ap-border);
  color: var(--ap-ink);
}

.ap-ftr--veen-dot-light .ap-footer-pill {
  background: var(--ap-accent);
  border-color: transparent;
  color: #ffffff;
}

.ap-ftr-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
  font-size: 0.83rem;
}

.ap-ftr-bottom--darker {
  background: rgba(0, 0, 0, 0.28);
}

.ap-ftr-bottom--light {
  background: var(--ap-surface);
  border-top: 1px solid var(--ap-border);
  color: var(--ap-muted);
}

.ap-ftr-bottom--center {
  text-align: center;
  padding: 22px 0;
}

.ap-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ap-footer-bottom--stack {
  flex-direction: column;
}

.ap-ftr-copy-mini {
  margin: 10px 0 0;
  font-size: 0.8rem;
  opacity: 0.72;
}

/* Specific Footer Architectural Looks */
.ap-ftr--kicker-dark {
  background: #111315;
  color: #cbd5e1;
}

.ap-ftr--soledad-5col {
  background: #18181b;
  color: #d4d4d8;
}

.ap-ftr-banner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 18px;
  font-size: 0.94rem;
}

.ap-ftr--split-contrast {
  background: #ffffff;
  color: var(--ap-ink);
  border-top: 1px solid var(--ap-border);
}

.ap-ftr--split-contrast .ap-footer-title {
  color: var(--ap-ink);
}

.ap-ftr-split-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1.05fr 1.2fr;
  gap: 0;
  align-items: stretch;
}

.ap-ftr-split-light {
  padding: 36px 26px;
}

.ap-ftr-split-dark {
  background: #111315;
  color: #f8fafc;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.ap-ftr-split-dark .ap-site-title a {
  color: #ffffff;
}

.ap-ftr--editorial-white,
.ap-ftr--warm-card,
.ap-ftr--veen-dot-light {
  background: #ffffff;
  color: var(--ap-ink-soft);
  border-top: 1px solid var(--ap-border);
}

.ap-ftr--maktub-light {
  background: var(--ap-surface);
  color: var(--ap-ink-soft);
  border-top: 1px solid var(--ap-border);
}

.ap-ftr--editorial-white .ap-footer-title,
.ap-ftr--warm-card .ap-footer-title,
.ap-ftr--maktub-light .ap-footer-title,
.ap-ftr--veen-dot-light .ap-footer-title {
  color: var(--ap-ink);
  text-transform: none;
  font-size: 1.04rem;
}

.ap-ftr-title--stripe {
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, #e2e8f0 2px, #e2e8f0 3px);
}

.ap-ftr-title--stripe span {
  background: #ffffff;
  padding-right: 10px;
}

.ap-ftr-title--line-after {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ap-ftr-title--line-after::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ap-accent);
}

.ap-ftr-title--rule {
  border-bottom: 1px solid var(--ap-border);
  padding-bottom: 8px;
}

.ap-ftr-title--dot i {
  color: var(--ap-accent);
  font-style: normal;
  margin-left: 2px;
}

.ap-ftr-warm-card {
  background: var(--ap-accent-soft);
  border-radius: 14px;
  padding: 20px;
}

.ap-ftr--dark-overlay {
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  color: #e2e8f0;
}

.ap-ftr-overlay-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ap-ftr-overlay-top .ap-site-title a {
  color: #ffffff;
}

.ap-ftr-title--pill {
  background: rgba(0, 0, 0, 0.4);
  padding: 7px 12px;
  border-radius: 6px;
}

.ap-ftr--newsroom-3col {
  background: #1a1b1e;
  color: #cbd5e1;
}

.ap-ftr-title--underline {
  border-bottom: 2px solid var(--ap-accent);
  padding-bottom: 8px;
}

.ap-ftr--central-mega {
  background: #09090b;
  color: #e4e4e7;
}

.ap-ftr-mega-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 0;
}

.ap-ftr-mega-top .ap-site-title a {
  color: #ffffff;
}

.ap-ftr--navy-corporate {
  background: #13315c;
  color: #dbeafe;
}

.ap-ftr--charcoal-editorial {
  background: #27272a;
  color: #e4e4e7;
}

.ap-ftr-cta-box {
  font-size: 0.86rem;
}

.ap-ftr-cta-text {
  margin: 0 0 8px;
  opacity: 0.86;
}

.ap-ftr-email-line {
  margin-bottom: 10px;
  font-weight: 700;
}

.ap-ftr-cta-btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 6px;
  background: var(--ap-accent);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
}

.ap-ftr-cta-box--underline .ap-ftr-cta-btn {
  background: transparent;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
}

.ap-ftr-author {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ap-ftr-author-role {
  display: block;
  font-size: 0.78rem;
  color: var(--ap-accent);
  margin-bottom: 4px;
}

.ap-ftr-author p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ap-ftr-wordmark {
  font-family: var(--ap-font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--ap-ink);
  letter-spacing: -0.04em;
}

/* Cookie Notice (Zero CLS floating bar) */
.ap-cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 760px;
  margin: 0 auto;
  z-index: 90;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  font-size: 0.88rem;
}

.ap-cookie-bar[hidden] {
  display: none;
}

.ap-cookie-bar a {
  color: #93c5fd;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 960px) {
  .ap-layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  .ap-sidebar {
    position: static;
  }
  .ap-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ap-hero--split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .ap-ftr-grid--4col,
  .ap-ftr-grid--kicker,
  .ap-ftr-grid--soledad,
  .ap-ftr-grid--central,
  .ap-ftr-split-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ap-desktop-only,
  .ap-header .ap-nav,
  .ap-nav-floating-pill {
    display: none !important;
  }
  .ap-mobile-only {
    display: inline-flex;
  }
  .ap-header-row--3col {
    display: flex;
    justify-content: space-between;
  }
  .ap-grid-3,
  .ap-grid-2,
  .ap-post-nav,
  .ap-ftr-grid--3col,
  .ap-ftr-grid--4col,
  .ap-ftr-grid--kicker,
  .ap-ftr-grid--soledad,
  .ap-ftr-grid--central,
  .ap-ftr-split-wrap {
    grid-template-columns: 1fr;
  }
  .ap-card--horizontal {
    flex-direction: column;
  }
  .ap-card--horizontal .ap-card-media {
    width: 100%;
    min-width: 0;
  }
  .ap-cookie-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   6 Optional Anti-Footprint Visual Skins
   ========================================================================== */

/* 1. Dark Newsroom: dark high-contrast header, sharp corners, crisp dividers */
body.ap-skin-dark-newsroom {
  --ap-radius: 4px;
}
body.ap-skin-dark-newsroom .ap-header {
  background: var(--ap-footer-bg);
  border-bottom-color: var(--ap-accent);
  border-bottom-width: 3px;
}
body.ap-skin-dark-newsroom .ap-site-title a,
body.ap-skin-dark-newsroom .ap-nav a {
  color: #ffffff;
}
body.ap-skin-dark-newsroom .ap-site-desc {
  color: #cbd5e1;
}
body.ap-skin-dark-newsroom .ap-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
body.ap-skin-dark-newsroom .ap-hero {
  background: var(--ap-surface);
  border-left: 5px solid var(--ap-accent);
}
body.ap-skin-dark-newsroom .ap-badge {
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 2. Soft Minimal: airy surface background, floating white cards, pill controls */
body.ap-skin-soft-minimal {
  --ap-bg: #f8fafc;
  --ap-radius: 18px;
}
body.ap-skin-soft-minimal .ap-header {
  background: #ffffff;
}
body.ap-skin-soft-minimal .ap-card {
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}
body.ap-skin-soft-minimal .ap-btn,
body.ap-skin-soft-minimal .ap-search-form button {
  border-radius: 999px;
}
body.ap-skin-soft-minimal .ap-hero {
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

/* 3. Broadsheet Print: editorial newspaper double borders, sharp edges, flat */
body.ap-skin-broadsheet-print {
  --ap-radius: 0px;
}
body.ap-skin-broadsheet-print .ap-header {
  border-top: 4px solid var(--ap-ink);
  border-bottom: 2px solid var(--ap-ink);
}
body.ap-skin-broadsheet-print .ap-hero {
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ap-ink);
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}
body.ap-skin-broadsheet-print .ap-card {
  box-shadow: none;
  border-color: var(--ap-border);
}
body.ap-skin-broadsheet-print .ap-section-head {
  border-bottom-color: var(--ap-ink);
}

/* 4. Modern Portal: colored top bar, accent border glow, crisp portal hero */
body.ap-skin-modern-portal::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--ap-accent);
}
body.ap-skin-modern-portal .ap-card:hover {
  border-color: var(--ap-accent);
}
body.ap-skin-modern-portal .ap-widget {
  border-top: 3px solid var(--ap-accent);
}

/* 5. Compact Digest: flips sidebar to the LEFT on desktop + tighter card spacing */
body.ap-skin-compact-digest {
  --ap-radius: 10px;
}
@media (min-width: 961px) {
  body.ap-skin-compact-digest .ap-layout-with-sidebar {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  body.ap-skin-compact-digest .ap-layout-with-sidebar > .ap-sidebar {
    order: -1;
  }
}
body.ap-skin-compact-digest .ap-card-body {
  padding: 16px;
}

/* ==========================================================================
   RTL Language Support (Arabic, Standard Urdu)
   ========================================================================== */
[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Nastaliq Urdu", Arial, sans-serif;
}
[dir="rtl"] .ap-entry-content blockquote {
  border-left: 0;
  border-right: 4px solid var(--ap-accent);
  border-radius: 10px 0 0 10px;
}
[dir="rtl"] .ap-entry-content ul,
[dir="rtl"] .ap-entry-content ol,
[dir="rtl"] .ap-toc ol {
  padding-left: 0;
  padding-right: 1.4em;
}
[dir="rtl"] .ap-toc li.ap-toc-sub {
  margin-left: 0;
  margin-right: 1em;
}
@media (max-width: 760px) {
  [dir="rtl"] .ap-nav ul {
    align-items: flex-end;
  }
}
