/* ==========================================================================
   Croplod Plus — Authors & Editorial (ap-*)
   ========================================================================== */
.ap-page { max-width: 1200px; margin: 0 auto; padding: 18px 0 54px; }

.ap-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  padding: clamp(20px, 3vw, 30px); border-radius: 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 260px at 95% 0%, rgba(228, 0, 43, .16), transparent 60%),
    linear-gradient(170deg, var(--bg-card, #fff), var(--bg-secondary, #f7f8fa));
  border: 1px solid var(--border-subtle, #e6e8ec);
}
.ap-avatar {
  width: 118px; height: 118px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg-card, #fff); box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .4);
  background: linear-gradient(135deg, #E4002B, #7c3aed); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; flex: none;
}
.ap-identity { min-width: 0; }
.ap-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ap-badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 4px 10px; font-size: 10.5px; font-weight: 800;
  background: var(--bg-secondary, #f2f4f7); color: var(--text-secondary, #5f6368);
  border: 1px solid var(--border-subtle, #e6e8ec);
}
.ap-badge svg { width: 12px; height: 12px; }
.ap-badge.gold { background: rgba(217, 119, 6, .12); color: #b45309; border-color: rgba(217, 119, 6, .25); }
.ap-badge.red { background: rgba(228, 0, 43, .1); color: #E4002B; border-color: rgba(228, 0, 43, .25); }
.ap-badge.purple { background: rgba(124, 58, 237, .1); color: #6d28d9; border-color: rgba(124, 58, 237, .25); }
.ap-badge.blue { background: rgba(37, 99, 235, .1); color: #1d4ed8; border-color: rgba(37, 99, 235, .25); }
.ap-badge.teal { background: rgba(13, 148, 136, .1); color: #0f766e; border-color: rgba(13, 148, 136, .25); }
.ap-badge.indigo { background: rgba(79, 70, 229, .1); color: #4338ca; border-color: rgba(79, 70, 229, .25); }
.ap-badge.orange { background: rgba(234, 88, 12, .1); color: #c2410c; border-color: rgba(234, 88, 12, .25); }
.ap-badge.sky { background: rgba(14, 165, 233, .1); color: #0369a1; border-color: rgba(14, 165, 233, .25); }
.ap-badge.slate { background: rgba(71, 85, 105, .1); color: #334155; border-color: rgba(71, 85, 105, .25); }
.ap-badge.cyan { background: rgba(6, 182, 212, .1); color: #0e7490; border-color: rgba(6, 182, 212, .25); }
.ap-badge.pink { background: rgba(219, 39, 119, .1); color: #be185d; border-color: rgba(219, 39, 119, .25); }
.ap-badge.lime { background: rgba(101, 163, 13, .1); color: #4d7c0f; border-color: rgba(101, 163, 13, .25); }
.ap-badge.green { background: rgba(22, 163, 74, .1); color: #15803d; border-color: rgba(22, 163, 74, .25); }
.ap-badge.amber { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .25); }
.ap-badge.gray { background: var(--bg-secondary, #f2f4f7); color: var(--text-secondary, #5f6368); }

.ap-name { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; margin: 0 0 4px; color: var(--text-primary, #101828); line-height: 1.3; }
.ap-headline { font-size: 13.5px; font-weight: 700; color: #E4002B; margin: 0 0 8px; }
.ap-bio { font-size: 13px; line-height: 2; color: var(--text-secondary, #5f6368); margin: 0 0 12px; max-width: 720px; }
.ap-socials { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.ap-social {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--text-secondary, #5f6368); background: var(--bg-card, #fff);
  border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 999px; padding: 5px 11px; text-decoration: none;
}
.ap-social:hover { border-color: #E4002B; color: #E4002B; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ap-btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 9px 16px;
  font-family: inherit; font-size: 12.5px; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.ap-btn-primary { background: #E4002B; color: #fff; }
.ap-btn-primary:hover { background: #B80022; }
.ap-btn-ghost { background: var(--bg-card, #fff); color: var(--text-primary, #101828); border-color: var(--border-subtle, #e6e8ec); }
.ap-btn-ghost:hover { border-color: #E4002B; color: #E4002B; }
.ap-btn-sm { padding: 6px 11px; font-size: 11px; border-radius: 8px; }

.ap-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.ap-stat {
  background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 13px; padding: 12px 14px;
}
.ap-stat b { display: block; font-size: clamp(18px, 2.2vw, 24px); font-weight: 900; color: var(--text-primary, #101828); }
.ap-stat span { font-size: 10.5px; color: var(--text-tertiary, #9aa0a6); }
.ap-stat.accent { background: linear-gradient(160deg, rgba(228, 0, 43, .1), transparent); border-color: rgba(228, 0, 43, .28); }
.ap-stat.accent b { color: #E4002B; }

.ap-layout { display: grid; grid-template-columns: 1.55fr .9fr; gap: 18px; align-items: start; margin-top: 18px; }
.ap-card {
  background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 16px; padding: 18px; margin-bottom: 14px;
}
.ap-card-title { font-size: 14px; font-weight: 900; margin: 0 0 12px; color: var(--text-primary, #101828); display: flex; align-items: center; gap: 7px; }
.ap-card-title svg { width: 17px; height: 17px; color: #E4002B; }
.ap-muted { font-size: 11.5px; color: var(--text-tertiary, #9aa0a6); }
.ap-empty { text-align: center; color: var(--text-tertiary, #9aa0a6); font-size: 12.5px; padding: 24px 0; }

.ap-archive { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-post {
  display: flex; flex-direction: column; background: var(--bg-card, #fff);
  border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 14px; overflow: hidden;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.ap-post:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -26px rgba(16, 24, 40, .35); }
.ap-post-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-secondary, #f2f4f7); display: block; }
.ap-post-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ap-post-cat { font-size: 10px; font-weight: 800; color: #E4002B; }
.ap-post-title { font-size: 13px; font-weight: 800; line-height: 1.8; color: var(--text-primary, #101828); margin: 0; }
.ap-post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--text-tertiary, #9aa0a6); margin-top: auto; }

.ap-pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.ap-page-link {
  min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border-subtle, #e6e8ec); background: var(--bg-card, #fff);
  color: var(--text-secondary, #5f6368); font-size: 12px; font-weight: 800; text-decoration: none; padding: 0 8px;
}
.ap-page-link.active { background: #E4002B; color: #fff; border-color: #E4002B; }
.ap-page-link:hover:not(.active) { border-color: #E4002B; color: #E4002B; }

.ap-role-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border-subtle, #e6e8ec); font-size: 12px; }
.ap-role-line:last-child { border-bottom: none; }
.ap-role-line b { color: var(--text-primary, #101828); }
.ap-role-line span { color: var(--text-tertiary, #9aa0a6); text-align: left; }
.ap-perms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ap-perm { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 3px 8px; background: var(--bg-secondary, #f2f4f7); color: var(--text-secondary, #5f6368); }
.ap-perm.on { background: rgba(18, 128, 92, .12); color: #12805c; }
.ap-perm.off { opacity: .45; text-decoration: line-through; }

.ap-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ap-chip { font-size: 10.5px; font-weight: 700; color: var(--text-secondary, #5f6368); background: var(--bg-secondary, #f2f4f7); border-radius: 999px; padding: 4px 9px; }
.ap-kv { display: grid; gap: 6px; font-size: 12px; color: var(--text-secondary, #5f6368); }
.ap-kv b { color: var(--text-primary, #101828); font-weight: 800; }
.ap-team-list { display: grid; gap: 8px; }
.ap-team-pill { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 8px 10px; background: var(--bg-secondary, #f7f8fa); border-radius: 10px; }
.ap-team-pill b { color: var(--text-primary, #101828); }
.ap-team-pill span { font-size: 10px; color: var(--text-tertiary, #9aa0a6); }

/* directory */
.ap-hero-simple { padding: 26px; border-radius: 20px; border: 1px solid var(--border-subtle, #e6e8ec); background: linear-gradient(170deg, var(--bg-card, #fff), var(--bg-secondary, #f7f8fa)); margin-bottom: 16px; }
.ap-hero-simple h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 900; margin: 6px 0 8px; color: var(--text-primary, #101828); }
.ap-hero-simple p { font-size: 13px; line-height: 2; color: var(--text-secondary, #5f6368); margin: 0; max-width: 760px; }
.ap-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #E4002B; }
.ap-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 16px; }
.ap-tab {
  border: 1px solid var(--border-subtle, #e6e8ec); background: var(--bg-card, #fff);
  color: var(--text-secondary, #5f6368); border-radius: 999px; padding: 7px 14px;
  font-size: 11.5px; font-weight: 800; text-decoration: none;
}
.ap-tab.active { background: #E4002B; color: #fff; border-color: #E4002B; }
.ap-tab:hover:not(.active) { border-color: #E4002B; color: #E4002B; }

.ap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ap-author-card {
  background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 15px; padding: 16px; display: flex; flex-direction: column; gap: 9px;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.ap-author-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -26px rgba(16, 24, 40, .35); }
.ap-author-top { display: flex; align-items: center; gap: 10px; }
.ap-author-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: linear-gradient(135deg, #E4002B, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; }
.ap-author-name { font-size: 13.5px; font-weight: 900; color: var(--text-primary, #101828); margin: 0; line-height: 1.5; }
.ap-author-role { font-size: 10.5px; color: #E4002B; font-weight: 700; }
.ap-author-bio { font-size: 11.5px; line-height: 1.9; color: var(--text-secondary, #5f6368); margin: 0; }
.ap-author-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 10px; color: var(--text-tertiary, #9aa0a6); margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border-subtle, #e6e8ec); }

/* editorial */
.ap-leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ap-leader { background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 15px; padding: 16px; display: flex; gap: 11px; align-items: center; text-decoration: none; }
.ap-leader .ap-author-avatar { width: 56px; height: 56px; }
.ap-leader h3 { font-size: 13.5px; font-weight: 900; margin: 0; color: var(--text-primary, #101828); }
.ap-leader p { font-size: 10.5px; color: var(--text-tertiary, #9aa0a6); margin: 3px 0 0; }

.ap-org-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-team { background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 15px; padding: 16px; }
.ap-team-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ap-team h3 { font-size: 13.5px; font-weight: 900; margin: 0; color: var(--text-primary, #101828); }
.ap-team-count { font-size: 10px; font-weight: 800; color: #E4002B; background: rgba(228, 0, 43, .08); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.ap-team-tag { font-size: 11px; color: #E4002B; font-weight: 700; margin: 0 0 6px; }
.ap-team-desc { font-size: 11.5px; line-height: 1.9; color: var(--text-secondary, #5f6368); margin: 0 0 10px; }
.ap-members { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-member { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-size: 10.5px; font-weight: 700; color: var(--text-secondary, #5f6368); background: var(--bg-secondary, #f7f8fa); border-radius: 999px; padding: 4px 9px; }
.ap-member:hover { color: #E4002B; }
.ap-member b { color: var(--text-primary, #101828); }
.ap-member small { font-size: 9px; color: var(--text-tertiary, #9aa0a6); }

.ap-table-wrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ap-table th { text-align: right; font-size: 10.5px; color: var(--text-tertiary, #9aa0a6); font-weight: 800; padding: 9px; border-bottom: 1px solid var(--border-subtle, #e6e8ec); white-space: nowrap; }
.ap-table td { padding: 11px 9px; border-bottom: 1px solid var(--border-subtle, #e6e8ec); vertical-align: top; line-height: 1.9; }
.ap-table tr:last-child td { border-bottom: none; }
.ap-table b { color: var(--text-primary, #101828); }
.ap-perm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-perm-chips span { font-size: 9.5px; font-weight: 700; background: var(--bg-secondary, #f2f4f7); border-radius: 999px; padding: 3px 7px; color: var(--text-secondary, #5f6368); }

/* article author box */
.ap-author-box { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-secondary, #f7f8fa); border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 14px; padding: 16px; margin: 22px 0; }
.ap-author-box .ap-author-avatar { width: 56px; height: 56px; font-size: 18px; }
.ap-author-box h3 { font-size: 14px; font-weight: 900; margin: 0 0 3px; color: var(--text-primary, #101828); }
.ap-author-box p { font-size: 12px; line-height: 1.9; color: var(--text-secondary, #5f6368); margin: 0 0 8px; }

@media (max-width: 1024px) {
  .ap-layout { grid-template-columns: 1fr; }
  .ap-grid { grid-template-columns: 1fr 1fr; }
  .ap-leaders { grid-template-columns: 1fr 1fr; }
  .ap-org-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ap-hero { grid-template-columns: 1fr; text-align: center; }
  .ap-avatar { margin: 0 auto; width: 96px; height: 96px; font-size: 28px; }
  .ap-stats { grid-template-columns: 1fr 1fr; }
  .ap-archive { grid-template-columns: 1fr; }
  .ap-grid, .ap-leaders { grid-template-columns: 1fr; }
  .ap-author-card { text-align: right; }
  .ap-page { padding: 10px 0 36px; }
}

/* Text safety for mixed Persian/Latin author names and headlines */
.ap-name, .ap-headline, .ap-bio, .ap-author-bio, .ap-post-title, .ap-author-name {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  unicode-bidi: plaintext;
}
.ap-headline, .ap-bio { max-width: 100%; }

/* ==========================================================================
   Formal, open editorial layout — replaces the card-heavy skin
   ========================================================================== */
.ap-page { max-width: 1180px; padding: 6px 0 64px; }

.ap-hero {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0;
  padding: 12px 0 30px;
  gap: 28px;
}
.ap-avatar { width: 112px; height: 112px; border: 1px solid var(--border-subtle, #e6e8ec); box-shadow: none; }
.ap-name { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.02em; margin-top: 6px; }
.ap-role-title {
  font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  color: #E4002B; margin: 0 0 8px;
}
.ap-headline { font-size: 15px; line-height: 1.9; font-weight: 600; color: var(--text-secondary, #475467); margin-bottom: 8px; }
.ap-bio { font-size: 13.5px; line-height: 2.1; color: var(--text-secondary, #475467); max-width: 680px; }
.ap-stats {
  display: flex; gap: 0; border-top: 1px solid var(--border-subtle, #e6e8ec);
  border-bottom: 1px solid var(--border-subtle, #e6e8ec); padding: 16px 0; margin-top: 12px;
}
.ap-stat {
  flex: 1; background: transparent; border: 0; border-radius: 0;
  padding: 0 22px; border-inline-start: 1px solid var(--border-subtle, #e6e8ec);
}
.ap-stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.ap-stat b { font-size: 26px; letter-spacing: -.02em; }
.ap-stat span { font-size: 10.5px; }
.ap-stat small { display: block; font-size: 9.5px; color: var(--text-tertiary, #8a94a6); margin-top: 2px; }
.ap-stat.accent { background: transparent; border-color: var(--border-subtle, #e6e8ec); }
.ap-stat.accent b { color: #E4002B; }

.ap-layout { grid-template-columns: minmax(0, 1.65fr) minmax(260px, .7fr); gap: 44px; margin-top: 26px; }
.ap-card {
  background: transparent; border: 0; border-top: 2px solid var(--text-primary, #101828);
  border-radius: 0; padding: 18px 0 0; margin-bottom: 30px;
}
.ap-card-title { font-size: 15px; margin-bottom: 14px; }
.ap-side .ap-card { border-top-color: var(--border-subtle, #e6e8ec); }
.ap-side .ap-card-title { font-size: 13.5px; }
.ap-role-line { padding: 9px 0; border-bottom: 1px solid var(--border-subtle, #e6e8ec); }
.ap-role-line:last-child { border-bottom: 0; }
.ap-perms { gap: 7px; margin-top: 12px; }
.ap-perm { background: transparent; border: 1px solid var(--border-subtle, #e6e8ec); padding: 4px 9px; }
.ap-perm.on { background: transparent; border-color: rgba(18, 128, 92, .45); color: #12805c; }
.ap-perm.off { opacity: .4; text-decoration: none; }
.ap-chip { background: transparent; border: 1px solid var(--border-subtle, #e6e8ec); }
.ap-team-pill { background: transparent; border: 1px solid var(--border-subtle, #e6e8ec); }

.ap-archive { gap: 28px 24px; }
.ap-post {
  background: transparent; border: 0; border-bottom: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0; overflow: visible; transition: none;
}
.ap-post:hover { transform: none; box-shadow: none; }
.ap-post-img { border-radius: 4px; }
.ap-post-body { padding: 12px 0 18px; gap: 7px; }
.ap-post-cat { font-size: 9.5px; letter-spacing: .04em; }
.ap-post-title { font-size: 14.5px; line-height: 1.8; }
.ap-post:hover .ap-post-title { color: #E4002B; }
.ap-post-meta { font-size: 10px; }

.ap-hero-simple {
  background: transparent; border: 0; border-bottom: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0; padding: 12px 0 30px; margin-bottom: 22px;
}
.ap-hero-simple h1 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.02em; }
.ap-hero-simple p { font-size: 13.5px; line-height: 2.1; }
.ap-tabs { gap: 20px; border-bottom: 1px solid var(--border-subtle, #e6e8ec); padding-bottom: 0; margin: 18px 0 22px; }
.ap-tab {
  border: 0; border-radius: 0; background: transparent; padding: 10px 0;
  border-bottom: 2px solid transparent; font-size: 12px; color: var(--text-tertiary, #8a94a6);
}
.ap-tab.active { background: transparent; color: var(--text-primary, #101828); border-bottom-color: #E4002B; }
.ap-tab:hover:not(.active) { background: transparent; color: #E4002B; }

.ap-grid { gap: 34px 28px; }
.ap-author-card {
  background: transparent; border: 0; border-top: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0; padding: 18px 0 0; transition: none;
}
.ap-author-card:hover { transform: none; box-shadow: none; }
.ap-author-card:hover .ap-author-name { color: #E4002B; }
.ap-author-avatar { width: 52px; height: 52px; }
.ap-author-name { font-size: 14px; }
.ap-author-bio { line-height: 2; }

.ap-leaders { gap: 32px 28px; }
.ap-leader {
  background: transparent; border: 0; border-top: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0; padding: 16px 0 0;
}
.ap-org-grid { gap: 34px 40px; }
.ap-team {
  background: transparent; border: 0; border-top: 1px solid var(--border-subtle, #e6e8ec);
  border-radius: 0; padding: 18px 0 0;
}
.ap-team h3 { font-size: 14px; }
.ap-team-desc { line-height: 2; }
.ap-members { gap: 8px; }
.ap-member { background: transparent; border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 4px; padding: 4px 8px; }
.ap-table th { padding: 10px 8px; }
.ap-table td { padding: 13px 8px; }
.ap-perm-chips span { background: transparent; border: 1px solid var(--border-subtle, #e6e8ec); border-radius: 4px; }

.p-author-box-pro {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--ed-line, #e6e8ec) !important;
  border-bottom: 1px solid var(--ed-line, #e6e8ec) !important;
  border-radius: 0 !important;
  padding: 20px 0 !important;
  box-shadow: none !important;
}

@media (max-width: 1024px) {
  .ap-layout { grid-template-columns: 1fr; gap: 26px; }
  .ap-grid { grid-template-columns: 1fr 1fr; }
  .ap-leaders { grid-template-columns: 1fr 1fr; }
  .ap-org-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ap-hero { grid-template-columns: 1fr; text-align: center; gap: 18px; padding-bottom: 24px; }
  .ap-avatar { margin: 0 auto; width: 96px; height: 96px; }
  .ap-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 8px 0; }
  .ap-stat { border-inline-start: 1px solid var(--border-subtle, #e6e8ec); padding: 10px 14px; }
  .ap-stat:nth-child(odd) { border-inline-start: 0; }
  .ap-stat b { font-size: 20px; }
  .ap-archive { grid-template-columns: 1fr; gap: 0; }
  .ap-post { padding: 0; }
  .ap-grid, .ap-leaders { grid-template-columns: 1fr; gap: 24px; }
  .ap-page { padding: 6px 0 40px; }
  .ap-layout { gap: 22px; }
  .ap-tabs { gap: 14px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .ap-tab { white-space: nowrap; }
}

/* RTL alignment for mixed Persian/Latin profile text */
.ap-name, .ap-headline, .ap-bio { unicode-bidi: normal; text-align: right; }
.ap-role-title { text-align: right; }
@media (max-width: 720px) {
  .ap-name, .ap-headline, .ap-bio, .ap-role-title { text-align: center; }
}

/* Free, unboxed profile header — no red behind avatars */
.ap-hero { border-bottom: 0 !important; padding: 18px 0 6px; }
.ap-avatar { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.ap-author-avatar { background: var(--bg-secondary, #eef1f5) !important; color: var(--text-secondary, #475467) !important; }
.ap-stats {
  display: flex !important; gap: clamp(20px, 4vw, 56px);
  border: 0 !important; padding: 18px 0 8px !important; margin-top: 6px !important;
}
.ap-stat { border: 0 !important; padding: 0 !important; flex: 0 1 auto; }
.ap-stat b { font-size: 24px; }
@media (max-width: 720px) {
  .ap-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: 14px !important; padding: 12px 0 4px !important; }
  .ap-stat { padding: 0 !important; }
}

/* Use the full hero width for the bio instead of leaving a large empty left area */
.ap-bio { max-width: 100% !important; }
.ap-headline { max-width: 100% !important; }
