/*
 * Blog POST pages — /blogs/post/<slug>, /fa/blogs/post/<slug>, /ar/blogs/post/<slug> (static, hand-published).
 *
 * 2026-09-30. The article body, the hero photo and the two author blocks (a byline card under the title
 * and an "About the author" card at the end). Shared by every agent article so the next one only needs
 * the same markup: .dn-post > .dn-post-head / .dn-post-hero / .dn-post-body / .dn-author-card / .dn-post-foot.
 *
 * Palette: the site's own ivory / charcoal / gold tokens (dn-ui-audit.css). No green anywhere (owner, 2026-09-30):
 * the only accent is the gold hairline and the gold role label.
 */

.dn-post {
  --dn-post-ink: #171717;
  --dn-post-muted: #6F6A63;
  --dn-post-ivory: #F7F6F3;
  --dn-post-gold: #C8A34A;
  --dn-post-gold-dark: #A8883A;
  --dn-post-line: rgba(200, 163, 74, 0.34);
  --dn-post-measure: 780px;
  max-width: 980px;
  margin: 0 auto;
  /* The theme's .zprow bleeds 15px past its container and the single-post column has no padding of its own,
     so the article carries its own gutter (22px on phones: text sits ~15px from the viewport edge). */
  padding: 8px 15px 24px !important; /* the theme's .theme-single-post .theme-blog-container { padding:0 } outranks .dn-post */
  color: var(--dn-post-ink);
}
.dn-post-article { display: block; }

/* ── Head ─────────────────────────────────────────────────────────────────────────────────── */
.dn-post-head { max-width: var(--dn-post-measure); margin: 0 auto 22px; }
.dn-post-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dn-post-gold-dark);
}
.dn-post-kicker a { color: inherit !important; text-decoration: none !important; }
.dn-post-kicker a:hover { text-decoration: underline !important; }
html[dir="rtl"] .dn-post-kicker { letter-spacing: 0; text-transform: none; font-size: 13px; }
.dn-post .theme-blog-heading,
.dn-post h1.dn-post-title {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dn-post-ink);
  overflow-wrap: anywhere;
}
html[dir="rtl"] .dn-post .theme-blog-heading { letter-spacing: 0; line-height: 1.5; font-size: clamp(24px, 3.4vw, 34px); }

/* ── Author blocks ────────────────────────────────────────────────────────────────────────── */
.dn-author-card {
  display: flex;
  align-items: center;
  text-align: start;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--dn-post-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.05);
}
.dn-author-photo {
  flex: 0 0 auto;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--dn-post-ivory);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--dn-post-line), 0 6px 16px rgba(23, 23, 23, 0.12);
}
/* The portrait behind the circle is the 208x421 studio shot; its top third is wall and the DN sign, so the
   circle is framed on the face: a little below the top, never "center" (chest) and never "top" (the sign). */
.dn-author-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  /* The 64px circle zooms onto the face (which lands at ~38% of the box with the position above). */
  transform: scale(1.45);
  transform-origin: 50% 38%;
}
.dn-author-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dn-author-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--dn-post-ink) !important;
  text-decoration: none !important;
  line-height: 1.3;
}
.dn-author-name:hover { color: var(--dn-post-gold-dark) !important; }
.dn-author-role { font-size: 13px; font-weight: 600; color: var(--dn-post-gold-dark); line-height: 1.4; }
.dn-author-when {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--dn-post-muted);
  line-height: 1.5;
}
.dn-author-when time { font-variant-numeric: tabular-nums; }
.dn-post-translated { color: var(--dn-post-muted); font-style: italic; }
html[dir="rtl"] .dn-post-translated { font-style: normal; }

/* The theme centres the single-post header; the byline card sits centred as a block but reads from the start. */
.dn-author-card--byline { display: inline-flex; max-width: 100%; min-width: min(100%, 440px); box-sizing: border-box; vertical-align: top; }

/* The closing card: bigger portrait, the profile's one-paragraph bio and its contact links. */
.dn-author-card--about {
  align-items: flex-start;
  gap: 22px;
  max-width: var(--dn-post-measure);
  margin: 36px auto 0;
  padding: 22px;
  background: linear-gradient(180deg, #fff 0%, var(--dn-post-ivory) 100%);
}
.dn-author-card--about .dn-author-photo {
  width: 112px;
  height: 140px;
  border-radius: 16px;
}
.dn-author-card--about .dn-author-photo img { object-position: 50% 40%; transform: none; }
.dn-author-card--about .dn-author-meta { gap: 6px; flex: 1 1 auto; }
.dn-author-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dn-post-muted);
}
html[dir="rtl"] .dn-author-eyebrow { letter-spacing: 0; text-transform: none; font-size: 13px; }
.dn-author-card--about .dn-author-name { font-size: 20px; }
.dn-author-bio { margin: 4px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--dn-post-ink); }
.dn-author-facts { margin: 0; font-size: 13px; color: var(--dn-post-muted); }
.dn-author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dn-author-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--dn-post-line);
  background: #fff;
  color: var(--dn-post-ink) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.dn-author-links a:hover,
.dn-author-links a:focus-visible { border-color: var(--dn-post-gold-dark); background: rgba(200, 163, 74, 0.12); outline: none; }
.dn-author-links a.dn-author-link--primary { background: var(--dn-post-gold); border-color: var(--dn-post-gold); }
.dn-author-links a.dn-author-link--primary:hover { background: var(--dn-post-gold-dark); border-color: var(--dn-post-gold-dark); color: #fff !important; }

/* ── Hero photo ───────────────────────────────────────────────────────────────────────────── */
.dn-post-hero { margin: 0 0 28px; }
.dn-post-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  background: var(--dn-post-ivory);
}
.dn-post-hero figcaption {
  margin: 10px 4px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dn-post-muted);
}

/* ── Body typography ──────────────────────────────────────────────────────────────────────── */
.dn-post-body {
  max-width: var(--dn-post-measure);
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--dn-post-ink);
}
.dn-post-body p { margin: 0 0 18px; overflow-wrap: anywhere; text-align: start; }
.dn-post-body h2 {
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--dn-post-line);
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.3;
  font-weight: 800;
  color: var(--dn-post-ink);
}
.dn-post-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dn-post-body h3 { margin: 22px 0 6px; font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--dn-post-ink); }
.dn-post-body ul, .dn-post-body ol { margin: 0 0 20px; padding-inline-start: 26px; }
.dn-post-body li { margin: 0 0 8px; padding-inline-start: 4px; overflow-wrap: anywhere; }
.dn-post-body ul li::marker { color: var(--dn-post-gold-dark); }
.dn-post-body ol li::marker { color: var(--dn-post-gold-dark); font-weight: 700; }
.dn-post-body a { color: var(--dn-post-gold-dark); }
html[dir="rtl"] .dn-post-body { font-size: 17px; line-height: 2; }
html[dir="rtl"] .dn-post-body h2 { line-height: 1.5; }
/* The shell (dn-portal-shell-v2.js isolateLatinText) marks an all-Latin <li> ("layout", "service charge")
   dir="ltr", which in an RTL list moves its marker to the left edge and 19px past the column at 390px.
   A list item keeps the list's direction; the Latin word itself still runs LTR inside it. */
html[dir="rtl"] .dn-post-body li[dir="ltr"] { direction: rtl; unicode-bidi: isolate; }

/* ── Footer: category + the three language versions ───────────────────────────────────────── */
.dn-post-foot {
  max-width: var(--dn-post-measure);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--dn-post-line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--dn-post-muted);
}
.dn-post-foot > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dn-post-foot a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--dn-post-line);
  border-radius: 999px;
  color: var(--dn-post-ink) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
}
.dn-post-foot a:hover { border-color: var(--dn-post-gold-dark); color: var(--dn-post-gold-dark) !important; }
.dn-post-foot a[aria-current="page"] { background: var(--dn-post-ivory); }

/* ── Phone ────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .dn-post { padding: 0 22px 24px !important; }
  .dn-post-body { font-size: 16.5px; }
  .dn-author-card { padding: 12px 14px; gap: 12px; }
  .dn-author-card--about { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; }
  .dn-author-card--about .dn-author-photo { width: 128px; height: 160px; }
  .dn-author-card--about .dn-author-meta { align-items: center; }
  .dn-author-links { justify-content: center; }
  .dn-post-hero img { border-radius: 14px; }
}

/* A one-line formula such as "Residential + Waterfront + Retail + ..." — always LTR, centred, set apart. */
.dn-post-body p.dn-post-line {
  margin: 4px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--dn-post-line);
  border-radius: 14px;
  background: var(--dn-post-ivory);
  text-align: center !important;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.7;
  direction: ltr;
}

/* ── Tables, deck lines, call-outs, sources, notes (2026-10-01: agent articles with data tables) ───── */
.dn-post-dek { margin: 0 0 10px; font-size: 15px; font-weight: 600; line-height: 1.7; color: var(--dn-post-muted); text-align: start; }
html[dir="rtl"] .dn-post-dek { line-height: 1.9; }
.dn-post-head .dn-author-card { margin-top: 6px; }
.dn-post-body p.dn-post-dek { font-size: 15.5px; margin-bottom: 8px; }
.dn-post-body p.dn-post-dek:first-child { margin-top: 0; }
.dn-post-body p.dn-post-callout {
  margin: 4px 0 22px;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--dn-post-gold);
  background: var(--dn-post-ivory);
  border-radius: 0 12px 12px 0;
  font-weight: 700;
  line-height: 1.75;
}
html[dir="rtl"] .dn-post-body p.dn-post-callout { border-radius: 12px 0 0 12px; }
.dn-post-body p.dn-post-tag {
  margin: 28px 0 8px;
  text-align: center !important;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--dn-post-ink);
}
.dn-post-body p.dn-post-source {
  margin: -6px 0 22px;
  padding-inline-start: 12px;
  border-inline-start: 2px solid var(--dn-post-line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--dn-post-muted);
}
.dn-post-source-label { font-weight: 700; }
.dn-post-body h3 { margin-top: 22px; }

.dn-table-wrap {
  margin: 8px 0 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--dn-post-line);
  border-radius: 14px;
  background: #fff;
}
.dn-table-wrap:focus-visible { outline: 2px solid var(--dn-post-gold-dark); outline-offset: 2px; }
.dn-post-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
.dn-post-table.dn-cols-3 { min-width: 560px; }
.dn-post-table.dn-cols-4 { min-width: 680px; }
.dn-post-table th, .dn-post-table td {
  padding: 11px 14px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid rgba(200, 163, 74, 0.22);
  overflow-wrap: anywhere;
}
.dn-post-table thead th { background: var(--dn-post-ivory); font-weight: 800; color: var(--dn-post-ink); border-bottom: 1px solid var(--dn-post-line); }
.dn-post-table tbody tr:last-child td { border-bottom: 0; }
.dn-post-table tbody td:first-child { font-weight: 600; }
html[dir="rtl"] .dn-post-table { font-size: 15px; line-height: 1.85; }

.dn-post-refs { margin: 0 0 20px; padding-inline-start: 26px; }
.dn-post-refs li { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.dn-post-refs li a { font-weight: 700; color: var(--dn-post-gold-dark); }
.dn-post-refs .dn-ref-url { display: block; font-size: 12.5px; color: var(--dn-post-muted); direction: ltr; text-align: start; unicode-bidi: isolate; }
html[dir="rtl"] .dn-post-refs .dn-ref-url { text-align: right; }
.dn-post-body .dn-post-note {
  margin: 8px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--dn-post-line);
  border-radius: 14px;
  background: var(--dn-post-ivory);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--dn-post-muted);
}
.dn-post-body .dn-post-note p { margin: 0; }
.dn-post-body .dn-post-note strong { color: var(--dn-post-ink); }
@media (max-width: 640px) {
  .dn-post-table th, .dn-post-table td { padding: 9px 11px; font-size: 14px; }
}

/* Phones: a table of 3+ columns reads as stacked cards (each cell carries its column name) instead of hiding columns
   behind a sideways scroll. The scroll wrapper stays for anything that still overflows. */
@media (max-width: 640px) {
  .dn-post-table.dn-cols-3, .dn-post-table.dn-cols-4 { min-width: 0; }
  .dn-post-table.dn-cols-3 thead, .dn-post-table.dn-cols-4 thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .dn-post-table.dn-cols-3 tr, .dn-post-table.dn-cols-4 tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--dn-post-line); }
  .dn-post-table.dn-cols-3 tbody tr:last-child, .dn-post-table.dn-cols-4 tbody tr:last-child { border-bottom: 0; }
  .dn-post-table.dn-cols-3 td, .dn-post-table.dn-cols-4 td { display: block; border: 0; padding: 4px 14px; }
  .dn-post-table.dn-cols-3 td::before, .dn-post-table.dn-cols-4 td::before {
    content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--dn-post-gold-dark); line-height: 1.5;
  }
  .dn-post-table.dn-cols-3 tbody td:first-child, .dn-post-table.dn-cols-4 tbody td:first-child { font-size: 15px; }
}

/* A small stock-size hero (the 297x170 picture of the older "Technology and AI" post): natural aspect, not stretched to the column. */
.dn-post-hero.dn-post-hero--small { text-align: center; }
.dn-post-hero.dn-post-hero--small img { display: inline-block; width: min(100%, 420px); height: auto; aspect-ratio: 297 / 170; border-radius: 16px; }

/* English title lines inside a Persian/Arabic article: always LTR, but anchored to the reading side. */
html[dir="rtl"] .dn-post-body p.dn-post-dek[dir="ltr"] { text-align: right; }
.dn-post-body p.dn-post-dek[dir="ltr"] { font-weight: 700; color: var(--dn-post-ink); }
