/**
 * Aouniat 3.0 — Modern Arabic Editorial Journal
 * Clean-sheet visual system layered above the legacy AwesomePress core.
 */

:root {
  --a3-bg: #f3f1ec;
  --a3-bg-soft: #f8f6f1;
  --a3-surface: #fffdf9;
  --a3-surface-strong: #ffffff;
  --a3-ink: #1b1e21;
  --a3-ink-soft: #34383c;
  --a3-muted: #77756f;
  --a3-faint: #a4a19a;
  --a3-border: #e3dfd6;
  --a3-border-dark: rgba(255,255,255,.12);
  --a3-accent: #982638;
  --a3-accent-deep: #711725;
  --a3-accent-soft: #f5e7e9;
  --a3-gold: #b88a52;
  --a3-header: #191d20;
  --a3-header-2: #22272b;
  --a3-shadow-sm: 0 8px 26px rgba(28, 31, 34, .06);
  --a3-shadow-md: 0 20px 60px rgba(28, 31, 34, .10);
  --a3-shadow-lg: 0 32px 90px rgba(20, 22, 24, .16);
  --a3-radius-sm: 12px;
  --a3-radius: 20px;
  --a3-radius-lg: 30px;
  --a3-shell: 1240px;
  --a3-reading: 790px;
  --a3-font: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

html[data-theme="dark"] {
  --a3-bg: #131619;
  --a3-bg-soft: #191d20;
  --a3-surface: #1d2226;
  --a3-surface-strong: #22272b;
  --a3-ink: #f4f1eb;
  --a3-ink-soft: #d7d5cf;
  --a3-muted: #aaa8a2;
  --a3-faint: #777c80;
  --a3-border: #30363b;
  --a3-accent: #d86475;
  --a3-accent-deep: #f07888;
  --a3-accent-soft: rgba(216,100,117,.12);
  --a3-shadow-sm: 0 8px 26px rgba(0,0,0,.16);
  --a3-shadow-md: 0 20px 60px rgba(0,0,0,.22);
  --a3-shadow-lg: 0 32px 90px rgba(0,0,0,.28);
}

html {
  scroll-behavior: smooth;
  background: var(--a3-bg);
}

body,
button,
input,
select,
textarea {
  font-family: var(--a3-font);
}

body.aouniat-v3 {
  margin: 0;
  background: var(--a3-bg);
  color: var(--a3-ink);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

body.aouniat-v3 * {
  box-sizing: border-box;
}

body.aouniat-v3 a {
  color: inherit;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

body.aouniat-v3 a:visited { color: inherit; }
body.aouniat-v3 img { max-width: 100%; height: auto; }

body.aouniat-v3 a:focus-visible,
body.aouniat-v3 button:focus-visible,
body.aouniat-v3 input:focus-visible,
body.aouniat-v3 textarea:focus-visible,
body.aouniat-v3 select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--a3-accent) 35%, transparent);
  outline-offset: 4px;
}

.a3-shell {
  width: min(calc(100% - 48px), var(--a3-shell));
  margin-inline: auto;
}

.site-content {
  padding: 0 !important;
  margin: 0 !important;
  background: var(--a3-bg);
}

.site-content > .inner,
.aouniat-v3 .inner {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.aouniat-v3 .content-area {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* --------------------------------------------------------------------------
 * Header / brand
 * -------------------------------------------------------------------------- */
.a3-site-header {
  position: relative;
  z-index: 50;
  background:
    radial-gradient(circle at 15% -20%, rgba(152,38,56,.18), transparent 32%),
    linear-gradient(135deg, var(--a3-header), var(--a3-header-2));
  color: #fff;
  border: 0;
  box-shadow: none;
}

.a3-header-shell {
  width: min(calc(100% - 48px), var(--a3-shell));
  margin-inline: auto;
}

.a3-header-main {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.a3-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  text-align: start;
}

.a3-branding .custom-logo-link {
  display: flex;
  margin: 0;
}

.a3-branding .custom-logo {
  width: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
}

.a3-brand-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.a3-branding .site-title {
  margin: 0;
  line-height: 1;
}

.a3-branding .site-title a {
  color: #fff !important;
  font-family: var(--a3-font);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.a3-branding .site-title a:hover { opacity: .88; }

.a3-since {
  color: rgba(255,255,255,.48);
  font-size: .73rem;
  font-weight: 500;
  white-space: nowrap;
}

.a3-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a3-icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #fff;
  cursor: pointer;
}

.a3-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.2);
}

.a3-theme-icon { font-size: 1.2rem; line-height: 1; }

.a3-header-description {
  max-width: 770px;
  margin: 14px 0 30px auto;
  color: rgba(255,255,255,.72);
  font-size: clamp(.95rem, 1.4vw, 1.06rem);
  line-height: 2;
  text-align: start;
}

.a3-nav-row {
  border-top: 1px solid rgba(255,255,255,.08);
}

.a3-navigation {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: 0;
  color: #fff;
  text-align: start;
}

.a3-navigation .menu-toggle {
  margin: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.a3-navigation ul,
.a3-navigation .menu {
  margin: 0;
  padding: 0;
}

.a3-navigation a,
.a3-navigation a:visited {
  padding: 19px 16px;
  color: rgba(255,255,255,.76);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  background: transparent;
}

.a3-navigation a:hover,
.a3-navigation a:focus,
.a3-navigation .current-menu-item > a,
.a3-navigation .current-menu-ancestor > a {
  color: #fff;
  background: transparent;
}

.a3-navigation .current-menu-item > a::after,
.a3-navigation .current-menu-ancestor > a::after {
  content: "";
  position: absolute;
  inset-inline: 16px;
  bottom: 10px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  opacity: .7;
}

.a3-navigation li { position: relative; }

@media (min-width: 769px) {
  .a3-navigation > ul,
  .a3-navigation .menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .a3-navigation li { float: none; }
  .a3-navigation ul ul {
    min-width: 220px;
    padding: 8px;
    background: var(--a3-surface);
    border: 1px solid var(--a3-border);
    border-radius: var(--a3-radius-sm);
    box-shadow: var(--a3-shadow-md);
  }
  .a3-navigation ul ul a,
  .a3-navigation ul ul a:visited {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--a3-ink);
  }
  .a3-navigation ul ul a:hover { background: var(--a3-bg-soft); }
}

/* Search overlay */
.a3-search-panel {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14,17,19,.82);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.a3-search-panel[hidden] { display: none; }
.a3-search-open { overflow: hidden; }
.a3-search-open .a3-search-panel {
  opacity: 1;
  visibility: visible;
}

.a3-search-panel__inner {
  position: relative;
  width: min(720px, 100%);
  padding: clamp(32px, 7vw, 64px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--a3-radius-lg);
  background: #191d20;
  color: #fff;
  box-shadow: 0 40px 120px rgba(0,0,0,.38);
}

.a3-search-close {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
}

.a3-search-eyebrow,
.a3-eyebrow {
  margin: 0 0 8px;
  color: var(--a3-accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.a3-search-eyebrow { color: #dd8c98; }
.a3-search-panel h2 {
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.35;
}

.a3-search-panel .search-form { display: flex; gap: 8px; }
.a3-search-panel .search-field {
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 1rem;
}
.a3-search-panel .search-submit {
  min-height: 58px;
  padding: 10px 22px;
  border: 0;
  border-radius: 14px;
  background: var(--a3-accent);
  color: #fff;
  font-weight: 700;
}
.a3-search-hint { margin: 16px 0 0; color: rgba(255,255,255,.48); font-size: .84rem; }

/* --------------------------------------------------------------------------
 * Homepage hero
 * -------------------------------------------------------------------------- */
.a3-home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(58px, 8vw, 105px) 0;
  background:
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--a3-accent) 7%, transparent), transparent 34%),
    var(--a3-bg-soft);
  border-bottom: 1px solid var(--a3-border);
}

.a3-home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(38px, 6vw, 82px);
}

.a3-home-hero__copy { position: relative; z-index: 2; }
.a3-home-hero__meta,
.a3-story-card__meta,
.a3-article-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--a3-muted);
  font-size: .78rem;
}

.a3-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--a3-accent-soft);
  color: var(--a3-accent) !important;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.45;
}

.a3-kicker--hero {
  background: rgba(255,255,255,.12);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(7px);
}

.a3-home-hero .a3-kicker--hero {
  background: var(--a3-accent-soft);
  border: 0;
  color: var(--a3-accent) !important;
  backdrop-filter: none;
}

.a3-home-hero__title {
  margin: 18px 0 18px;
  color: var(--a3-ink);
  font-size: clamp(2.55rem, 5vw, 4.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.a3-home-hero__title a:hover { color: var(--a3-accent); }
.a3-home-hero__excerpt {
  max-width: 600px;
  margin: 0 0 26px;
  color: var(--a3-ink-soft);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 2.05;
}

.a3-primary-link,
.a3-secondary-link,
.a3-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--a3-accent) !important;
  font-weight: 700;
}

.a3-primary-link {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--a3-accent);
  color: #fff !important;
}
.a3-primary-link:hover { background: var(--a3-accent-deep); transform: translateY(-2px); }
.a3-primary-link span,
.a3-secondary-link span,
.a3-text-link span { transition: transform .18s ease; }
.a3-primary-link:hover span,
.a3-secondary-link:hover span,
.a3-text-link:hover span { transform: translateX(-4px); }

.a3-home-hero__media {
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius-lg);
  background: var(--a3-surface);
  box-shadow: var(--a3-shadow-lg);
}

.a3-home-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.a3-home-hero__media:hover .a3-home-hero__image { transform: scale(1.025); }

/* --------------------------------------------------------------------------
 * Sections and editorial cards
 * -------------------------------------------------------------------------- */
.a3-section { padding: clamp(64px, 8vw, 108px) 0; }
.a3-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}
.a3-section-heading h2,
.a3-archive-discovery__intro h2,
.a3-history-band h2 {
  margin: 0;
  color: var(--a3-ink);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.a3-section-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--a3-muted);
  font-size: .94rem;
}
.a3-section-heading--compact { margin-bottom: 26px; }

.a3-latest-section { background: var(--a3-bg); }
.a3-latest-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.a3-story-card {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius);
  background: var(--a3-surface);
  box-shadow: var(--a3-shadow-sm);
}

.a3-latest-grid .a3-story-card:first-child { grid-column: span 8; }

.a3-story-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--a3-bg-soft);
}
.a3-story-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.a3-story-card:hover .a3-story-card__image { transform: scale(1.035); }

.a3-story-card__body { padding: 22px 22px 24px; }
.a3-story-card__meta { margin-bottom: 12px; }
.a3-story-card__title {
  margin: 0 0 10px;
  color: var(--a3-ink);
  font-size: clamp(1.25rem, 2vw, 1.62rem);
  font-weight: 700;
  line-height: 1.5;
  text-wrap: balance;
}
.a3-story-card__title a:hover { color: var(--a3-accent); }
.a3-story-card__excerpt {
  margin: 0 0 16px;
  color: var(--a3-muted);
  font-size: .92rem;
  line-height: 1.9;
}
.a3-text-link { font-size: .82rem; }

.a3-story-card--wide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}
.a3-story-card--wide .a3-story-card__media { aspect-ratio: auto; min-height: 350px; }
.a3-story-card--wide .a3-story-card__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 46px); }
.a3-story-card--wide .a3-story-card__title { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.a3-story-card--wide .a3-story-card__excerpt { font-size: 1rem; }

/* Topics */
.a3-topics-section {
  border-top: 1px solid var(--a3-border);
  border-bottom: 1px solid var(--a3-border);
  background: var(--a3-bg-soft);
}
.a3-topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--a3-border);
  border-inline-start: 1px solid var(--a3-border);
}
.a3-topic-card {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-inline-end: 1px solid var(--a3-border);
  border-bottom: 1px solid var(--a3-border);
  background: transparent;
}
.a3-topic-card:hover { z-index: 1; background: var(--a3-surface); box-shadow: var(--a3-shadow-sm); transform: translateY(-2px); }
.a3-topic-card__name { color: var(--a3-ink); font-size: 1.08rem; font-weight: 700; }
.a3-topic-card__count { color: var(--a3-muted); font-size: .78rem; }
.a3-topic-card__arrow { position: absolute; inset-inline-end: 18px; bottom: 17px; color: var(--a3-faint); font-size: 1.25rem; }

/* Archive discovery */
.a3-archive-discovery {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 120%, rgba(152,38,56,.28), transparent 34%),
    #191d20;
  color: #fff;
}
.a3-archive-discovery__grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(48px, 8vw, 100px);
  align-items: start;
}
.a3-archive-discovery .a3-eyebrow { color: #dd8c98; }
.a3-archive-discovery__intro h2 { color: #fff; }
.a3-archive-discovery__intro > p:not(.a3-eyebrow) {
  margin: 18px 0 24px;
  color: rgba(255,255,255,.62);
  line-height: 2;
}
.a3-archive-discovery .a3-secondary-link { color: #fff !important; }
.a3-archive-list { border-top: 1px solid rgba(255,255,255,.14); }
.a3-archive-row {
  min-height: 118px;
  display: grid;
  grid-template-columns: 74px 1fr 36px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.a3-archive-row__year { color: #dd8c98; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.a3-archive-row__copy span { color: rgba(255,255,255,.42); font-size: .72rem; }
.a3-archive-row__copy h3 { margin: 4px 0 0; color: #fff; font-size: 1.18rem; line-height: 1.6; }
.a3-archive-row__copy h3 a:hover { color: #f0a1ad; }
.a3-archive-row__arrow { color: rgba(255,255,255,.55) !important; font-size: 1.4rem; text-align: end; }

/* History */
.a3-history-band {
  padding: 0;
  background: var(--a3-accent);
  color: #fff;
}
.a3-history-band__inner {
  min-height: 220px;
  display: grid;
  grid-template-columns: 1.3fr .7fr auto;
  align-items: center;
  gap: 44px;
  padding-block: 42px;
}
.a3-history-band .a3-eyebrow { color: rgba(255,255,255,.64); }
.a3-history-band h2 { color: #fff; }
.a3-history-stat { display: flex; flex-direction: column; }
.a3-history-stat strong { font-size: clamp(2.7rem, 6vw, 4.6rem); line-height: 1; font-weight: 700; }
.a3-history-stat span { margin-top: 8px; color: rgba(255,255,255,.7); font-size: .82rem; }
.a3-history-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 17px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff !important;
  font-weight: 700;
  white-space: nowrap;
}
.a3-history-action:hover { background: #fff; color: var(--a3-accent-deep) !important; }

/* --------------------------------------------------------------------------
 * Archive/search feeds
 * -------------------------------------------------------------------------- */
.a3-simple-hero {
  padding: clamp(60px, 9vw, 110px) 0;
  background: var(--a3-bg-soft);
  border-bottom: 1px solid var(--a3-border);
}
.a3-simple-hero h1,
.a3-simple-hero .page-title {
  max-width: 900px;
  margin: 0;
  color: var(--a3-ink);
  font-size: clamp(2.5rem, 5.4vw, 4.8rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: start;
  letter-spacing: -.035em;
}
.a3-simple-hero .archive-description,
.a3-simple-hero > .a3-shell > p:not(.a3-eyebrow) {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--a3-muted);
  font-size: 1rem;
  line-height: 2;
}
.a3-feed-shell { padding-block: clamp(48px, 7vw, 88px); }
.a3-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.a3-feed-grid .a3-story-card { grid-column: span 1; }
.a3-pagination-wrap { grid-column: 1 / -1; margin-top: 22px; }
.navigation.pagination,
.a3-pagination-wrap .pagination,
.a3-pagination-wrap .nav-links { width: 100%; }
.a3-pagination-wrap .nav-links,
.a3-pagination-wrap > .page-numbers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.a3-pagination-wrap .page-numbers,
.navigation.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--a3-border);
  border-radius: 12px;
  background: var(--a3-surface);
  color: var(--a3-muted);
}
.a3-pagination-wrap .page-numbers.current,
.navigation.pagination .page-numbers.current {
  border-color: var(--a3-accent);
  background: var(--a3-accent);
  color: #fff;
}
.a3-empty-state {
  grid-column: 1 / -1;
  max-width: 720px;
  padding: 40px;
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius);
  background: var(--a3-surface);
}

/* --------------------------------------------------------------------------
 * Single article
 * -------------------------------------------------------------------------- */
.a3-reading-progress {
  position: fixed;
  z-index: 100000;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: transparent;
  pointer-events: none;
}
.admin-bar .a3-reading-progress { top: 32px; }
.a3-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: right center;
  background: var(--a3-accent);
  transition: transform .08s linear;
}

.a3-article-hero {
  position: relative;
  isolation: isolate;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(86px, 11vw, 150px) 0 clamp(90px, 11vw, 145px);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(152,38,56,.24), transparent 32%),
    linear-gradient(135deg, #1a1e22, #2b3136);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.a3-article-hero__overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,14,16,.24), rgba(12,14,16,.84)),
    linear-gradient(90deg, rgba(12,14,16,.32), transparent 65%);
}
.a3-article-hero__inner { max-width: 1040px; text-align: center; }
.a3-article-hero__meta { justify-content: center; color: rgba(255,255,255,.74); }
.a3-article-hero__title {
  max-width: 980px;
  margin: 20px auto 0;
  color: #fff;
  font-size: clamp(2.9rem, 6.3vw, 6.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.04em;
  text-wrap: balance;
  text-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.a3-article-hero__deck {
  max-width: 760px;
  margin: 22px auto 0;
  color: rgba(255,255,255,.76);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 2;
}
.a3-article-hero__submeta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: rgba(255,255,255,.58);
  font-size: .78rem;
}
.a3-article-hero__submeta a { color: rgba(255,255,255,.82) !important; }

.a3-article-layout,
.a3-page-layout {
  width: min(calc(100% - 48px), 1040px);
  margin: -58px auto 0;
  position: relative;
  z-index: 3;
  padding-bottom: clamp(70px, 8vw, 110px);
}
.a3-article-main,
.a3-page-main { width: 100%; }

.single .single-entry,
.a3-page-main .page {
  margin: 0;
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius-lg);
  background: var(--a3-surface);
  box-shadow: var(--a3-shadow-md);
}

.single .entry-content,
.a3-page-main .entry-content {
  width: 100%;
  max-width: var(--a3-reading);
  margin-inline: auto;
  color: var(--a3-ink-soft);
  font-size: clamp(1.04rem, 1.5vw, 1.13rem);
  line-height: 2.12;
}
.single .entry-content > p:first-of-type {
  color: var(--a3-ink);
  font-size: 1.08em;
}
.entry-content p { margin: 0 0 1.55em; }
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--a3-ink);
  font-weight: 700;
  line-height: 1.55;
  text-wrap: balance;
}
.entry-content h2 { margin: 2.2em 0 .75em; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.entry-content h3 { margin: 2em 0 .7em; font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
.entry-content h4 { margin: 1.8em 0 .65em; font-size: 1.25rem; }
.entry-content a {
  color: var(--a3-accent) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--a3-accent) 35%, transparent);
  text-underline-offset: 4px;
}
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content strong { color: var(--a3-ink); }
.entry-content blockquote {
  margin: 2em 0;
  padding: 24px 26px;
  border: 0;
  border-inline-start: 4px solid var(--a3-accent);
  border-radius: var(--a3-radius-sm);
  background: var(--a3-bg-soft);
  color: var(--a3-ink-soft);
  font-size: 1.06em;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul,
.entry-content ol { margin: 0 0 1.55em; padding-inline-start: 1.5em; }
.entry-content li { margin-bottom: .48em; }
.entry-content hr { width: 120px; height: 2px; margin: 3em auto; border: 0; background: var(--a3-accent); opacity: .45; }
.entry-content img,
.entry-content figure img {
  border-radius: 16px;
}
.entry-content figure,
.entry-content .wp-caption { max-width: 100%; margin-top: 2em; margin-bottom: 2em; }
.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 9px;
  color: var(--a3-muted);
  font-size: .78rem;
  line-height: 1.7;
  text-align: center;
}
.entry-content pre,
.entry-content code,
.entry-content tt { direction: ltr; text-align: left; }
.entry-content pre {
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--a3-border);
  border-radius: 16px;
  background: var(--a3-bg-soft);
  color: var(--a3-ink-soft);
  font-size: .88rem;
  line-height: 1.75;
}
.entry-content table {
  width: 100%;
  margin: 2em 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--a3-border);
  border-radius: 14px;
  background: var(--a3-surface);
}
.entry-content th,
.entry-content td { padding: 11px 13px; border-bottom: 1px solid var(--a3-border); border-inline-end: 1px solid var(--a3-border); }
.entry-content tr:last-child > * { border-bottom: 0; }
.entry-content tr > *:last-child { border-inline-end: 0; }

.single .entry-footer {
  max-width: var(--a3-reading);
  margin: 42px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--a3-border);
  color: var(--a3-muted);
  font-size: .82rem;
}
.single .entry-footer .sep { display: none; }
.single .tags-links > a {
  display: inline-flex;
  margin: 0 0 7px 7px;
  padding: 6px 11px;
  border: 1px solid var(--a3-border);
  border-radius: 999px;
  background: var(--a3-bg-soft);
  color: var(--a3-muted) !important;
  text-decoration: none;
}
.single .tags-links > a:hover { border-color: var(--a3-accent); color: var(--a3-accent) !important; }

/* Related */
.a3-related {
  margin-top: clamp(52px, 7vw, 84px);
  padding-top: 10px;
}
.a3-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.a3-related .a3-story-card { grid-column: span 1; }
.a3-related .a3-story-card__body { padding: 18px; }
.a3-related .a3-story-card__title { font-size: 1.06rem; }
.a3-related .a3-story-card__media { aspect-ratio: 16 / 10; }

/* Post navigation */
.a3-post-navigation { margin-top: 28px; }
.a3-post-navigation .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.a3-post-navigation .nav-links > div { width: auto; float: none; }
.a3-post-navigation a {
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 24px 58px 24px 24px;
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius);
  background: var(--a3-surface);
  box-shadow: var(--a3-shadow-sm);
}
.a3-post-navigation a:hover { transform: translateY(-2px); box-shadow: var(--a3-shadow-md); border-color: color-mix(in srgb, var(--a3-accent) 30%, var(--a3-border)); }
.a3-nav-label { color: var(--a3-muted); font-size: .76rem; }
.a3-post-navigation strong { color: var(--a3-ink); font-size: 1.05rem; line-height: 1.6; }
.a3-nav-arrow { position: absolute; inset-inline-end: 22px; top: 50%; transform: translateY(-50%); color: var(--a3-accent); font-size: 2rem; }

/* Comments */
.a3-comments-shell,
.comments-area {
  margin-top: 28px;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--a3-border);
  border-radius: var(--a3-radius);
  background: var(--a3-surface);
  box-shadow: var(--a3-shadow-sm);
}
.a3-comments-shell .comments-area { margin: 0; padding: 0; border: 0; box-shadow: none; }
.comments-title,
.comment-reply-title {
  margin: 0 0 22px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--a3-border);
  color: var(--a3-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
}
.comment-reply-title::after,
.comments-title::after { display: none !important; }
.comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.comment-form-comment,
.comment-notes,
.logged-in-as,
.form-submit { grid-column: 1 / -1; }
.comment-form-url { display: none; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--a3-ink-soft); font-weight: 600; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  border: 1px solid var(--a3-border);
  border-radius: 12px;
  background: var(--a3-bg-soft);
  color: var(--a3-ink);
}
.comment-form textarea { min-height: 180px; padding: 16px; }
.comment-form input[type="text"],
.comment-form input[type="email"] { min-height: 50px; padding: 10px 13px; }
.form-submit .submit {
  min-height: 50px;
  padding: 10px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--a3-accent);
  color: #fff;
  font-weight: 700;
}

/* Page */
.a3-page-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(70px, 10vw, 130px) 0 clamp(92px, 12vw, 150px);
  background: linear-gradient(135deg, #1a1e22, #2b3136);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.a3-page-hero__inner { position: relative; z-index: 1; }
.a3-page-hero h1 { max-width: 900px; margin: 0; color: #fff; font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: 1.2; }
.a3-page-hero .a3-eyebrow { color: #dd8c98; }

/* Legacy gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2em 0;
}
.gallery .gallery-item { width: auto !important; max-width: none; margin: 0 !important; }
.gallery .gallery-icon,
.gallery .gallery-icon a { display: block; height: 100%; }
.gallery img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; border: 0 !important; border-radius: 14px; }

/* Hide legacy sidebars on the clean-sheet 3.0 public layouts. */
.home .widget-area,
.archive .widget-area,
.search .widget-area,
.single .widget-area,
.page .widget-area { display: none !important; }

/* --------------------------------------------------------------------------
 * Footer
 * -------------------------------------------------------------------------- */
.a3-footer {
  padding: 0;
  background: #171b1f;
  color: #fff;
  border: 0;
}
.a3-footer__inner {
  width: min(calc(100% - 48px), var(--a3-shell));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.35fr .65fr .75fr;
  gap: clamp(40px, 7vw, 90px);
  padding: clamp(62px, 8vw, 92px) 0;
}
.a3-footer__name { margin: 0; color: #fff; font-size: 2rem; font-weight: 700; line-height: 1.3; }
.a3-footer__since { margin: 8px 0 0; color: #dd8c98; font-size: .8rem; font-weight: 600; }
.a3-footer__description { max-width: 540px; margin: 18px 0 0; color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.95; }
.a3-footer__heading { margin: 0 0 16px; color: rgba(255,255,255,.42); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.a3-footer-menu,
.a3-footer-topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.a3-footer-menu a,
.a3-footer-topic-list a { color: rgba(255,255,255,.74) !important; font-size: .88rem; }
.a3-footer-menu a:hover,
.a3-footer-topic-list a:hover { color: #fff !important; transform: translateX(-2px); }
.a3-footer__bottom {
  width: min(calc(100% - 48px), var(--a3-shell));
  margin-inline: auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.42);
  font-size: .76rem;
}
.a3-back-to-top { color: rgba(255,255,255,.64) !important; }
.a3-back-to-top:hover { color: #fff !important; }

/* --------------------------------------------------------------------------
 * Forms / search outside overlay
 * -------------------------------------------------------------------------- */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1 1 auto; margin: 0; }
.search-field {
  width: 100%;
  min-height: 50px;
  padding: 9px 14px;
  border: 1px solid var(--a3-border);
  border-radius: 12px;
  background: var(--a3-surface);
  color: var(--a3-ink);
}
.search-submit {
  min-height: 50px;
  padding: 9px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--a3-accent);
  color: #fff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
 * Reveal motion
 * -------------------------------------------------------------------------- */
.a3-reveal { opacity: 1; transform: none; }
.a3-js .a3-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.a3-js .a3-reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .a3-home-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 42px; }
  .a3-home-hero__title { font-size: clamp(2.35rem, 5.2vw, 3.5rem); }
  .a3-topic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .a3-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a3-history-band__inner { grid-template-columns: 1.2fr .8fr; }
  .a3-history-action { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 900px) {
  .a3-home-hero__grid { grid-template-columns: 1fr; }
  .a3-home-hero__copy { max-width: 760px; }
  .a3-home-hero__media { order: -1; aspect-ratio: 16 / 9; }
  .a3-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a3-latest-grid .a3-story-card,
  .a3-latest-grid .a3-story-card:first-child,
  .a3-story-card--wide { display: block; }
  .a3-story-card--wide .a3-story-card__media { min-height: 0; aspect-ratio: 16 / 10; }
  .a3-topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a3-archive-discovery__grid { grid-template-columns: 1fr; }
  .a3-footer__inner { grid-template-columns: 1fr 1fr; }
  .a3-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .a3-shell,
  .a3-header-shell,
  .a3-footer__inner,
  .a3-footer__bottom,
  .a3-article-layout,
  .a3-page-layout { width: min(calc(100% - 28px), var(--a3-shell)); }

  .a3-header-main { min-height: 76px; }
  .a3-brand-copy { display: block; }
  .a3-branding .site-title a { font-size: 1.45rem; }
  .a3-since { display: block; margin-top: 5px; font-size: .66rem; }
  .a3-header-description { margin: 8px 0 22px; font-size: .88rem; line-height: 1.9; }
  .a3-navigation { min-height: auto; display: block; }
  .a3-navigation .menu-toggle { width: 100%; min-height: 52px; display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 600; }
  .a3-navigation .menu { padding-bottom: 10px; }
  .a3-navigation .menu li { border-top: 1px solid rgba(255,255,255,.07); }
  .a3-navigation .menu a { display: block; padding: 13px 6px; }
  .a3-navigation .current-menu-item > a::after { display: none; }

  .a3-home-hero { padding: 28px 0 54px; }
  .a3-home-hero__grid { gap: 26px; }
  .a3-home-hero__media { border-radius: 20px; }
  .a3-home-hero__title { margin-top: 14px; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.32; }
  .a3-home-hero__excerpt { font-size: .96rem; line-height: 1.95; }
  .a3-home-hero__meta span:last-child { display: none; }

  .a3-section { padding: 54px 0; }
  .a3-section-heading { display: block; margin-bottom: 24px; }
  .a3-section-heading > p { margin-top: 10px; }
  .a3-section-heading h2,
  .a3-archive-discovery__intro h2,
  .a3-history-band h2 { font-size: 2rem; }

  .a3-latest-grid,
  .a3-feed-grid { grid-template-columns: 1fr; gap: 16px; }
  .a3-story-card { border-radius: 17px; }
  .a3-story-card__body { padding: 18px; }
  .a3-story-card__title { font-size: 1.34rem; }

  .a3-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a3-topic-card { min-height: 122px; padding: 17px; }

  .a3-archive-row { grid-template-columns: 58px 1fr 24px; gap: 12px; min-height: 105px; }
  .a3-archive-row__copy h3 { font-size: 1.02rem; }

  .a3-history-band__inner { grid-template-columns: 1fr; gap: 25px; }
  .a3-history-stat strong { font-size: 3.2rem; }
  .a3-history-action { grid-column: auto; }

  .a3-simple-hero { padding: 50px 0 58px; }
  .a3-simple-hero h1,
  .a3-simple-hero .page-title { font-size: clamp(2.25rem, 10vw, 3.5rem); }
  .a3-feed-shell { padding-block: 38px 60px; }

  .a3-article-hero { min-height: 56vh; padding: 76px 0 88px; }
  .a3-article-hero__title { font-size: clamp(2.45rem, 11vw, 4rem); line-height: 1.25; }
  .a3-article-hero__deck { font-size: .96rem; }
  .a3-article-hero__meta span:nth-of-type(2) { display: none; }
  .a3-article-layout,
  .a3-page-layout { margin-top: -36px; padding-bottom: 65px; }
  .single .single-entry,
  .a3-page-main .page { padding: 28px 20px; border-radius: 20px; }
  .single .entry-content,
  .a3-page-main .entry-content { font-size: 1.03rem; line-height: 2.05; }
  .entry-content blockquote { padding: 18px; }

  .a3-related-grid { grid-template-columns: 1fr; }
  .a3-related .a3-story-card { display: grid; grid-template-columns: 115px 1fr; }
  .a3-related .a3-story-card__media { aspect-ratio: auto; min-height: 100%; }
  .a3-related .a3-story-card__body { padding: 14px; }
  .a3-related .a3-story-card__meta { margin-bottom: 6px; }
  .a3-related .a3-story-card__meta time { display: none; }
  .a3-related .a3-text-link { display: none; }

  .a3-post-navigation .nav-links { grid-template-columns: 1fr; }
  .a3-post-navigation a { min-height: 118px; }
  .comment-form { grid-template-columns: 1fr; }

  .a3-page-hero { padding: 58px 0 90px; }
  .a3-page-hero h1 { font-size: clamp(2.4rem, 11vw, 4rem); }

  .a3-footer__inner { grid-template-columns: 1fr; gap: 36px; padding: 54px 0; }
  .a3-footer__brand { grid-column: auto; }
  .a3-footer__bottom { min-height: 92px; flex-direction: column; justify-content: center; text-align: center; }

  .a3-search-panel { padding: 14px; }
  .a3-search-panel__inner { padding: 52px 22px 28px; border-radius: 22px; }
  .a3-search-panel .search-form { display: block; }
  .a3-search-panel .search-submit { width: 100%; margin-top: 8px; }
}

@media (max-width: 480px) {
  .a3-icon-button { width: 38px; height: 38px; }
  .a3-branding .custom-logo { width: 38px; max-width: 38px; max-height: 38px; }
  .a3-topic-grid { grid-template-columns: 1fr 1fr; }
  .a3-topic-card__name { font-size: .95rem; }
  .a3-topic-card__count { font-size: .7rem; }
  .a3-archive-discovery { padding-top: 60px; padding-bottom: 60px; }
  .a3-article-hero__meta { gap: 6px 9px; }
  .a3-article-hero__submeta { font-size: .72rem; }
  .gallery { grid-template-columns: 1fr; }
  .comments-area,
  .a3-comments-shell { padding: 22px 18px; }
  .form-submit .submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .a3-js .a3-reveal { opacity: 1; transform: none; }
}

/* Editorial placeholder for text-only archive posts. */
.a3-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255,.12), transparent 24%),
    linear-gradient(135deg, var(--a3-accent-deep), #24292d 68%);
  color: rgba(255,255,255,.92);
}
.a3-image-placeholder > span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  font-size: 2.4rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.1 refinements
 * -------------------------------------------------------------------------- */

/*
 * The 3.x public theme is full-width by design.  Old AwesomePress Customizer
 * sidebar classes can retain relative left/right offsets even after their
 * width is overridden, which made some older posts render in only half of a
 * desktop window.  Reset every legacy layout coordinate defensively.
 */
body.aouniat-v3 #primary,
body.aouniat-v3 .content-area,
body.aouniat-v3.layout-sidebar-content #primary,
body.aouniat-v3.layout-content-sidebar #primary,
body.aouniat-v3.layout-content-sidebar-sidebar #primary,
body.aouniat-v3.layout-sidebar-content-sidebar #primary,
body.aouniat-v3.layout-sidebar-sidebar-content #primary {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  position: static !important;
  inset: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 !important;
  padding-inline: 0 !important;
  transform: none !important;
}

/* Keep recommendations intentionally secondary to the article itself. */
.a3-related {
  width: min(100%, 900px);
  margin-inline: auto;
  margin-top: clamp(42px, 6vw, 66px);
}
.a3-related .a3-section-heading { margin-bottom: 22px; }
.a3-related .a3-section-heading h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}
.a3-related-grid { gap: 14px; }
.a3-related .a3-story-card { border-radius: 16px; }
.a3-related .a3-story-card__media { aspect-ratio: 16 / 9; }
.a3-related .a3-story-card__body { padding: 14px 15px 15px; }
.a3-related .a3-story-card__meta { margin-bottom: 8px; font-size: .72rem; }
.a3-related .a3-story-card__title { font-size: .96rem; line-height: 1.65; }
.a3-related .a3-text-link { margin-top: 9px; font-size: .76rem; }

/*
 * Legacy AwesomePress gives navigation and comment internals hard-coded white
 * backgrounds.  Let the editorial surface variables control them so light and
 * dark modes stay visually coherent.
 */
.site-main .a3-post-navigation {
  margin: 28px 0 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}
.a3-post-navigation a {
  background: var(--a3-surface);
}

.a3-comments-shell,
.a3-comments-shell .comments-area,
.a3-comments-shell .comment-respond,
.a3-comments-shell .comment-form,
.a3-comments-shell .comment-form-comment,
.a3-comments-shell .comment-form-author,
.a3-comments-shell .comment-form-email,
.a3-comments-shell .logged-in-as,
.a3-comments-shell .comment-notes,
.a3-comments-shell .form-submit {
  background: transparent !important;
}
.a3-comments-shell .comments-title,
.a3-comments-shell .comment-reply-title {
  background: transparent !important;
}
.a3-comments-shell .comment-form textarea,
.a3-comments-shell .comment-form input[type="text"],
.a3-comments-shell .comment-form input[type="email"] {
  background: var(--a3-bg-soft) !important;
  border-color: var(--a3-border) !important;
  color: var(--a3-ink) !important;
}
.a3-comments-shell .comment-form textarea::placeholder,
.a3-comments-shell .comment-form input::placeholder {
  color: var(--a3-faint);
}

@media (max-width: 768px) {
  /* Compact footer: brand on top, navigation + topics side-by-side. */
  .a3-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px 30px;
    padding: 38px 0 30px;
  }
  .a3-footer__brand { grid-column: 1 / -1; }
  .a3-footer__name { font-size: 1.65rem; }
  .a3-footer__description {
    max-width: 620px;
    margin-top: 12px;
    font-size: .82rem;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .a3-footer__heading { margin-bottom: 10px; }
  .a3-footer-menu,
  .a3-footer-topic-list { gap: 5px; }
  .a3-footer-menu a,
  .a3-footer-topic-list a { font-size: .82rem; }
  .a3-footer__bottom {
    min-height: 58px;
    flex-direction: row;
    justify-content: center;
    text-align: center;
  }
  .a3-back-to-top { display: none; }

  /* Related stories were already horizontal on phones; make them even calmer. */
  .a3-related { width: 100%; }
  .a3-related .a3-section-heading h2 { font-size: 1.8rem; }
  .a3-related .a3-story-card { grid-template-columns: 96px 1fr; }
  .a3-related .a3-story-card__body { padding: 11px 12px; }
  .a3-related .a3-story-card__title { font-size: .94rem; }
}

@media (max-width: 420px) {
  .a3-footer__inner {
    gap: 20px 18px;
    padding-top: 34px;
  }
  .a3-footer__description { -webkit-line-clamp: 3; }
  .a3-footer-menu a,
  .a3-footer-topic-list a { font-size: .79rem; }
  .a3-footer__bottom { min-height: 54px; }
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.2 — root viewport guard
 * -------------------------------------------------------------------------- */
/*
 * Some legacy post/plugin CSS on this long-running site can target generic
 * WordPress selectors such as .site and constrain the entire document.  The
 * symptom is the whole theme rendering as a narrow panel aligned to the RTL
 * edge of a wide browser.  Guard the actual 3.x root containers, not only
 * #primary, so article-specific legacy CSS cannot collapse the page shell.
 */
html,
html body.aouniat-v3 {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html body.aouniat-v3 > #page.site {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

html body.aouniat-v3 > #page.site > .site-header,
html body.aouniat-v3 > #page.site > .site-content,
html body.aouniat-v3 > #page.site > .site-footer {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
  clear: both !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.4 — definitive legacy typography normalization
 * -------------------------------------------------------------------------- */

/*
 * Some logged-in configurations (notably old admin-menu replacements) hide
 * #wpadminbar while WordPress still reserves its normal top offset on <html>.
 * aouniat-3.js adds .a3-adminbar-hidden only when the bar is actually hidden,
 * so public visitors and a visible WordPress toolbar are unaffected.
 */
html.a3-adminbar-hidden {
  margin-top: 0 !important;
}
html.a3-adminbar-hidden body.admin-bar .a3-reading-progress {
  top: 0 !important;
}

/*
 * The single-post hero is deliberately viewport-bleed. This makes the visual
 * treatment identical for old and new entries even if a legacy wrapper adds
 * an unexpected content inset around a particular post.
 */
body.aouniat-v3.single .a3-article-hero {
  width: 100vw !important;
  max-width: none !important;
  margin-inline: calc(50% - 50vw) !important;
  border-radius: 0 !important;
}

/*
 * Definitive legacy typography normalization.
 *
 * Old TinyMCE posts often wrap prose in <font face="Tahoma" size="2"> or
 * nested spans.  The PHP render filter strips those declarations, and these
 * rules are the final CSS safety net so every article uses exactly the same
 * reading face and inherited prose scale.  Code/icon fonts remain exempt.
 */
body.aouniat-v3.single .entry-content {
  font-family: var(--a3-font) !important;
}
body.aouniat-v3.single .entry-content :where(
  p, span, font, div, a, strong, b, em, i, small, mark, ins, del, u, s, strike,
  ul, ol, li, dl, dt, dd, blockquote, cite,
  h1, h2, h3, h4, h5, h6,
  table, thead, tbody, tfoot, tr, th, td,
  figcaption, .wp-caption-text
):not(.fa):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: var(--a3-font) !important;
}

/* Inline wrappers must never shrink body copy below the article scale. */
body.aouniat-v3.single .entry-content :where(
  font, span, a, strong, b, em, i, u, s, strike, mark, ins, del
):not(.fa):not([class^="fa-"]):not([class*=" fa-"]) {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Obsolete HTML presentational attributes are neutralized even if the PHP
 * processor is unavailable for some reason. */
body.aouniat-v3.single .entry-content font,
body.aouniat-v3.single .entry-content [face],
body.aouniat-v3.single .entry-content [size] {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.aouniat-v3.single .entry-content :where(pre, code, kbd, samp, tt, var),
body.aouniat-v3.single .entry-content :where(pre, code, kbd, samp, tt, var) * {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/*
 * Article links use the quieter legacy Aouniat treatment: accent text with a
 * fine dotted underline.  Strip pasted white/highlight backgrounds from old
 * or new editor markup so links read as part of the prose rather than labels.
 */
body.aouniat-v3.single .entry-content a {
  color: var(--a3-accent) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px dotted color-mix(in srgb, var(--a3-accent) 70%, transparent) !important;
  padding: 0 0 2px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
body.aouniat-v3.single .entry-content a:visited {
  color: color-mix(in srgb, var(--a3-accent) 82%, var(--a3-ink)) !important;
}
body.aouniat-v3.single .entry-content a:hover,
body.aouniat-v3.single .entry-content a:focus-visible {
  color: var(--a3-accent-deep) !important;
  border-bottom-style: solid !important;
  border-bottom-color: currentColor !important;
}

/* Media/lightbox and button links must not inherit the prose underline. */
body.aouniat-v3.single .entry-content a:has(> img),
body.aouniat-v3.single .entry-content a:has(> picture),
body.aouniat-v3.single .entry-content a:has(> figure),
body.aouniat-v3.single .entry-content .gallery-item a,
body.aouniat-v3.single .entry-content .wp-block-image a,
body.aouniat-v3.single .entry-content .wp-block-button__link {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.aouniat-v3.single .entry-content .wp-block-button__link {
  padding: .75em 1.25em !important;
  background: var(--a3-accent) !important;
  color: #fff !important;
}

/* Extra root reset for legacy post/plugin rules that add outer page gutters. */
html body.aouniat-v3 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body.aouniat-v3 > #page.site,
html body.aouniat-v3 > #page.site > .site-content {
  box-sizing: border-box !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* ==========================================================================\n * Aouniat 3.0.5 — hard normalization of legacy Classic Editor prose\n * --------------------------------------------------------------------------\n * 3.0.4 still allowed block-level wrappers (most commonly old DIV/P markup)\n * to carry a smaller type scale through legacy classes.  Normalize the actual\n * prose blocks, not only inline FONT/SPAN tags.  Headings, captions and code\n * are explicitly exempt/redeclared below.\n * ========================================================================== */
body.aouniat-v3.single .single-entry .entry-content {
  font-family: var(--a3-font) !important;
  font-size: clamp(1.04rem, 1.5vw, 1.13rem) !important;
  line-height: 2.12 !important;
}

/* Every ordinary prose/container node inherits the article's exact scale. */
body.aouniat-v3.single .single-entry .entry-content :where(
  p, div, section, article, span, font, a, strong, b, em, i, u, s, strike,
  mark, ins, del, ul, ol, li, dl, dt, dd, blockquote, cite,
  table, thead, tbody, tfoot, tr, th, td
):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not(pre *):not(code *) {
  font-family: var(--a3-font) !important;
  font-size: 1em !important;
  line-height: inherit !important;
}

/* Do not let obsolete presentational tags/classes reintroduce Tahoma or 10–14px text. */
body.aouniat-v3.single .single-entry .entry-content :where(font, [face], [size]) {
  font-family: var(--a3-font) !important;
  font-size: 1em !important;
  line-height: inherit !important;
}

/* Restore the deliberate editorial hierarchy after the broad prose reset. */
body.aouniat-v3.single .single-entry .entry-content h2 {
  font-family: var(--a3-font) !important;
  font-size: clamp(1.65rem, 3vw, 2.25rem) !important;
  line-height: 1.55 !important;
}
body.aouniat-v3.single .single-entry .entry-content h3 {
  font-family: var(--a3-font) !important;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem) !important;
  line-height: 1.55 !important;
}
body.aouniat-v3.single .single-entry .entry-content h4 {
  font-family: var(--a3-font) !important;
  font-size: 1.25rem !important;
  line-height: 1.55 !important;
}
body.aouniat-v3.single .single-entry .entry-content h5,
body.aouniat-v3.single .single-entry .entry-content h6 {
  font-family: var(--a3-font) !important;
  line-height: 1.55 !important;
}
body.aouniat-v3.single .single-entry .entry-content figcaption,
body.aouniat-v3.single .single-entry .entry-content .wp-caption-text {
  font-family: var(--a3-font) !important;
  font-size: .78rem !important;
  line-height: 1.8 !important;
}
body.aouniat-v3.single .single-entry .entry-content :where(pre, code, kbd, samp, tt, var),
body.aouniat-v3.single .single-entry .entry-content :where(pre, code, kbd, samp, tt, var) * {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

@media (max-width: 768px) {
  body.aouniat-v3.single .single-entry .entry-content {
    font-size: 1.03rem !important;
    line-height: 2.05 !important;
  }
}


/* --------------------------------------------------------------------------
 * 3.0.7 — global editorial typography shield
 * --------------------------------------------------------------------------
 * Legacy posts sometimes ship embedded CSS that targets generic page-level
 * selectors and therefore changes the chrome outside .entry-content. Keep the
 * entire public Aouniat interface on the same Arabic family. Size/weight remain
 * component-specific; only the family is normalized here. Icon and code fonts
 * are intentionally excluded.
 */
body.aouniat-v3,
body.aouniat-v3 button,
body.aouniat-v3 input,
body.aouniat-v3 select,
body.aouniat-v3 textarea {
  font-family: var(--a3-font) !important;
}

body.aouniat-v3 #page.site :where(
  h1, h2, h3, h4, h5, h6,
  p, a, button, input, select, textarea, option, label,
  li, dt, dd, time, small, strong, b, em, cite, figcaption,
  th, td, span
):not(.fa):not(.dashicons):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: var(--a3-font) !important;
}

/* Extra specificity for the three elements most visibly affected by old post CSS. */
body.aouniat-v3 #page.site .a3-branding .site-title a,
body.aouniat-v3 #page.site .a3-navigation a,
body.aouniat-v3 #page.site .a3-navigation .menu-toggle,
body.aouniat-v3 #page.site .a3-article-hero__title,
body.aouniat-v3 #page.site .a3-article-hero__meta,
body.aouniat-v3 #page.site .a3-article-hero__submeta {
  font-family: var(--a3-font) !important;
}

body.aouniat-v3 #page.site :where(pre, code, kbd, samp, tt, var),
body.aouniat-v3 #page.site :where(pre, code, kbd, samp, tt, var) * {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

body.aouniat-v3 #page.site .fa,
body.aouniat-v3 #page.site [class^="fa-"],
body.aouniat-v3 #page.site [class*=" fa-"] {
  font-family: FontAwesome !important;
}

/* --------------------------------------------------------------------------
 * 3.0.7 — archive-post isolation and top-gap cleanup
 * --------------------------------------------------------------------------
 * Old posts are now stripped of embedded document-level CSS in PHP. These
 * rules are a final geometry guard and intentionally do not depend on the
 * article's age or markup.
 */
body.aouniat-v3 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
html body.aouniat-v3 > #page.site {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* WordPress normally adds its toolbar offset to the root element. Aouniat uses
 * a custom/hideable admin-menu setup, and that reserved strip can remain even
 * when no visible toolbar occupies it. Remove the root reservation; the admin
 * toolbar, when present for an administrator, may overlay the very top edge
 * rather than altering the public layout. */
html {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Legacy Auto Ads were removed in 3.0.7. Hide any stale theme-injected Google
 * auto-ad remnants that a page/cache might retain during the transition. */
body.aouniat-v3 > ins.adsbygoogle,
body.aouniat-v3 > .google-auto-placed,
body.aouniat-v3 #page.site > ins.adsbygoogle,
body.aouniat-v3 #page.site > .google-auto-placed {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Google Auto Ads can wrap injected placements several levels inside the
 * document. 3.0.7 no longer loads Auto Ads, but this prevents a stale cached
 * auto-placement wrapper from reserving space during rollout. */
body.aouniat-v3 .google-auto-placed {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================\n * Aouniat 3.0.8 — safe legacy comments + non-upscaled classic galleries\n * ========================================================================== */

/*
 * Classic WordPress galleries frequently contain 150/300px thumbnail files.
 * Earlier 3.x CSS stretched every thumbnail to fill a large grid cell, which
 * made old galleries look huge and blurry.  Keep a modern grid, but never
 * force an image beyond the dimensions supplied by WordPress/its srcset.
 */
body.aouniat-v3.single .single-entry .entry-content .gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 280px)) !important;
  justify-content: center !important;
  align-items: start !important;
  gap: 14px !important;
  margin: 2em auto !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-item {
  width: 100% !important;
  max-width: 280px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-icon,
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-icon a {
  display: flex !important;
  width: 100% !important;
  height: auto !important;
  align-items: center !important;
  justify-content: center !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 12px !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery-caption {
  width: 100% !important;
  margin-top: 7px !important;
  font-size: .76rem !important;
  line-height: 1.65 !important;
}

/* The 3.0.8 comments list deliberately avoids wp_list_comments() so legacy
 * comment filters/plugins cannot crash old discussions under modern PHP. */
.a3-native-comments .a3-comment-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.a3-native-comments .a3-comment-list--children {
  margin: 14px 0 0 !important;
  padding-inline-start: 24px !important;
  border-inline-start: 1px solid var(--a3-border) !important;
}
.a3-native-comments .a3-comment {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.a3-native-comments .a3-comment__article {
  position: relative;
  padding: 20px 0;
  border-bottom: 1px solid var(--a3-border);
}
.a3-native-comments > .a3-comment-list > .a3-comment:first-child > .a3-comment__article {
  padding-top: 0;
}
.a3-comment__header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}
.a3-comment__avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--a3-border);
  border-radius: 50%;
  background: var(--a3-bg-soft);
  color: var(--a3-accent);
  font-weight: 700;
}
.a3-comment__author {
  display: block;
  color: var(--a3-ink);
  font-size: .94rem;
  line-height: 1.4;
}
.a3-comment__date {
  display: block;
  margin-top: 2px;
  color: var(--a3-muted);
  font-size: .72rem;
}
.a3-comment__content {
  color: var(--a3-ink-soft);
  font-size: .94rem;
  line-height: 1.95;
}
.a3-comment__content p:last-child { margin-bottom: 0; }
.a3-comment__reply {
  display: inline-block;
  margin-top: 9px;
  color: var(--a3-accent) !important;
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none !important;
}
.a3-comment__reply:hover { text-decoration: underline !important; }

@media (max-width: 640px) {
  body.aouniat-v3.single .single-entry .entry-content .gallery {
    grid-template-columns: repeat(auto-fit, minmax(130px, 220px)) !important;
    gap: 10px !important;
  }
  body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-item {
    max-width: 220px !important;
  }
  .a3-native-comments .a3-comment-list--children {
    padding-inline-start: 14px !important;
  }
}

/* ==========================================================================\n * Aouniat 3.0.9 — compact editorial treatment for legacy galleries\n * ========================================================================== */

/*
 * Old WordPress galleries were authored around small generated thumbnails.
 * They should read as a deliberate thumbnail strip, not as either giant
 * upscaled media or tiny images floating across the article width.
 */
body.aouniat-v3.single .single-entry .entry-content .gallery {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 2em auto !important;
  padding: 14px !important;
  border: 1px solid var(--a3-border) !important;
  border-radius: 18px !important;
  background: color-mix(in srgb, var(--a3-surface) 84%, transparent) !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-item {
  flex: 0 1 176px !important;
  width: 176px !important;
  max-width: 176px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-icon,
body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-icon a {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--a3-bg-soft) 88%, var(--a3-surface)) !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 10px !important;
}
body.aouniat-v3.single .single-entry .entry-content .gallery-caption {
  margin: 7px 2px 0 !important;
  width: auto !important;
  color: var(--a3-muted) !important;
  font-size: .72rem !important;
  line-height: 1.6 !important;
  text-align: center !important;
}

@media (max-width: 640px) {
  body.aouniat-v3.single .single-entry .entry-content .gallery {
    gap: 9px !important;
    padding: 10px !important;
    border-radius: 15px !important;
  }
  body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-item {
    flex-basis: 142px !important;
    width: 142px !important;
    max-width: 142px !important;
  }
}

@media (max-width: 360px) {
  body.aouniat-v3.single .single-entry .entry-content .gallery .gallery-item {
    flex-basis: 128px !important;
    width: 128px !important;
    max-width: 128px !important;
  }
}
/* ==========================================================================
 * Aouniat 3.0.11 — robust RTL spacing for logged-in comment status
 * ========================================================================== */
.a3-comments-shell .logged-in-as {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .35rem .9rem;
}
.a3-comments-shell .comment-login-status {
  display: inline-flex !important;
  align-items: baseline;
  gap: .35rem;
  white-space: nowrap;
}
.a3-comments-shell .comment-login-label,
.a3-comments-shell .comment-username,
.a3-comments-shell .comment-logout {
  display: inline-block;
  margin: 0 !important;
}
.a3-comments-shell .comment-username,
.a3-comments-shell .comment-logout {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .a3-comments-shell .logged-in-as { gap: .3rem .7rem; }
  .a3-comments-shell .comment-login-status { gap: .3rem; }
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.12 — editorial card media fill
 * -------------------------------------------------------------------------- */
/*
 * The legacy AwesomePress base stylesheet declares img { height:auto; } and
 * the 3.x global responsive rule body.aouniat-v3 img { height:auto; }. Those
 * rules are more specific than the original card-image rule, so images in the
 * wide homepage card could keep their intrinsic height and leave an empty
 * strip below them. Position the card image as a true media cover so every
 * editorial card fills its complete image area regardless of the source
 * image's intrinsic dimensions.
 */
body.aouniat-v3 .a3-story-card__media {
  position: relative;
}
body.aouniat-v3 .a3-story-card__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
}
body.aouniat-v3 .a3-story-card--wide .a3-story-card__media {
  align-self: stretch;
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.13 — homepage lead-story media fill
 * -------------------------------------------------------------------------- */
/*
 * The homepage lead image uses its own media component and therefore was not
 * covered by the 3.0.12 story-card fix. The global responsive-image rule
 * (body.aouniat-v3 img { height:auto; }) can win on specificity and make the
 * lead image keep its intrinsic height, leaving a dark strip at the bottom of
 * the fixed-aspect-ratio media frame. Treat the lead image as a true cover
 * layer, independently from the smaller editorial cards.
 */
body.aouniat-v3 .a3-home-hero__media {
  position: relative;
}
body.aouniat-v3 .a3-home-hero__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
}

/* --------------------------------------------------------------------------
 * Aouniat 3.0.14 — responsive latest-writing grid reset
 * -------------------------------------------------------------------------- */
/*
 * Desktop cards intentionally use 12-column spans (standard = 4, lead = 8).
 * When the responsive grid switches to two columns / one column those old
 * span values must also be reset. Without this, CSS Grid creates implicit
 * columns on phones, which squeezes alternating cards into a very narrow
 * strip beside a wider card.
 */
@media (max-width: 900px) {
  body.aouniat-v3 .a3-latest-grid > .a3-story-card {
    grid-column: span 1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }
  body.aouniat-v3 .a3-latest-grid > .a3-story-card:first-child {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 768px) {
  body.aouniat-v3 .a3-latest-grid > .a3-story-card,
  body.aouniat-v3 .a3-latest-grid > .a3-story-card:first-child {
    grid-column: 1 / -1 !important;
  }
}


/* --------------------------------------------------------------------------
 * Aouniat 3.0.15 — compact topic discovery section
 * -------------------------------------------------------------------------- */
/*
 * The topic directory should act as a quick visual index, not another full
 * screen.  Keep all ten categories visible while reducing the oversized
 * section padding and tall card rows used by the original 3.0 composition.
 */
body.aouniat-v3 .a3-topics-section {
  padding: clamp(42px, 5vw, 64px) 0;
}
body.aouniat-v3 .a3-topics-section .a3-section-heading--compact {
  margin-bottom: 18px;
}
body.aouniat-v3 .a3-topics-section .a3-section-heading h2 {
  font-size: clamp(1.85rem, 3vw, 2.55rem);
}
body.aouniat-v3 .a3-topics-section .a3-eyebrow {
  margin-bottom: 6px;
}
body.aouniat-v3 .a3-topic-card {
  min-height: 104px;
  padding: 16px 18px;
}
body.aouniat-v3 .a3-topic-card__name {
  font-size: 1rem;
  line-height: 1.45;
}
body.aouniat-v3 .a3-topic-card__count {
  font-size: .74rem;
}
body.aouniat-v3 .a3-topic-card__arrow {
  inset-inline-end: 14px;
  bottom: 13px;
  font-size: 1rem;
}

@media (max-width: 768px) {
  body.aouniat-v3 .a3-topics-section {
    padding: 38px 0 42px;
  }
  body.aouniat-v3 .a3-topics-section .a3-section-heading--compact {
    margin-bottom: 16px;
  }
  body.aouniat-v3 .a3-topics-section .a3-section-heading h2 {
    font-size: 1.8rem;
  }
  body.aouniat-v3 .a3-topic-card {
    min-height: 88px;
    padding: 14px 15px;
  }
  body.aouniat-v3 .a3-topic-card__name {
    font-size: .94rem;
  }
  body.aouniat-v3 .a3-topic-card__count {
    font-size: .68rem;
  }
  body.aouniat-v3 .a3-topic-card__arrow {
    inset-inline-end: 12px;
    bottom: 11px;
    font-size: .9rem;
  }
}

/* ========================================================================== */
/* Aouniat 3.0 — pronounced article blockquotes                              */
/* No automatic label/pseudo-element is added.                               */
/* ========================================================================== */
body.aouniat-v3.single .single-entry .entry-content blockquote {
  width: 92%;
  margin: 2.25em auto;
  padding: 24px 28px;
  border: 1px solid color-mix(in srgb, var(--a3-accent) 18%, var(--a3-border));
  border-inline-start: 6px solid var(--a3-accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--a3-accent) 6%, var(--a3-surface-strong));
  color: var(--a3-ink);
  font-size: 1.08em !important;
  font-weight: 600;
  line-height: 2 !important;
  box-shadow: var(--a3-shadow-sm);
}

body.aouniat-v3.single .single-entry .entry-content blockquote p {
  color: inherit;
}

body.aouniat-v3.single .single-entry .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  body.aouniat-v3.single .single-entry .entry-content blockquote {
    width: 100%;
    margin: 1.8em 0;
    padding: 20px 20px;
    border-inline-start-width: 5px;
    border-radius: 12px;
    font-size: 1.04em !important;
  }
}

/* --------------------------------------------------------------------------
 * AI Prompt box — copyable, compact and scrollable
 * -------------------------------------------------------------------------- */
.entry-content .a3-ai-prompt {
  width: 100%;
  margin: 2.1em 0;
  overflow: hidden;
  border: 1px solid var(--a3-border);
  border-radius: 14px;
  background: var(--a3-bg-soft);
  box-shadow: var(--a3-shadow-sm);
}

.entry-content .a3-ai-prompt__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--a3-border);
  background: var(--a3-surface);
}

.entry-content .a3-ai-prompt__label {
  color: var(--a3-ink);
  font-weight: 700;
  line-height: 1.5 !important;
}

.entry-content .a3-ai-prompt__copy {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--a3-accent);
  color: #fff;
  font-family: var(--a3-font);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease, opacity .18s ease;
}

.entry-content .a3-ai-prompt__copy:hover {
  background: var(--a3-accent-deep);
}

.entry-content .a3-ai-prompt__copy:active {
  transform: translateY(1px);
}

.entry-content .a3-ai-prompt__copy.is-copied {
  background: #2f7d58;
}

.entry-content .a3-ai-prompt__content {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
  color: var(--a3-ink-soft);
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
  scrollbar-width: thin;
  scrollbar-color: var(--a3-faint) transparent;
}

.entry-content .a3-ai-prompt__content > :first-child {
  margin-top: 0;
}

.entry-content .a3-ai-prompt__content > :last-child {
  margin-bottom: 0;
}

.entry-content .a3-ai-prompt__content::-webkit-scrollbar {
  width: 8px;
}

.entry-content .a3-ai-prompt__content::-webkit-scrollbar-track {
  background: transparent;
}

.entry-content .a3-ai-prompt__content::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--a3-faint);
  background-clip: padding-box;
}

@media (max-width: 640px) {
  .entry-content .a3-ai-prompt__header {
    padding: 10px 12px;
  }

  .entry-content .a3-ai-prompt__label {
    font-size: .9em !important;
  }

  .entry-content .a3-ai-prompt__copy {
    min-height: 36px;
    padding: 6px 11px;
    font-size: .8rem;
  }

  .entry-content .a3-ai-prompt__content {
    max-height: 240px;
    padding: 16px;
  }
}
