/* ==========================================
   DARJA RIHLA — POST BASE v3
   File: dr-post-base.css
   Pillar + Supporting Post Foundation
   Platform article body (Tunisia / native classes) — dark cinematic layer
   ========================================== */

/* ==========================================
   1. MAIN ARTICLE WRAPPER
   ========================================== */

body.dr-family-post .wp-block-post-content {
  width: min(100% - 2rem, var(--dr-container));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

body.dr-family-post .wp-block-post-content > * {
  max-width: var(--dr-reading);
  margin-inline: auto;
}

body.dr-family-post .wp-block-post-content > .alignwide {
  max-width: min(100%, 1100px);
}

body.dr-family-post .wp-block-post-content > .alignfull {
  max-width: 100%;
}

/* ==========================================
   2. POST HEADER FEEL
   ========================================== */

body.single .wp-block-post-title,
body.dr-family-post h1.wp-block-post-title {
  max-width: min(100%, 14ch);
  margin-inline: auto;
  margin-bottom: var(--dr-space-5);
  text-align: left;
  text-wrap: balance;
}

body.single .wp-block-post-featured-image,
body.dr-family-post .wp-block-post-featured-image {
  max-width: min(100%, 1100px);
  margin: 0 auto var(--dr-space-8);
}

body.single .wp-block-post-featured-image img,
body.dr-family-post .wp-block-post-featured-image img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  border-radius: var(--dr-radius-lg);
  box-shadow: var(--dr-shadow-lg);
}

/* ==========================================
   3. TYPOGRAPHY / FLOW
   ========================================== */

body.dr-family-post p {
  font-size: 1.04rem;
  color: var(--dr-text-soft);
  line-height: 1.8;
}

body.dr-family-post > * + *,
body.dr-family-post .wp-block-post-content > * + * {
  margin-top: 0;
}

body.dr-family-post .wp-block-post-content h2 {
  margin-top: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: var(--dr-space-4);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.dr-family-post .wp-block-post-content h3 {
  margin-top: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: var(--dr-space-3);
}

body.dr-family-post .wp-block-post-content h4 {
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
}

body.dr-family-post .wp-block-post-content p + h2,
body.dr-family-post .wp-block-post-content ul + h2,
body.dr-family-post .wp-block-post-content ol + h2,
body.dr-family-post .wp-block-post-content blockquote + h2 {
  margin-top: clamp(2.8rem, 6vw, 4.5rem);
}

body.dr-family-post .wp-block-post-content strong {
  color: #ffffff;
  font-weight: 700;
}

body.dr-family-post .wp-block-post-content em {
  color: #dbe9f3;
}

/* ==========================================
   4. LISTS
   ========================================== */

body.dr-family-post .wp-block-post-content ul,
body.dr-family-post .wp-block-post-content ol {
  padding-left: 1.25rem;
}

body.dr-family-post .wp-block-post-content li {
  margin-bottom: 0.55rem;
  color: var(--dr-text-soft);
}

body.dr-family-post .wp-block-post-content li::marker {
  color: var(--dr-accent);
}

/* ==========================================
   5. LINKS
   ========================================== */

body.dr-family-post .wp-block-post-content a {
  color: var(--dr-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

body.dr-family-post .wp-block-post-content a:hover,
body.dr-family-post .wp-block-post-content a:focus-visible {
  color: var(--dr-accent-2);
}

/* ==========================================
   6. BLOCKQUOTES
   ========================================== */

body.dr-family-post .wp-block-post-content blockquote {
  margin: var(--dr-space-7) auto;
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  border-left: 3px solid var(--dr-accent);
  border-radius: 0 var(--dr-radius-sm) var(--dr-radius-sm) 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  box-shadow: var(--dr-shadow-sm);
}

body.dr-family-post .wp-block-post-content blockquote p:last-child {
  margin-bottom: 0;
}

body.dr-family-post .wp-block-post-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  color: var(--dr-text-muted);
  font-size: 0.92rem;
  font-style: normal;
}

/* ==========================================
   7. CODE / PREFORMATTED
   ========================================== */

body.dr-family-post .wp-block-post-content code {
  font-family: var(--dr-font-mono);
  font-size: 0.95em;
  padding: 0.15rem 0.42rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

body.dr-family-post .wp-block-post-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--dr-radius-md);
  background: #08111a;
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8f6ff;
  box-shadow: var(--dr-shadow-sm);
}

body.dr-family-post .wp-block-post-content pre code {
  padding: 0;
  background: transparent;
}

/* ==========================================
   8. IMAGES / MEDIA
   ========================================== */

body.dr-family-post .wp-block-image,
body.dr-family-post figure.wp-block-image,
body.dr-family-post figure.wp-block-table,
body.dr-family-post figure.wp-block-embed {
  margin-top: var(--dr-space-7);
  margin-bottom: var(--dr-space-7);
}

body.dr-family-post .wp-block-image img {
  border-radius: var(--dr-radius-md);
  box-shadow: var(--dr-shadow-md);
}

body.dr-family-post figcaption {
  margin-top: 0.7rem;
  color: var(--dr-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ==========================================
   9. TABLES
   ========================================== */

body.dr-family-post table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--dr-radius-md);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--dr-shadow-sm);
}

body.dr-family-post th,
body.dr-family-post td {
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(255,255,255,0.07);
  text-align: left;
}

body.dr-family-post th {
  color: #fff;
  background: rgba(255,255,255,0.04);
}

body.dr-family-post td {
  color: var(--dr-text-soft);
}

/* ==========================================
   10. HR / SEPARATORS
   ========================================== */

body.dr-family-post hr,
body.dr-family-post .wp-block-separator {
  margin-block: clamp(2rem, 5vw, 4rem);
  opacity: 0.75;
}

/* ==========================================
   11. GUTENBERG GROUPS / COLUMNS
   ========================================== */

body.dr-family-post .wp-block-group,
body.dr-family-post .wp-block-columns {
  margin-top: var(--dr-space-7);
  margin-bottom: var(--dr-space-7);
}

body.dr-family-post .wp-block-columns .wp-block-column > :last-child {
  margin-bottom: 0;
}

/* ==========================================
   12. BUTTONS INSIDE POSTS
   ========================================== */

body.dr-family-post .wp-block-buttons {
  margin-top: var(--dr-space-7);
  margin-bottom: var(--dr-space-7);
}

/* ==========================================
   13. EDUCATIONAL / ANALYTICAL BLOCKS
   ========================================== */

body.dr-family-post .dr-learning-box,
body.dr-family-post .dr-explainer,
body.dr-family-post .dr-system-box,
body.dr-family-post .dr-why-it-matters,
body.dr-family-post .dr-cta,
body.dr-family-post .dr-card,
body.dr-family-post .dr-panel {
  max-width: min(100%, 980px);
  margin-inline: auto;
}

body.dr-family-post .dr-learning-box,
body.dr-family-post .dr-explainer,
body.dr-family-post .dr-system-box,
body.dr-family-post .dr-why-it-matters {
  margin-top: var(--dr-space-8);
  margin-bottom: var(--dr-space-8);
}

body.dr-family-post .dr-cta {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* ==========================================
   14. RELATED / SOURCES / NEXT-READING BLOCKS
   ========================================== */

body.dr-family-post .dr-related,
body.dr-family-post .dr-sources,
body.dr-family-post .dr-next-reading,
body.dr-family-post .dr-series-nav {
  max-width: min(100%, 1100px);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding: 1.2rem;
  border-radius: var(--dr-radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(14,24,37,0.9), rgba(9,16,26,0.95));
  box-shadow: var(--dr-shadow-sm);
}

body.dr-family-post .dr-series-label {
  display: inline-block;
  margin-bottom: var(--dr-space-3);
  color: var(--dr-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ==========================================
   15. PULL QUOTE / STANDPOINT / FINAL CLAIM
   ========================================== */

body.dr-family-post .dr-pullquote,
body.dr-family-post .dr-standpoint,
body.dr-family-post .dr-final-claim {
  max-width: min(100%, 980px);
  margin: clamp(2rem, 6vw, 4rem) auto;
  padding: 1.35rem 1.35rem 1.4rem;
  border-radius: var(--dr-radius-lg);
  background:
    radial-gradient(circle at top right, var(--dr-page-glow), transparent 36%),
    linear-gradient(180deg, rgba(12, 21, 32, 0.96), rgba(8, 15, 24, 0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--dr-shadow-md);
}

/* ==========================================
   16. CATEGORY-SENSITIVE ACCENT BORDERS
   ========================================== */

body.dr-cat-culture-identity .wp-block-post-content h2,
body.dr-cat-cybersecurity-tech .wp-block-post-content h2,
body.dr-cat-systems-strategy .wp-block-post-content h2,
body.dr-cat-systemen-discipline .wp-block-post-content h2,
body.dr-cat-philosophy-legacy .wp-block-post-content h2,
body.dr-cat-doctrine .wp-block-post-content h2 {
  border-bottom-color: color-mix(in srgb, var(--dr-accent) 28%, transparent);
}

/* ==========================================
   17. PLATFORM ARTICLE BODY — Tunisia pillar + native classes
   Unlayered: overrides layered article theme in dr-single-post.css.
   Scope: article root inside single shell only (not WP template chrome).
   Gold = history / authority. Cyan = flow / systems / interaction.
   ========================================== */

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar,
body.dr-family-post .wp-block-post-content .dr-post-tunisia-pillar,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar {
  --dr-tunisia-gold: var(--dr-gold, #c6a768);
  --dr-tunisia-gold-2: var(--dr-gold-2, #dfc07e);
  --dr-tunisia-cyan: var(--dr-cyan, #7ceaff);
  --dr-tunisia-panel: rgba(10, 18, 28, 0.92);
  --dr-tunisia-panel-2: rgba(14, 24, 37, 0.88);
  --dr-tunisia-line: rgba(198, 167, 104, 0.22);
  --dr-tunisia-line-cyan: rgba(124, 234, 255, 0.2);

  background-color: var(--dr-bg-alt, #0b1622);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(198, 167, 104, 0.09), transparent 42%),
    radial-gradient(ellipse 80% 50% at 100% 40%, rgba(124, 234, 255, 0.04), transparent 50%),
    linear-gradient(180deg, rgba(11, 22, 34, 0.98) 0%, rgba(7, 16, 25, 0.99) 55%, rgba(4, 9, 16, 1) 100%);
  color: var(--dr-text-soft, #c9d7e3);
  font-family: var(--dr-font-ui, system-ui, sans-serif);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.82;
  border-radius: var(--dr-radius-md, 20px);
  overflow: hidden;
  box-shadow:
    var(--dr-shadow-lg, 0 25px 80px rgba(0, 0, 0, 0.32)),
    0 0 0 1px rgba(198, 167, 104, 0.12);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar::before,
body.dr-family-post .wp-block-post-content .dr-post-tunisia-pillar::before,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar::before {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--dr-tunisia-gold) 0%,
    color-mix(in srgb, var(--dr-tunisia-cyan) 55%, var(--dr-tunisia-gold)) 38%,
    var(--dr-tunisia-gold) 72%,
    color-mix(in srgb, var(--dr-tunisia-gold) 40%, #1a0f04) 100%
  );
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-header,
body.dr-family-post .wp-block-post-content .dr-post-tunisia-pillar .dr-header,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-header {
  background:
    radial-gradient(ellipse 90% 120% at 50% 0%, rgba(198, 167, 104, 0.12), transparent 55%),
    linear-gradient(180deg, #0d0804 0%, #0a1520 100%);
  border-bottom: 1px solid var(--dr-tunisia-line);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-header::before,
body.dr-family-post .wp-block-post-content .dr-post-tunisia-pillar .dr-header::before,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-header::before {
  opacity: 0.5;
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-tag,
body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-meta,
body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-read-time,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-tag,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-meta,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-read-time {
  color: color-mix(in srgb, var(--dr-tunisia-gold) 92%, #fff);
  letter-spacing: 0.18em;
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-title,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-title {
  color: var(--dr-heading, #f6fbff);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-sub,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-sub {
  color: color-mix(in srgb, var(--dr-text-soft) 88%, var(--dr-tunisia-gold));
  font-style: italic;
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-meta,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-meta {
  color: var(--dr-text-muted, #8fa4b7);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-rule,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-rule {
  background: linear-gradient(90deg, transparent, var(--dr-tunisia-gold), transparent);
  box-shadow: 0 0 20px rgba(198, 167, 104, 0.25);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar .dr-body,
body.dr-family-post .wp-block-post-content .dr-post-tunisia-pillar .dr-body,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-body {
  background: transparent;
  color: var(--dr-text-soft, #c9d7e3);
  padding-block: clamp(2.5rem, 5vw, 3.75rem) clamp(3rem, 6vw, 5rem);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar p,
body.dr-single .wp-block-post-content .dr-post-tunisia-pillar li,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar p,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar li {
  color: var(--dr-text-soft, #c9d7e3);
}

body.dr-single .wp-block-post-content .dr-post-tunisia-pillar h2,
body.dr-single .wp-block-post-content .dr-post-tunisia-pillar h3,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar h2,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar h3 {
  color: var(--dr-heading, #f6fbff);
  border-bottom-color: var(--dr-tunisia-line);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-section > h2:first-of-type::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 0.5rem;
  background: linear-gradient(90deg, var(--dr-tunisia-gold), transparent);
  border-radius: 2px;
}

/* --- Native article layout (inside pillar) --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-body {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-section {
  scroll-margin-top: 100px;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.75rem);
  border-radius: var(--dr-radius-sm, 14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-inline-start: 2px solid var(--dr-tunisia-line);
  background: linear-gradient(125deg, rgba(14, 24, 37, 0.45), rgba(4, 9, 16, 0.25));
  transition:
    border-color var(--dr-speed-fast, 180ms) var(--dr-ease, ease),
    box-shadow var(--dr-speed-fast, 180ms) var(--dr-ease, ease);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-section.is-active {
  border-inline-start-color: color-mix(in srgb, var(--dr-tunisia-cyan) 65%, var(--dr-tunisia-gold));
  box-shadow: inset 0 0 0 1px rgba(124, 234, 255, 0.06);
  background: linear-gradient(125deg, rgba(14, 24, 37, 0.65), rgba(124, 234, 255, 0.04));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: var(--dr-font-ui, system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dr-tunisia-gold);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-box {
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid var(--dr-tunisia-line);
  background: linear-gradient(165deg, var(--dr-tunisia-panel-2), rgba(4, 9, 16, 0.9));
  box-shadow: var(--dr-shadow-sm, 0 10px 30px rgba(0, 0, 0, 0.18));
  color: var(--dr-text-soft, #c9d7e3);
  transition:
    border-color var(--dr-speed-fast, 180ms) var(--dr-ease-out, ease),
    box-shadow var(--dr-speed-fast, 180ms) var(--dr-ease-out, ease),
    transform var(--dr-speed-fast, 180ms) var(--dr-ease-out, ease);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-box:hover {
  border-color: color-mix(in srgb, var(--dr-tunisia-gold) 55%, transparent);
  box-shadow:
    var(--dr-shadow-md, 0 18px 50px rgba(0, 0, 0, 0.24)),
    0 0 0 1px rgba(124, 234, 255, 0.06);
  transform: translateY(-2px);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card {
  padding: clamp(0.75rem, 2vw, 1rem);
  overflow: hidden;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card img {
  border-radius: var(--dr-radius-sm, 14px);
  border: 1px solid rgba(198, 167, 104, 0.2);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid rgba(124, 234, 255, 0.12);
  background: linear-gradient(180deg, rgba(124, 234, 255, 0.04), rgba(4, 9, 16, 0.5));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step {
  position: relative;
  padding: clamp(0.85rem, 2vw, 1.15rem) clamp(0.85rem, 2vw, 1.15rem) clamp(0.85rem, 2vw, 1.15rem) clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--dr-radius-sm, 14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--dr-tunisia-panel);
  border-inline-start: 3px solid var(--dr-tunisia-cyan);
  transition:
    border-color var(--dr-speed-fast, 180ms) ease,
    background var(--dr-speed-fast, 180ms) ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step:hover {
  border-inline-start-color: var(--dr-tunisia-gold);
  background: linear-gradient(90deg, rgba(198, 167, 104, 0.08), var(--dr-tunisia-panel));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-geo {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid var(--dr-tunisia-line-cyan);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 234, 255, 0.08), transparent 40%),
    var(--dr-tunisia-panel);
  color: var(--dr-text-soft, #c9d7e3);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: 1fr;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card {
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-char-block {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-inline-start: 4px solid var(--dr-tunisia-gold);
  background: linear-gradient(100deg, rgba(198, 167, 104, 0.08), var(--dr-tunisia-panel));
  font-family: var(--dr-font-display, "Playfair Display", serif);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table {
  overflow: hidden;
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid rgba(124, 234, 255, 0.14);
  background: var(--dr-tunisia-panel);
  box-shadow: var(--dr-shadow-sm, 0 10px 30px rgba(0, 0, 0, 0.18));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table th {
  color: var(--dr-heading, #f6fbff);
  background: rgba(124, 234, 255, 0.08);
  border-color: rgba(124, 234, 255, 0.12);
  font-family: var(--dr-font-ui, system-ui, sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table td {
  color: var(--dr-text-soft, #c9d7e3);
  border-color: rgba(255, 255, 255, 0.06);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-quote-wrap {
  margin-block: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid var(--dr-tunisia-line);
  border-inline-start: 4px solid var(--dr-tunisia-gold);
  background: linear-gradient(180deg, rgba(198, 167, 104, 0.06), var(--dr-tunisia-panel));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-quote-wrap blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--dr-text, #ecf5fb);
  font-family: var(--dr-font-display, "Playfair Display", serif);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.55;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: 1fr;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card {
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--dr-radius-lg, 28px);
  border: 1px solid var(--dr-tunisia-line);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(198, 167, 104, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(14, 24, 37, 0.95), rgba(4, 9, 16, 0.98));
  text-align: center;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final h2,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final h3 {
  border-bottom: none;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final .dr-section > h2:first-of-type::after,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final h2::after,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-final h3::after {
  display: none;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-cta-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--dr-tunisia-line);
  background: color-mix(in srgb, var(--dr-tunisia-gold) 12%, transparent);
  color: var(--dr-heading, #f6fbff);
  font-family: var(--dr-font-ui, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    border-color var(--dr-speed-fast, 180ms) ease,
    color var(--dr-speed-fast, 180ms) ease,
    box-shadow var(--dr-speed-fast, 180ms) ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-cta-inline:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-cta-inline:focus-visible {
  border-color: color-mix(in srgb, var(--dr-tunisia-cyan) 50%, var(--dr-tunisia-gold));
  color: var(--dr-tunisia-cyan);
  box-shadow: 0 0 0 1px rgba(124, 234, 255, 0.12);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-links-wrap {
  margin-top: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--dr-radius-md, 20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 9, 16, 0.55);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-link {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.35rem;
  border-radius: var(--dr-radius-xs, 10px);
  color: var(--dr-text-soft, #c9d7e3);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background var(--dr-speed-fast, 180ms) ease,
    border-color var(--dr-speed-fast, 180ms) ease,
    color var(--dr-speed-fast, 180ms) ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-link:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-link:focus-visible {
  background: rgba(124, 234, 255, 0.05);
  border-color: rgba(124, 234, 255, 0.12);
  color: var(--dr-heading, #f6fbff);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-ext {
  display: inline-block;
  margin-inline-start: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dr-tunisia-cyan);
  opacity: 0.85;
  vertical-align: super;
}

@media (min-width: 720px) {
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-body {
    max-width: min(100% - 48px, 1180px);
  }

  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-box {
    transition: none;
  }

  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card:hover,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card:hover,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card:hover,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:hover,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-box:hover {
    transform: none;
  }

  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-geo::after,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::before,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::after {
    animation: none !important;
    transition: none !important;
  }

  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card img {
    transform: none !important;
  }

  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid .dr-reveal,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid .dr-reveal,
  .dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid .dr-reveal {
    transition-delay: 0ms !important;
  }
}

/* ==========================================
   17b. TUNISIA — interactive explanation layer (article body only)
   Purpose: motion + state clarify function (timeline, thesis grid, divider, evidence).
   No template / .dr-single-shell layout changes. Pairs with dr-single-post.js (.dr-reveal, .is-active).
   ========================================== */

@keyframes dr-tunisia-geo-sweep {
  0% {
    transform: translateX(-18%) skewX(-6deg);
    opacity: 0.35;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(18%) skewX(-6deg);
    opacity: 0.35;
  }
}

/* --- 1) Thesis dashboard: .dr-grid + cards (stagger cooperates with .dr-reveal.is-visible from JS) --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid {
  display: grid;
  gap: clamp(0.75rem, 2.2vw, 1.35rem);
  align-items: stretch;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(1),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(1),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(1) {
  transition-delay: 0.03s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(2),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(2),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(3),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(3),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(3) {
  transition-delay: 0.13s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(4),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(4),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(4) {
  transition-delay: 0.18s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(5),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(5),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(5) {
  transition-delay: 0.23s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-grid > .dr-reveal:nth-child(6),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-grid > .dr-reveal:nth-child(6),
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comparison-grid > .dr-reveal:nth-child(6) {
  transition-delay: 0.28s;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card {
  position: relative;
  cursor: default;
  box-shadow:
    var(--dr-shadow-sm, 0 10px 30px rgba(0, 0, 0, 0.18)),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-card:focus-within,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-inst-card:focus-within,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-comp-card:focus-within {
  box-shadow:
    var(--dr-shadow-md, 0 18px 50px rgba(0, 0, 0, 0.24)),
    0 0 0 1px rgba(124, 234, 255, 0.1),
    inset 0 0 40px rgba(124, 234, 255, 0.04);
}

/* --- 2) Civilizational divider: .dr-pillar-bridge --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge {
  position: relative;
  margin-block: clamp(1.5rem, 4vw, 2.75rem);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  border-radius: var(--dr-radius-sm, 14px);
  border: 1px solid rgba(198, 167, 104, 0.2);
  background: linear-gradient(90deg, transparent, rgba(14, 24, 37, 0.55), transparent);
  isolation: isolate;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::before,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dr-tunisia-gold), transparent);
  opacity: 0.45;
  transform: scaleX(0.88);
  transition: opacity 0.35s ease, transform 0.4s var(--dr-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::before {
  top: 0;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge::after {
  bottom: 0;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge:hover::before,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge:hover::after,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge:focus-within::before,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge:focus-within::after {
  opacity: 0.95;
  transform: scaleX(1);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-pillar-bridge:focus-visible {
  outline: 2px solid rgba(124, 234, 255, 0.45);
  outline-offset: 4px;
}

/* --- 3) Living timeline: .dr-flow, .dr-flow-step, .dr-flow-arrow (.is-active from JS) --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow {
  position: relative;
  padding-inline-start: clamp(1.1rem, 2.8vw, 1.85rem);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--dr-tunisia-cyan) 45%, transparent),
    rgba(198, 167, 104, 0.2),
    color-mix(in srgb, var(--dr-tunisia-cyan) 28%, transparent)
  );
  pointer-events: none;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: 0.15rem;
  color: color-mix(in srgb, var(--dr-tunisia-gold) 65%, transparent);
  font-size: 1.15rem;
  line-height: 1;
  text-shadow: 0 0 0 transparent;
  transition: color 0.28s ease, text-shadow 0.4s ease, transform 0.28s ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow:hover .dr-flow-arrow,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow:focus-within .dr-flow-arrow {
  color: color-mix(in srgb, var(--dr-tunisia-cyan) 85%, var(--dr-tunisia-gold));
  text-shadow: 0 0 16px rgba(124, 234, 255, 0.28);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step {
  outline: none;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step:focus-visible {
  box-shadow: 0 0 0 2px rgba(124, 234, 255, 0.45);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step:hover {
  border-inline-start-color: color-mix(in srgb, var(--dr-tunisia-cyan) 70%, var(--dr-tunisia-gold));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-flow-step.is-active {
  border-inline-start-color: var(--dr-tunisia-gold);
  background: linear-gradient(90deg, rgba(198, 167, 104, 0.14), rgba(10, 18, 28, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(124, 234, 255, 0.1),
    0 10px 32px rgba(0, 0, 0, 0.25);
}

/* --- 4) Civilizational map band: .dr-geo (slow sweep, no layout shift) --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-geo {
  position: relative;
  overflow: hidden;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-geo::after {
  content: "";
  position: absolute;
  inset: -20% -30%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(124, 234, 255, 0.07) 45%,
    rgba(198, 167, 104, 0.06) 55%,
    transparent 100%
  );
  pointer-events: none;
  animation: dr-tunisia-geo-sweep 18s ease-in-out infinite alternate;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-geo:focus-within::after {
  opacity: 0.85;
}

/* --- 5) Archive / image proof: .dr-visual-card --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card {
  cursor: zoom-in;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s var(--dr-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  transform-origin: center center;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:hover img,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:focus-within img {
  transform: scale(1.04);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card figcaption {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  opacity: 0.76;
  color: var(--dr-text-muted, #8fa4b7);
  transition: opacity 0.28s ease, color 0.28s ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:hover figcaption,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-visual-card:focus-within figcaption {
  opacity: 1;
  color: var(--dr-text-soft, #c9d7e3);
}

/* --- 6) Tables: row hover + sticky header feel --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(124, 234, 255, 0.15);
  backdrop-filter: blur(8px);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table tbody tr {
  transition: background 0.2s ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-system-table tbody tr:hover td {
  background: rgba(124, 234, 255, 0.055);
}

/* --- 7) Quote + copy control --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-quote-wrap .dr-copy-btn:focus-visible {
  outline: 2px solid var(--dr-tunisia-cyan);
  outline-offset: 3px;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-quote-wrap:focus-within {
  border-color: color-mix(in srgb, var(--dr-tunisia-cyan) 35%, var(--dr-tunisia-line));
  box-shadow: inset 0 0 0 1px rgba(124, 234, 255, 0.06);
}

/* --- 8) Voice / persona: .dr-char-block --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-char-block {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s var(--dr-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-char-block:hover,
.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-char-block:focus-within {
  border-color: color-mix(in srgb, var(--dr-tunisia-gold) 45%, transparent);
  box-shadow: inset 0 0 36px rgba(198, 167, 104, 0.06);
  transform: translateY(-1px);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-char-block:focus-visible {
  outline: 2px solid rgba(124, 234, 255, 0.4);
  outline-offset: 3px;
}

/* --- 9) Reading list: .dr-links-wrap / .dr-link --- */

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-links-wrap {
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-links-wrap:focus-within {
  border-color: rgba(124, 234, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(124, 234, 255, 0.06);
}

.dr-single-shell .wp-block-post-content .dr-post-tunisia-pillar .dr-link:focus-visible {
  outline: 2px solid rgba(124, 234, 255, 0.45);
  outline-offset: 2px;
}

/* ==========================================
   18. RESPONSIVE
   ========================================== */

@media (max-width: 820px) {
  body.dr-family-post .wp-block-post-content {
    width: min(100% - 1.1rem, var(--dr-container));
    padding-block: clamp(2rem, 7vw, 3rem);
  }

  body.single .wp-block-post-featured-image img,
  body.dr-family-post .wp-block-post-featured-image img {
    max-height: 48vh;
  }

  body.dr-family-post th,
  body.dr-family-post td {
    padding: 0.75rem;
  }
}

@media (max-width: 640px) {
  body.dr-family-post p {
    font-size: 1rem;
  }

  body.dr-family-post .wp-block-post-content blockquote,
  body.dr-family-post .dr-related,
  body.dr-family-post .dr-sources,
  body.dr-family-post .dr-next-reading,
  body.dr-family-post .dr-series-nav,
  body.dr-family-post .dr-pullquote,
  body.dr-family-post .dr-standpoint,
  body.dr-family-post .dr-final-claim {
    padding: 1rem;
  }
}

/* ==========================================
   19. QUIZ COMPONENT
   ========================================== */

.dr-quiz {
  background: var(--dr-surface, rgba(255,255,255,0.04));
  border: 1px solid var(--dr-border, rgba(255,255,255,0.10));
  border-radius: var(--dr-radius-lg, 16px);
  padding: clamp(24px, 4vw, 48px);
  margin-block: clamp(32px, 5vw, 64px);
}
.dr-quiz-header { margin-bottom: 28px; }
.dr-quiz-title { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-top: 8px; }
.dr-quiz-question { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.dr-quiz-options { display: flex; flex-direction: column; gap: 10px; }
.dr-quiz-option {
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--dr-border, rgba(255,255,255,0.12));
  border-radius: var(--dr-radius-sm, 8px);
  color: var(--dr-text, #e8e8e8);
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.dr-quiz-option:hover:not(:disabled) {
  border-color: var(--dr-accent, #c9a84c);
  background: rgba(255,255,255,0.04);
}
.dr-quiz-option:disabled { cursor: default; opacity: 0.7; }
.dr-quiz-option.dr-correct {
  border-color: #4caf7d;
  background: rgba(76,175,125,0.10);
  color: #4caf7d;
}
.dr-quiz-option.dr-incorrect {
  border-color: #e07b54;
  background: rgba(224,123,84,0.10);
  color: #e07b54;
}
.dr-quiz-feedback {
  margin-top: 10px;
  font-size: 0.88rem;
  min-height: 20px;
  color: var(--dr-text-muted, rgba(232,232,232,0.6));
}
.dr-quiz-q { margin-bottom: 32px; }
.dr-quiz-result {
  text-align: center;
  padding: 32px 16px;
  border-top: 1px solid var(--dr-border, rgba(255,255,255,0.10));
  margin-top: 16px;
}
.dr-quiz-score {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--dr-accent, #c9a84c);
  line-height: 1;
}
.dr-quiz-result-label {
  font-size: 1rem;
  margin-top: 10px;
  color: var(--dr-text-muted, rgba(232,232,232,0.6));
}
.dr-quiz-retry {
  margin-top: 20px;
  padding: 10px 28px;
  background: transparent;
  border: 1px solid var(--dr-accent, #c9a84c);
  border-radius: var(--dr-radius-sm, 8px);
  color: var(--dr-accent, #c9a84c);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.dr-quiz-retry:hover {
  background: rgba(201,168,76,0.10);
}
@media (prefers-reduced-motion: reduce) {
  .dr-quiz-option, .dr-quiz-retry { transition: none; }
}

/* ── FLIPCARD SYSTEM ── */
.dr-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-block: 32px;
}

.dr-flip-card {
  perspective: 1200px;
  cursor: pointer;
  height: 280px;
  min-height: 280px;
  display: block;
  position: relative;
  isolation: isolate;
}

.dr-flip-card > .dr-flip-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dr-flip-card.dr-flipped > .dr-flip-inner {
  transform: rotateY(180deg);
}

.dr-flip-front,
.dr-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--dr-radius-sm, 10px);
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--dr-surface, rgba(255,255,255,0.04));
  border: 1px solid var(--dr-border, rgba(255,255,255,0.08));
}

.dr-flip-back {
  transform: rotateY(180deg);
  background: rgba(10, 22, 40, 0.96);
  border-color: rgba(99, 216, 230, 0.22);
}

.dr-flip-front h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: var(--dr-accent, #c9a84c);
}

.dr-flip-front p,
.dr-flip-back p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(232, 232, 232, 0.82);
}

/* ==========================================
   ARTICLE SECTIONS / SOURCE BLOCKS BASELINE
   ========================================== */

.dr-post-section,
.dr-section {
  position: relative;
  scroll-margin-top: 120px;
  margin-top: clamp(18px, 3vw, 34px);
  gap: 13px;
}

.dr-source,
.dr-sources {
  margin-block: clamp(18px, 3vw, 30px);
  padding: clamp(18px, 3vw, 28px);
}

@media (max-width: 768px) {
  .dr-timeline {
    grid-template-columns: 1fr;
  }
  .dr-flip-card {
    height: 240px;
    min-height: 240px;
  }
}

