/* fekr-site: pages of the main site, on top of fekr-ui.css (D16) */
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--fb-ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }
main { min-height: 50vh; }

.crumbs { font-size: .85rem; color: var(--fb-muted); margin-bottom: 8px; }
.crumbs a { color: var(--fb-muted); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.sec-title h2 { font-size: 1.3rem; margin: 0; }
.sec-title a { font-size: .9rem; font-weight: 700; }

/* section and archive heads */
.hub-head { background: var(--fb-surface); border-bottom: 1px solid var(--fb-line); padding-block: 34px 26px; margin-bottom: 8px; }
.hub-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.hub-head p { max-width: 62em; color: var(--fb-text); margin: 0 0 10px; }
.safety { background: var(--fb-brand-soft); border-inline-start: 4px solid var(--fb-brand); padding: 10px 14px; border-radius: 8px; font-size: .92rem; }
.group-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.group-nav a { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 999px; padding: 4px 14px; font-size: .88rem; color: var(--fb-text); }
.group-nav a:hover { border-color: var(--fb-brand); text-decoration: none; }
.group-nav small, .chip small { color: var(--fb-muted); }
.all-link { text-align: center; margin: 30px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip { background: var(--fb-brand-soft); color: var(--fb-brand-dark); border-radius: 999px; padding: 3px 12px; font-size: .85rem; }
.chip.tag { background: var(--fb-paper); border: 1px solid var(--fb-line); color: var(--fb-muted); }
.big-search { display: flex; gap: 8px; max-width: 560px; margin-top: 12px; }
.big-search input { flex: 1; min-width: 0; border: 1px solid var(--fb-line); border-radius: 999px; padding: 10px 18px; font: inherit; }
.count, .empty { color: var(--fb-muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 30px 0 0; }
.pager a { font-weight: 700; }

/* single post or page */
.post-head { background: var(--fb-surface); border-bottom: 1px solid var(--fb-line); padding-block: 30px 20px; }
.post-head h1 { font-size: clamp(1.45rem, 3.4vw, 2.05rem); margin-bottom: 8px; }
.narrow { max-width: 820px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--fb-muted); font-size: .86rem; margin: 0; }
.post-cover { margin: 22px 0 0; }
.post-cover img { width: 100%; border-radius: var(--fb-radius); display: block; }
.prose { margin-top: 22px; font-size: 1.04rem; line-height: 2; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.6em; }
.prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.15rem; }
.prose img { border-radius: 10px; display: block; margin: 16px auto; }
.prose figure { margin: 16px 0; } .prose figcaption { font-size: .85rem; color: var(--fb-muted); text-align: center; }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; background: #000; }
.prose audio { width: 100%; }
.prose blockquote { margin: 18px 0; padding: 10px 16px; border-inline-start: 4px solid var(--fb-lime); background: var(--fb-surface); border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--fb-line); padding: 6px 10px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.related-inline { background: var(--fb-brand-soft); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.source-note { margin-top: 26px; padding: 10px 14px; background: var(--fb-brand-soft); border-radius: 10px; font-size: .88rem; color: var(--fb-brand-dark); }
.fb-cards.sub { margin-top: 26px; }
.related h2 { font-size: 1.25rem; margin: 40px 0 14px; }
.latest-strip { margin-top: 10px; }

@media (max-width: 600px) {
  .hub-head, .post-head { padding-block: 22px 18px; }
  .prose { font-size: 1rem; }
  .big-search { flex-direction: column; }
}

/* 0.1.1: cards keep one image size (the image box was an inline span, so aspect-ratio did not apply) */
.fb-card .fb-card-img { display: block; }
.fb-card .fb-card-img img { object-position: center 25%; }
.prose img { max-height: 520px; width: auto; object-fit: contain; }

/* WordPress page-builder blocks, cleaned at import (content.js builderTag) */
.prose .person-photo { float: left; width: min(240px, 42%); margin: 0 18px 12px 0; }
.prose .person-photo img { width: 100%; max-height: none; border-radius: 12px; margin: 0; }
.prose .facts { background: var(--fb-surface); border: 1px solid var(--fb-line); border-inline-start: 4px solid var(--fb-brand); border-radius: 12px; padding: 10px 16px; margin: 16px 0; font-size: .95rem; }
.prose .facts p { margin: 0; }
.prose h2 { clear: both; border-bottom: 1px solid var(--fb-line); padding-bottom: 6px; }
.prose .note, .prose .notice { background: var(--fb-brand-soft); border-radius: 10px; padding: 10px 14px; margin: 16px 0; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.prose .gallery img { width: 100%; height: 160px; object-fit: cover; margin: 0; }

/* hand-made pattern pages (paroxetine): hero, quick facts, cards */
.prose .hero { background: var(--fb-surface); border: 1px solid var(--fb-line); border-top: 4px solid var(--fb-brand); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.prose .hero h2 { border: 0; margin-top: 4px; }
.prose .badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.prose .badge { background: var(--fb-brand-soft); color: var(--fb-brand-dark); border-radius: 999px; padding: 2px 12px; font-size: .82rem; }
.prose .lead { font-size: 1.08rem; }
.prose .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--fb-muted); font-size: .84rem; }
.prose .quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.prose .q { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.prose .q span { color: var(--fb-muted); font-size: .8rem; }
.prose .fbmed-visual { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 16px; padding: 14px 18px; margin: 16px 0; }
.prose .card { border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.prose .card.info { background: #eef6fa; border-inline-start: 4px solid #19739b; }
.prose .card.warn { background: #fff8e8; border-inline-start: 4px solid #e1a11f; }
.prose .card.danger { background: #fff1f2; border-inline-start: 4px solid #b6323a; }
.prose .mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.prose .mini { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 12px; padding: 12px; }
.prose .mini strong { display: block; color: var(--fb-brand-dark); }
.prose .toc, .prose .refs, .prose .faq, .prose .review { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 14px; padding: 14px 18px; margin: 16px 0; }
.prose .refs, .prose .ref { font-size: .88rem; direction: ltr; text-align: left; }
@media (max-width: 600px) {
  .prose .person-photo { float: none; width: 100%; max-width: 280px; margin: 0 auto 12px; }
  .prose .mini-grid { grid-template-columns: 1fr; }
}
.prose .q, .prose .badge-row, .prose .meta { text-align: right; }

/* 0.1.2: hubs with a side list of categories and one even grid */
.hub-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 22px; }
.hub-side { position: sticky; top: 14px; background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 14px; }
.hub-side h2 { font-size: 1rem; margin: 0 0 8px; }
.hub-side nav { display: grid; gap: 2px; }
.hub-side a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--fb-text); font-size: .92rem; }
.hub-side a:hover { background: var(--fb-brand-soft); text-decoration: none; }
.hub-side a.on { background: var(--fb-brand); color: #fff; }
.hub-side small { color: inherit; opacity: .75; }
.hub-sel { font-size: 1.2rem; margin: 0 0 14px; }
/* every card the same height; image box fixed (wide 16:9, people 3:4), text below */
.fb-card { height: 100%; }
.fb-card .fb-card-img { display: block !important; aspect-ratio: 16 / 9; overflow: hidden; flex: none; }
.fb-card .fb-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-cards.portrait .fb-card-img { aspect-ratio: 3 / 4; }
.fb-cards.portrait .fb-card-img img { object-position: center 20%; }
.fb-cards.portrait { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fb-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* sections and boxes inside articles */
.prose h3 { color: var(--fb-brand-dark); padding-inline-start: 10px; border-inline-start: 4px solid var(--fb-lime); }
.prose blockquote { background: #fff8e8; border-inline-start-color: #e1a11f; }
.prose .note { border-inline-start: 4px solid var(--fb-brand); }
.prose iframe { display: block; margin: 18px 0; }
.video-wait { margin-top: 22px; background: var(--fb-ink); color: #dfe9e3; border-radius: var(--fb-radius); aspect-ratio: 16 / 9; display: grid; place-content: center; text-align: center; gap: 6px; padding: 16px; }
.video-wait strong { color: #fff; font-size: 1.1rem; }
.video-wait a { color: var(--fb-lime); }

@media (max-width: 900px) {
  .hub-layout { grid-template-columns: 1fr; }
  .hub-side { position: static; }
  .hub-side nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .hub-side a { border: 1px solid var(--fb-line); border-radius: 999px; padding: 4px 12px; }
  .fb-cards.portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .fb-cards.portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub-side nav.letters { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.hub-side nav.letters a { justify-content: center; flex-direction: column; align-items: center; padding: 6px 2px; gap: 0; line-height: 1.4; }
.hub-side nav.letters a:first-child { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding: 7px 10px; }

/* 0.1.4: photo galleries as an even grid (content.js groupImages), people hub subtitle */
.prose .gallery { margin: 14px 0 20px; }
.prose .gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--fb-surface); }
.prose .gallery img { display: block; max-height: none; border-radius: 0; object-position: center 25%; transition: transform .2s; }
.prose .gallery a:hover img { transform: scale(1.04); }
@media (max-width: 600px) { .prose .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prose .gallery img { height: 130px; } }
.hub-lead { font-size: 1.08rem; color: var(--fb-brand-dark); margin: -4px 0 10px; }
.prose .video-wait { margin: 12px 0 20px; }

/* 0.1.5: one frame size for article pictures, icons beside their text, pictures beside their details (layout.js) */
.post-cover img { max-height: 380px; object-fit: cover; }
.prose figure.pic { margin: 18px auto; max-width: 560px; }
.prose figure.pic img { width: 100%; height: 340px; max-height: none; object-fit: contain; background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 12px; margin: 0; }
.prose figure.pic.wide { max-width: 100%; }
.prose figure.pic.wide img { height: auto; max-height: 220px; object-fit: contain; background: none; border: 0; }
.prose .media-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: start; margin: 18px 0; }
.prose .media-row .media-text > :first-child { margin-top: 0; }
.prose .media-img { margin: 0; }
.prose .media-img img { width: 100%; height: 300px; max-height: none; object-fit: contain; background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: 12px; margin: 0; }
.prose .icon-row { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; }
.prose .icon-row .icon { flex: none; width: 34px; padding-top: 4px; }
.prose .icon-row .icon img { width: 30px; height: 30px; max-height: none; object-fit: contain; margin: 0; }
.prose .icon-row .icon-text { flex: 1; min-width: 0; }
.prose .icon-row .icon-text > * { margin: 0; }
@media (max-width: 600px) {
  .prose .media-row { grid-template-columns: 1fr; }
  .prose .media-img { order: -1; max-width: 240px; margin: 0 auto; }
  .prose figure.pic img { height: 240px; }
}
.prose img { cursor: zoom-in; }
.prose .icon-row img, .prose a[href]:not([href$=".jpg"]):not([href$=".jpeg"]):not([href$=".png"]):not([href$=".webp"]) img { cursor: pointer; }
/* picture viewer (site.js) */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 18, 14, .92); display: grid; place-items: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lightbox .lb-count { position: absolute; bottom: 16px; color: #dfe9e3; font-size: .9rem; }
body.lb-open { overflow: hidden; }
@media (max-width: 600px) { .lightbox { padding: 60px 8px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 10px; transform: none; } }
