/* Private Ghazi interior pages: scholarly archive and editorial reading. */
main:has(.section-head),
main:has(.article-header),
main:has(.breadcrumb) {
  --page-surface: #fbfdfe;
  --page-soft: #e7eff7;
  --page-ink: #1e2b3b;
  --page-subtle: #51677d;
  --page-border: #cfdce8;
  color: var(--page-ink);
}
main:has(.section-head) > :first-child,
main:has(.article-header) > :first-child,
main:has(.breadcrumb) > :first-child {
  margin-block-start: 34px;
}
main .breadcrumb {
  max-width: 1180px;
  margin: 26px auto 30px;
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--page-border, var(--line));
  color: var(--page-subtle, var(--muted));
  font-size: .79rem;
}
main .breadcrumb a { color: #29415a; }
main .breadcrumb .active { color: #627990; }
main .section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin: 42px auto 23px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--page-border, var(--line));
}
main .section-head .star { display: none; }
main .section-head h2 {
  margin: 0;
  color: var(--page-ink, var(--ink));
  font-weight: 750;
  line-height: 1.45;
  letter-spacing: -.015em;
}
main .section-head .rule {
  display: none;
}
main .section-head .more {
  margin-inline-start: auto;
  color: #314f6e;
  font-size: .83rem;
}
main .row.g-4,
main .row.g-3,
main > header.mb-3,
main > p,
main > form.panel {
  max-width: 1180px;
  margin-inline: auto;
}
main .panel,
main .care-panel,
main .story,
main .doc-card {
  background: var(--page-surface, var(--archive-paper));
  border: 1px solid var(--page-border, var(--line));
  border-radius: 2px;
  box-shadow: none;
}
main .panel { padding: 22px; }
main .panel-head {
  margin: -22px -22px 18px;
  padding: 14px 22px;
  background: var(--page-soft, #e7eff7);
  border-bottom: 1px solid var(--page-border, var(--line));
}
main .panel-head .star { display: none; }
main .panel-head h3 {
  margin: 0;
  color: var(--page-ink, var(--ink));
  font-size: 1.05rem;
  font-weight: 700;
}
main .panel-body { color: var(--page-ink, var(--ink)); }
main .care-panel { padding: 22px; }
main .care-panel > h3 {
  margin: -22px -22px 18px;
  padding: 14px 22px;
  background: var(--page-soft, #e7eff7);
  border-bottom: 1px solid var(--page-border, var(--line));
  color: var(--page-ink, var(--ink));
}
main .tab-buttons { border-bottom-color: var(--page-border, var(--line)); }
main .tab-buttons button { background: var(--page-soft, #e7eff7); }
main .tab-buttons button.active {
  background: var(--page-surface, var(--archive-paper));
  color: #14253a;
  border-bottom-color: #365779;
}
main .rank-list li,
main .archive-list li,
main .story-row {
  border-bottom: 1px solid var(--page-border, var(--line));
}
main .rank-list a:hover,
main .archive-list a:hover,
main .story-row a:hover { color: #1a2f49; }
main .care-card,
main .story {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
main .care-card:hover,
main .story:hover {
  border-color: #6790b7;
  box-shadow: 0 12px 30px #1f2e4212;
  transform: translateY(-2px);
}
main .story { overflow: hidden; height: 100%; }
main .story .thumb { display: block; aspect-ratio: 16/9; background: #e0e9f2; }
main .story .thumb img { width: 100%; height: 100%; object-fit: cover; }
main .story .body { padding: 18px 20px; }
main .story h3 { color: var(--page-ink, var(--ink)); font-size: 1.03rem; line-height: 1.65; }
main .story .dek { color: var(--page-subtle, var(--muted)); }
main .story .meta,
main .care-meta { color: #688199; font-size: .78rem; }
main .article-header {
  padding: 0 0 26px;
  border-bottom: 1px solid var(--page-border, var(--line));
  margin-bottom: 32px;
}
main .article-header h1 {
  max-width: 24ch;
  color: var(--page-ink, var(--ink));
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.5;
  margin: 16px 0;
}
main .article-header .standfirst {
  color: var(--page-subtle, var(--muted));
  font-size: 1.12rem;
  line-height: 2;
  max-width: 66ch;
}
main .article-header .byline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  color: #5f778f;
  font-size: .8rem;
}
main .article-header .byline .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
main .article-header .author-name { color: #182d47; font-weight: 700; }
main .prose {
  max-width: 75ch;
  color: var(--page-ink, var(--ink));
  font-size: 1.04rem;
  line-height: 2.2;
}
main .prose h2,
main .prose h3 { color: var(--page-ink, var(--ink)); line-height: 1.55; }
main .prose a { color: #1b304b; text-decoration: underline; text-underline-offset: 3px; }
main .prose blockquote {
  padding: 18px 25px;
  border-inline-start: 3px solid #446d97;
  background: var(--page-soft, #e7eff7);
  color: var(--page-subtle, var(--muted));
}
main .prose img,
main article figure img { max-width: 100%; height: auto; border-radius: 2px !important; }
main .doc-card { padding: 16px; align-items: flex-start; }
main .doc-card .cover { background: #e0e9f2; }
main .audio-player {
  background: #e5edf4;
  border: 1px solid #a7bfd8;
  border-radius: 2px;
  padding: 22px;
  color: #1e2b3b;
}
main .audio-player audio { width: 100%; }
main .audio-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
main .audio-tools button,
main .audio-tools select {
  border: 1px solid #5e85aa;
  background: var(--archive-paper);
  color: #152334;
  padding: 4px 9px;
  border-radius: 2px;
}
main .audio-tools label { display: flex; align-items: center; gap: 7px; font-size: .8rem; }
main .form-label { color: var(--page-ink, var(--ink)); font-size: .84rem; font-weight: 700; }
main .form-control,
main .form-select {
  min-height: 43px;
  border-color: #87a7c8;
  border-radius: 2px;
  background-color: var(--page-surface, var(--archive-paper));
  color: var(--page-ink, var(--ink));
}
main .form-control:focus,
main .form-select:focus {
  border-color: #3c5f82;
  box-shadow: 0 0 0 .2rem #3c5f8225;
}
main .btn-green,
main .btn-gold,
main .btn-outline-green {
  border-radius: 2px;
  padding: .52rem .9rem;
}
main .btn-green,
main .btn-gold { background: #1b2d44 !important; border-color: #1b2d44 !important; color: #fff !important; }
main .btn-outline-green { background: transparent !important; border-color: #405f7f !important; color: #1b2d44 !important; }
main .btn-outline-green:hover { background: #1b2d44 !important; color: #fff !important; }
main .tag-cloud a,
main .type-badge {
  border-radius: 2px;
}
main .tag-cloud a { background: #e3ecf5; color: #223751; }
main .tag-cloud a:hover { background: #cfdeed; }
main .calendar-grid,
main .programme-day { background: var(--page-surface, var(--archive-paper)); }
main .speaker-chip { border-color: var(--page-border, var(--line)); }
main .nav-pills .nav-link { border-radius: 2px; }
main .pagination .page-link { color: #1d324e; border-color: #cfdce8; background: var(--archive-paper); }
main .pagination .active .page-link { color: #fff; background: #1b2d44; border-color: #1b2d44; }
[data-theme="dark"] main:has(.section-head),
[data-theme="dark"] main:has(.article-header),
[data-theme="dark"] main:has(.breadcrumb) {
  --page-surface: #15202e;
  --page-soft: #1f2b3a;
  --page-ink: #dbe4ed;
  --page-subtle: #a2b5c7;
  --page-border: #38485c;
}
[data-theme="dark"] main .breadcrumb a,
[data-theme="dark"] main .section-head .more,
[data-theme="dark"] main .prose a,
[data-theme="dark"] main .article-header .author-name { color: #a9c6e2; }
[data-theme="dark"] main .form-control,
[data-theme="dark"] main .form-select,
[data-theme="dark"] main .audio-tools button,
[data-theme="dark"] main .audio-tools select {
  background: #15202e;
  border-color: #465d74;
  color: #dbe4ed;
}
[data-theme="dark"] main .audio-player { background: #202d3d; border-color: #38485c; color: #dbe4ed; }
[data-theme="dark"] main .btn-outline-green { color: #bfd7ef !important; border-color: #698eb3 !important; }
[data-theme="dark"] main .pagination .page-link { background: #15202e; border-color: #38485c; color: #bfd7ef; }
@media (max-width: 760px) {
  main .breadcrumb { margin-block: 18px 22px; }
  main .section-head { margin-top: 28px; }
  main .panel, main .care-panel { padding: 16px; }
  main .panel-head, main .care-panel > h3 { margin: -16px -16px 15px; padding: 12px 16px; }
  main .article-header h1 { font-size: 1.75rem; }
  main .prose { font-size: 1rem; }
}


/* =====================================================================================
   Oct 2026 fixes: interior pages keep one centred width; conferences; calendar; related
   posts; comments; scholar profiles.
   ===================================================================================== */
/* Every block placed straight inside an interior page (one with a breadcrumb) keeps the page width,
   so headers, tab bars and calendars no longer stretch from edge to edge. */
main:has(.breadcrumb) > :not(script):not(style):not(dialog):not(.full-bleed) {
  width: min(1180px, calc(100% - 36px));
  max-width: none;
  margin-inline: auto;
}
main:has(.breadcrumb) > .row { --bs-gutter-x: 1.5rem; padding-inline: 0; }
main:has(.breadcrumb) { padding-bottom: 56px; }
main .panel { overflow: hidden; }

/* Conference tabs: one integrated bar under the page title */
main .conf-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px auto 22px; padding: 6px; list-style: none;
  border: 1px solid var(--page-border, var(--line)); border-radius: 10px; background: var(--page-surface, #fff); }
main .conf-tabs .nav-link { padding: 8px 18px; border-radius: 7px !important; border: 0 !important; font-size: .86rem; font-weight: 700;
  background: transparent !important; color: var(--page-subtle, #51677d) !important; }
main .conf-tabs .nav-link.btn-green { background: #1b3a6b !important; color: #fff !important; }
main .conf-tabs .nav-link:hover { color: #1b3a6b !important; background: var(--page-soft, #e7eff7) !important; }
main .conf-tabs .nav-link.btn-green:hover { color: #fff !important; background: #0f2548 !important; }

/* Conference cards: four per row, smaller */
main .conf-card .thumb { aspect-ratio: 16 / 10; }
main .conf-card .body { padding: 12px 14px 14px; }
main .conf-card h3 { font-size: .95rem; line-height: 1.7; margin: 6px 0 4px; }
main .conf-card .dek { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
main .conf-card .meta { font-size: .74rem; }
.type-badge.conference { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: #e6ebf4; color: #1b3a6b; }
.type-badge.conf-status-open { background: #e6f5ec; color: #1d7a45; }
.type-badge.conf-status-closed, .type-badge.conf-status-finished { background: #f1f1f1; color: #6b6b6b; }
.type-badge.conf-status-live { background: #fff4d6; color: #8a6100; }
.type-badge.conf-status-announced, .type-badge.conf-status-upcoming { background: #e6ebf4; color: #1b3a6b; }
.form-label .req { color: #c0392b; }

/* Month calendar */
main .calendar-grid { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
main .calendar-grid th { padding: 6px 0; text-align: center; font-size: .78rem; font-weight: 800; color: var(--page-subtle, #51677d); }
main .calendar-grid td { height: 92px; padding: 6px; vertical-align: top; border: 1px solid var(--page-border, #cfdce8); border-radius: 8px; background: var(--page-surface, #fff); overflow: hidden; }
main .calendar-grid td.empty { border: 0; background: transparent; }
main .calendar-grid td.today { border-color: #c99a1e; box-shadow: inset 0 0 0 1px #c99a1e; }
main .calendar-grid td.has-events { background: #f2f5fa; }
main .calendar-grid .daynum { display: block; font-size: .86rem; font-weight: 800; color: var(--page-ink, #1e2b3b); }
main .calendar-grid .cal-event { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 5px; background: #1b3a6b; color: #fff !important;
  font-size: .7rem; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main .calendar-grid .cal-event.past { background: #8a96a8; }
main .calendar-grid .cal-event:hover { background: #c99a1e; }
main .panel-head:has(.btn) { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 640px) {
  main .calendar-grid { border-spacing: 2px; }
  main .calendar-grid td { height: 54px; padding: 3px; }
  main .calendar-grid .cal-event { font-size: 0; height: 6px; padding: 0; }
}

/* Related posts: four per row, a small image on the left, title and description */
.related-strip { margin-top: 10px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.related-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--page-border, #cfdce8); border-radius: 10px;
  background: var(--page-surface, #fff); color: var(--page-ink, #1e2b3b); text-decoration: none; transition: border-color .2s, transform .2s; }
.related-card:hover { border-color: #1b3a6b; transform: translateY(-2px); color: var(--page-ink, #1e2b3b); }
.related-text { flex: 1; min-width: 0; }
.related-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .84rem; line-height: 1.7; }
.related-text small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: .74rem; line-height: 1.7; color: var(--page-subtle, #51677d); }
.related-thumb { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #e0e9f2; color: #1b3a6b; order: 2; }
[dir="ltr"] .related-thumb { order: 0; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1100px) { .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }

/* Comments: name at the top right, text, date at the bottom left in grey */
.comments-section .comment { margin-bottom: 14px; border: 1px solid var(--page-border, #cfdce8); border-radius: 12px; background: var(--page-surface, #fff); overflow: hidden; }
.comment-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(135deg, #1b3a6b, #2c5591); color: #fff; }
.comment-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #c99a1e; color: #0f2548; font-weight: 900; font-size: .9rem; }
.comment-head .name { font-weight: 800; font-size: .92rem; }
.comments-section .comment .text { margin: 0; padding: 14px 16px 6px; line-height: 2; white-space: pre-line; color: var(--page-ink, #1e2b3b); }
.comment-foot { display: flex; justify-content: flex-end; padding: 6px 14px 10px; }
.comment-foot .when { padding: 3px 12px; border-radius: 999px; background: #eef1f6; color: #7b8794; font-size: .74rem; }
.comments-section .replies { margin: 0 14px 12px; padding-inline-start: 14px; border-inline-start: 3px solid #e6ebf4; }
.comments-section .replies .comment-head { background: linear-gradient(135deg, #2c5591, #4a72ad); }

/* Scholar profiles */
main .scholar-hero .panel-body { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
main .scholar-hero img, main .scholar-hero .scholar-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #c99a1e; }
main .scholar-hero .scholar-avatar { display: grid; place-items: center; background: #1b3a6b; color: #f3d98a; font-size: 2rem; font-weight: 900; }

/* Conference programme: day headings, session rows and speaker chips */
main .programme-day { display: inline-block; margin: 8px 0 10px; padding: 5px 14px; border-radius: 6px; background: #1b3a6b; color: #fff; font-size: .82rem; font-weight: 800; }
main .session { display: flex; gap: 16px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--page-border, #cfdce8); border-inline-start: 4px solid #c99a1e; border-radius: 10px; background: var(--page-surface, #fff); }
main .session .time { flex: none; min-width: 110px; color: #1b3a6b; font-size: .8rem; font-weight: 800; direction: ltr; text-align: end; }
main .session h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; line-height: 1.7; }
main .session .hall { color: var(--page-subtle, #51677d); font-size: .78rem; }
main .speaker-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--page-border, #cfdce8); border-radius: 999px;
  background: var(--page-soft, #e7eff7); color: var(--page-ink, #1e2b3b); font-size: .82rem; font-weight: 700; text-decoration: none; max-width: 100%; }
[dir="ltr"] main .speaker-chip { padding: 4px 12px 4px 4px; }
main .speaker-chip img { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; }
main .speaker-chip:hover { border-color: #1b3a6b; color: #1b3a6b; }
main .seat-meter { height: 8px; border-radius: 999px; background: #e6ebf4; overflow: hidden; }
main .seat-meter span { display: block; height: 100%; background: linear-gradient(90deg, #1b3a6b, #c99a1e); }
@media (max-width: 640px) { main .session { flex-direction: column; gap: 6px; } main .session .time { text-align: start; } }

/* Solar Hijri date picker (wwwroot/js/jalali-picker.js) */
.jdp { position: relative; }
.jdp-view { cursor: pointer; direction: rtl; text-align: right; font-variant-numeric: tabular-nums; }
.jdp-pop { position: fixed; z-index: 1090; top: 0; left: 0; direction: rtl; width: 280px; padding: 10px; border: 1px solid var(--a-line, #d3dae7);
  border-radius: 12px; background: var(--a-surface, #fff); color: var(--a-ink, #14213a); box-shadow: 0 14px 34px rgba(15, 37, 72, .22); direction: rtl; }
.jdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jdp-head strong { font-size: .92rem; }
.jdp-nav { width: 30px; height: 30px; border: 1px solid var(--a-line, #d3dae7); border-radius: 8px; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.jdp-nav:hover { background: var(--a-green-light, #e6ebf4); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.jdp-dow { font-size: .72rem; font-weight: 800; color: var(--a-muted, #58657f); padding: 4px 0; }
.jdp-day { height: 32px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: .84rem; cursor: pointer; }
.jdp-day:hover { background: var(--a-green-light, #e6ebf4); }
.jdp-day.is-today { box-shadow: inset 0 0 0 1px var(--a-gold, #c99a1e); }
.jdp-day.is-sel { background: var(--a-green, #1b3a6b); color: #fff; font-weight: 800; }
.jdp-time { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--a-line, #d3dae7); direction: ltr; }
.jdp-time label { order: 9; margin-left: 6px; font-size: .78rem; color: var(--a-muted, #58657f); direction: rtl; }
.jdp-time select { padding: 3px 6px; border: 1px solid var(--a-line, #d3dae7); border-radius: 6px; background: var(--a-surface, #fff); color: inherit; }
.jdp-foot { display: flex; gap: 6px; margin-top: 8px; }
.jdp-foot button { flex: 1; padding: 5px 0; border: 1px solid var(--a-line, #d3dae7); border-radius: 8px; background: transparent; color: inherit; font-size: .78rem; cursor: pointer; }
.jdp-foot button[data-act="done"] { background: var(--a-green, #1b3a6b); border-color: var(--a-green, #1b3a6b); color: #fff; }

/* Attachment cards: cover (or file-type placeholder) beside the text; editor chips on their own row. */
main .doc-card { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
main .doc-card .cover { flex: 0 0 96px; width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
main .doc-card .cover-blank { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted, #6b7a85); }
main .doc-card .cover-blank svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
main .doc-card .cover-blank span { font-size: .72rem; font-weight: 800; letter-spacing: .04em; direction: ltr; }
main .doc-card-body { flex: 1 1 auto; min-width: 0; }
main .doc-card-body h3 { font-size: .98rem; margin: 0 0 .3rem; line-height: 1.7; overflow-wrap: anywhere; }
main .doc-card-meta { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .5rem; direction: ltr; text-align: right; }
main .doc-card-edit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--page-border, var(--line)); }
main .doc-card-edit .inline-media-chip { margin: 0; white-space: nowrap; }
