/* birds.css: پرنده‌داری index (/birds/) and bird pages (/birds/<slug>), built from boards BirdsIndex, BirdCanary and
   BirdGoldfinch (theme/canvas/birdskb). Tokens come from pb-base.css. Everything is scoped under .bk so the forum's own
   .card, .btn and .chip rules elsewhere stay untouched. Phone layout below 760px. */
/* The site header (.bar, pb-base.css) is sticky and 57px tall, so sticky parts here start at 64px. */
.bk { --gold-bg: #fbf1cf; --gold-ink: #6e5214; --gold-line: #f1e2a8; --warn-bg: #fdf3e2; --warn-ink: #6b4a12; --warn-icon: #b45309;
	max-width: var(--page-max, 1240px); margin: 0 auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 16px; color: var(--ink); text-align: start; }
.bk * { box-sizing: border-box; }
.bk h1, .bk h2, .bk h3 { font-family: var(--head-font); color: var(--ink); margin: 0; }
.bk .fa { line-height: 1; }
.bk a:focus-visible, .bk button:focus-visible, .bk input:focus-visible, .bk [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk .h1 { font-size: 28px; line-height: 1.5; }
.bk .h2 { font-size: 18px; line-height: 1.6; }
.bk .sub { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.bk .hint { font-size: 12px; color: var(--muted); line-height: 1.8; }
.bk .row { display: flex; align-items: center; gap: 10px; }
.bk .wrapr { flex-wrap: wrap; }
.bk .grow { flex-grow: 1; min-width: 0; }
.bk .list { margin: 0; padding: 0; list-style: none; }
.bk .list > li { border-top: 1px solid var(--line); }
.bk .list > li:first-child { border-top: 0; }
.bk .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.bk .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--radius); font: 600 14px var(--body-font);
	border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.bk .btn.primary { background: var(--link); border-color: var(--link); color: #fff; }
.bk .btn.sm { min-height: 44px; padding: 0 12px; font-size: 13px; }
.bk .btn:active { transform: scale(0.97); }
.bk .chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--link);
	font-size: 12px; font-weight: 600; white-space: nowrap; border: 0; font-family: var(--body-font); }
.bk .chip.out { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.bk .chip.ink { background: var(--ink); color: var(--surface); }
.bk a.chip, .bk button.chip { min-height: 36px; cursor: pointer; }
.bk .note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.9; }
.bk .note > .fa { flex-shrink: 0; margin-top: 6px; color: var(--link); }
.bk .note.soft { background: var(--chip); }
.bk .note.plain { background: var(--bg); }
.bk .note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.bk .note.warn > .fa { color: var(--warn-icon); }
.bk .lat { font-size: 12px; color: var(--muted); direction: ltr; text-align: right; font-style: italic; }
.bk .kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.bk .kv dt { color: var(--muted); }
.bk .kv dd { margin: 0; }
.bk .seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.bk .seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; color: var(--muted); font: 600 13px var(--body-font);
	white-space: nowrap; border: 0; background: transparent; cursor: pointer; }
.bk .seg button[aria-pressed="true"] { background: var(--link); color: #fff; }
.bk .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.bk .tabs button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--muted); font: 600 14px var(--body-font); border: 0; background: none;
	border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.bk .tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--link); }
.bk .bi { flex-shrink: 0; border-radius: 50%; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.bk .bi img { width: 84%; height: 84%; object-fit: contain; }
.bk .bi.none { background: var(--surface); border: 1.5px dashed var(--line); }
.bk .bi.ico { color: var(--link); font-size: 16px; }
.bk .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bk .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bk .box { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; line-height: 1.9; }
.bk .box p { margin: 4px 0 0; }
.bk .ul { margin: 0; padding-inline-start: 18px; font-size: 14px; line-height: 2; }
.bk .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- index ---------- */
.bk .bx-head { display: flex; flex-direction: column; gap: 8px; }
.bk .bx-head .sub { max-width: 64ch; }
.bk .bx-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk .input { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	flex: 1 1 240px; color: var(--muted); }
.bk .input input { border: 0; outline: 0; background: transparent; font: 15px var(--body-font); color: var(--ink); width: 100%; min-height: 44px; }
.bk .input:focus-within { outline: 2px solid var(--focus); }
.bk .bx-cols { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.bk .bx-filters { padding: 16px; position: sticky; top: 64px; }
.bk .bx-filters-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bk .bx-filters-h b { flex-grow: 1; }
.bk .bx-close, .bk .bx-open, .bk .bx-see { display: none; }
.bk .fset { border: 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk .fset:first-of-type { border-top: 0; padding-top: 0; }
.bk .fset legend { font-size: 13px; font-weight: 700; padding: 0 0 6px; }
.bk .check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 14px; cursor: pointer; }
.bk .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--link); flex-shrink: 0; }
.bk .check .hint { margin-inline-start: auto; }
.bk .bx-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bk .bx-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bk .bx-clear { background: none; border: 0; color: var(--muted); font: 12px var(--body-font); text-decoration: underline; cursor: pointer; min-height: 36px; }
.bk .shelf { display: flex; flex-direction: column; gap: 10px; }
.bk .shelf[hidden], .bk .bcard[hidden] { display: none; }
.bk .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bk .bcard { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.bk .bcard .nm { font-size: 16px; font-weight: 700; color: var(--ink); }
.bk .bcard .meta { display: flex; gap: 4px 12px; flex-wrap: wrap; }
.bk .bcard .go { font-size: 13px; font-weight: 700; margin-top: auto; min-height: 32px; display: inline-flex; align-items: center; }
.bk .state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 16px; }
.bk .state[hidden] { display: none; }
.bk .state .fa { font-size: 28px; color: var(--muted); }

/* ---------- bird page ---------- */
.bk .hero { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; }
.bk .hero-text { display: flex; flex-direction: column; gap: 10px; justify-content: center; min-width: 0; }
.bk .hero-img { margin: 0; }
.bk .hero-img img { width: 100%; height: 300px; object-fit: cover; display: block; border-radius: var(--radius); }
.bk .prov { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.bk .secnav { position: sticky; top: 64px; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; display: flex; gap: 2px;
	overflow-x: auto; scrollbar-width: none; }
.bk .secnav::-webkit-scrollbar { display: none; }
.bk .secnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bk .secnav a[aria-current] { background: var(--chip); color: var(--link); }
.bk .secnav .grp { padding: 0 8px; align-self: center; white-space: nowrap; font-size: 12px; color: var(--muted); }
.bk .secnav .grp + a { margin-inline-start: 0; }
.bk .secnav .grp.sep { border-inline-start: 1px solid var(--line); }
.bk .page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.bk .main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bk .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 64px; }
.bk .ksec { padding: 20px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 128px; }
.bk .ksec p { margin: 0; font-size: 15px; line-height: 2.05; }
.bk .ksec.gold { background: var(--gold-bg); border-color: var(--gold-line); }
.bk .ksec.gold, .bk .ksec.gold .h2 { color: var(--gold-ink); }
.bk .ksec.origin { background: var(--chip); border-color: transparent; }
.bk .kh { display: flex; align-items: center; gap: 10px; }
.bk .kh .ki, .bk .kx-cat .ki { width: 36px; height: 36px; border-radius: 10px; background: var(--chip); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bk .part { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.bk .facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bk .facts div { padding: 12px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.bk .facts span { font-size: 12px; color: var(--muted); }
.bk .facts b { font-size: 15px; }
.bk .task { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; }
.bk .task b { font-size: 14px; }
.bk .tl li { padding: 10px 12px; border-radius: var(--radius); background: var(--bg); border: 0; }
.bk .linkrow { display: flex; align-items: center; gap: 10px; min-height: 52px; color: var(--ink); font-size: 14px; font-weight: 600; }
.bk .linkrow .fa-angle-left { color: var(--muted); }
.bk .gl { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); min-height: 44px; }
.bk .tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.bk .tbl th, .bk .tbl td { padding: 10px 8px; border-top: 1px solid var(--line); text-align: right; vertical-align: top; line-height: 1.8; }
.bk .tbl thead th { border-top: 0; font-size: 13px; }
.bk .tbl tbody th { font-weight: 600; color: var(--muted); font-size: 13px; }
.bk .community { padding: 16px; background: var(--bar-solid); color: #fff; border-color: transparent; display: flex; flex-direction: column; gap: 8px; }
.bk .community span { font-size: 13px; opacity: .9; }
.bk .community b { font-size: 20px; }
.bk .community .btn { color: var(--ink); justify-content: center; }
.bk .sidecard { padding: 16px; }
.bk .sidecard .h2 { font-size: 16px; }
.bk .sidecard .list a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink); min-height: 44px; }
.bk .sidecard .list a span { font-size: 14px; font-weight: 600; line-height: 1.8; }

/* ---- رسانه‌ی اعضا (media.php, boards MediaCatalog, MediaItem, MediaUpload) and the bird-page media section ---- */
.bk .md-crumbs a { color: var(--muted); }
.bk .md-top .btn { flex-shrink: 0; }
.bk .md-types { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bk .md-types a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; color: var(--muted); font-weight: 600; font-size: 14px;
	border-bottom: 2px solid transparent; white-space: nowrap; }
.bk .md-types a span { font-size: 12px; font-weight: 400; }
.bk .md-types a[aria-current] { color: var(--ink); border-color: var(--link); }
.bk .md-bar { justify-content: space-between; }
.bk .md-birdform { gap: 8px; }
.bk .md-select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 14px var(--body-font); max-width: 100%; }
.bk .md-sort { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.bk .md-sort a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bk .md-sort a[aria-current] { background: var(--link); color: #fff; }
.bk .md-mine { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.bk .md-mine p { margin: 0; font-size: 14px; }
.bk .md-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.bk .md-grid.sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bk .md-tile a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--chip); }
.bk .md-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk .md-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center;
	color: var(--link); font-size: 13px; line-height: 1.7; }
.bk .md-ph .fa { font-size: 26px; }
.bk .md-ph span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bk .md-grid.just { display: flex; flex-wrap: wrap; }
.bk .md-grid.just .md-tile { height: 180px; min-width: 0; }
.bk .md-grid.just .md-tile a { aspect-ratio: auto; height: 100%; }
.bk .md-grid.just .md-fill { flex-grow: 999; height: 0; }
.bk .md-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.bk .md-edit { border-top: 1px solid var(--line); padding-top: 8px; }
.bk .md-edit summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.bk .md-edit .md-up { padding: 8px 0 0; border: 0; gap: 12px; }
.bk .md-birdform { flex-wrap: wrap; }
.bk .md-flag { position: absolute; inset-inline-start: 6px; top: 6px; background: var(--ink); color: var(--surface); }
.bk .md-more { display: flex; justify-content: center; margin: 0; }
.bk .md-audio { padding: 0 14px; }
.bk .md-audio .linkrow b { font-weight: 600; }
.bk .md-item { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.bk .md-stage { background: #14181a; border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.bk .md-frame { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.bk .md-frame img, .bk .md-frame video { max-width: 100%; max-height: 72vh; display: block; border-radius: 6px; }
.bk .md-frame .pb-player, .bk .md-frame audio { width: 100%; }
.bk .md-nav { justify-content: space-between; }
.bk .md-nav .hint { color: #c9d1cc; text-align: center; }
.bk .md-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bk .md-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bk .md-panel p { margin: 0; }
.bk .md-avg { font-size: 14px; font-weight: 600; }
.bk .md-avg .fa { color: #d69e2e; margin-inline-end: 6px; }
.bk .md-rate fieldset { border: 0; margin: 0; padding: 0; }
.bk .md-rate legend { font-size: 14px; font-weight: 700; padding: 0 0 8px; }
.bk .md-stars { display: flex; gap: 6px; }
.bk .md-stars button { min-width: 44px; min-height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
	font: 700 16px var(--body-font); cursor: pointer; }
.bk .md-stars button[aria-pressed="true"] { background: var(--link); border-color: var(--link); color: #fff; }
.bk .md-who { font-size: 14px; flex-wrap: wrap; }
.bk .md-who > .fa { font-size: 28px; color: var(--muted); }
.bk .md-who a.hint { min-height: 44px; display: inline-flex; align-items: center; }
.bk .md-caption { font-size: 15px; line-height: 2; }
.bk .md-small { margin: 0; }
.bk .md-comments { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bk .md-comments .list > li { padding: 10px 0; }
.bk .md-comments .hint { margin: 0; }
.bk .md-msg { font-size: 14px; line-height: 2; overflow-wrap: anywhere; }
.bk .md-msg img { max-width: 100%; height: auto; }
.bk .md-reply { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bk .md-reply textarea, .bk .md-up textarea { width: 100%; min-height: 88px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: 15px/1.9 var(--body-font);
	color: var(--ink); background: var(--surface); resize: vertical; }
.bk .md-up { padding: 20px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.bk .md-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.bk .md-drop label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 15px; }
.bk .md-drop label .fa { font-size: 30px; color: var(--link); }
.bk .md-drop input[type=file] { max-width: 100%; min-height: 44px; font: 14px var(--body-font); }
.bk .md-drop p { margin: 0; }
.bk .md-file-msg { font-size: 14px; font-weight: 600; color: var(--link); overflow-wrap: anywhere; }
.bk .md-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.bk .md-field legend { font-size: 14px; font-weight: 700; padding: 0 0 6px; }
.bk .md-field p { margin: 0; }
.bk .md-chip { position: relative; display: inline-flex; cursor: pointer; }
.bk .md-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk .md-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.bk .md-chip input:checked + span { background: var(--link); border-color: var(--link); color: #fff; }
.bk .md-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk .md-up .btn.primary { align-self: flex-start; }
.bk .md-up .btn[disabled] { opacity: .6; cursor: progress; }
.bk .md-where { margin: 0; }
.bk .md-section .md-counts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (hover: none) { .bk .md-keys { display: none; } }

/* ---- دانشنامه (kb.php, boards KbHome, KbCategory, KbArticle, Search) ---- */
.bk .kx-hero { display: flex; flex-direction: column; gap: 10px; }
.bk .kx-search { display: flex; gap: 8px; align-items: stretch; max-width: 760px; }
.bk .kx-search .input { flex: 1 1 auto; }
.bk .kx-search.big .input { min-height: 54px; }
.bk .kx-pop { gap: 6px; }
.bk .kx-h { margin: 6px 0 10px; }
.bk .kx-birds { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bk .kx-bird { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; padding: 8px 4px; border-radius: var(--radius); color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; }
.bk .kx-bird:hover { background: var(--chip); }
.bk .kx-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bk .kx-cat { display: flex; gap: 12px; align-items: flex-start; padding: 14px; color: var(--ink); min-height: 44px; }
.bk .kx-cat b { display: block; font-size: 15px; }
.bk .kx-cat .hint { display: block; }
.bk .kx-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); min-height: 56px; }
.bk .kx-row b { display: block; font-size: 15px; line-height: 1.8; }
.bk .kx-row .fa-angle-left { color: var(--muted); }
.bk .kx-filter { gap: 6px; }
.bk .kx-art-head { display: flex; flex-direction: column; gap: 8px; }
.bk .kx-meta { gap: 8px; font-size: 13px; }
.bk .kx-toc ol, .bk .kx-toc-m ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 2px; }
.bk .kx-toc a, .bk .kx-toc-m a { display: inline-flex; min-height: 36px; align-items: center; font-size: 14px; }
.bk .kx-toc-m { display: none; padding: 4px 14px; }
.bk .kx-toc-m summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.bk .kx-refs { gap: 6px; margin: 4px 0 0; }
.bk .kx-next { display: flex; flex-direction: column; gap: 4px; padding: 14px; color: var(--ink); min-height: 44px; }
.bk .kx-term { color: inherit; text-decoration: underline dotted; text-underline-offset: 4px; cursor: help; }
.bk .kx-gloss { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bk .kx-entry { padding: 10px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.bk .kx-entry:first-child { border-top: 0; }
.bk .kx-entry:target { background: var(--gold-bg); border-radius: var(--radius); padding-inline: 10px; }
.bk .kx-entry dt { font-weight: 700; font-size: 16px; }
.bk .kx-entry dd { margin: 4px 0 0; }
.bk .kx-entry p { margin: 0 0 4px; font-size: 15px; line-height: 2; }
.bk .kx-terms a { display: flex; flex-direction: column; padding: 8px 0; color: var(--ink); min-height: 44px; }
/* the word and its definition start at the right edge, like the rest of the side card (.sidecard .list a centres its row) */
.bk .sidecard .list.kx-terms a { align-items: flex-start; }
.bk .kx-check form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bk .kx-check .fset { border-top: 0; padding: 0; }
.bk .kx-src { padding: 0 16px; }
.bk .kx-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; color: var(--muted); font: 600 14px var(--body-font);
	border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; }
.bk .kx-tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--link); }
.bk .kx-threads .chip { flex-shrink: 0; }
.bk [data-sec][hidden], .bk .kx-threads li[hidden] { display: none; }

/* ---- پرندگان ایران (iran-birds.php, boards IranIndex, IranSpecies, IranPlace, SightingsMap, AddSighting) ---- */
.bk .ib-svg { width: 100%; height: auto; display: block; }
.bk .ib-p { fill: #e8efe9; stroke: #9db8a6; stroke-width: .8; }
.bk .ib-p.has { fill: #b9d8c4; }
.bk .ib-p.seen { fill: #d9ead2; }
.bk .ib-p.has.seen { fill: #9ccbac; }
.bk .ib-p[role=button] { cursor: pointer; }
.bk .ib-p[role=button]:hover, .bk .ib-p.on { fill: #f5d77f; }
.bk .ib-p:focus-visible, .bk .ib-c:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2.5; }
.bk .ib-c { stroke: #fff; stroke-width: .6; }
.bk .ib-c.ok { fill: #1f6f52; }
.bk .ib-c.mem { fill: #d9822b; }
.bk .ib-c[role=button] { cursor: pointer; }
.bk .ib-c.on { stroke: var(--ink); stroke-width: 2; }
.bk .ib-dot { fill: #c2410c; stroke: #fff; stroke-width: 2; }
.bk .ib-pick svg { cursor: crosshair; max-width: 640px; }
.bk .ib-legend { gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.bk .ib-k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-inline-end: -8px; }
.bk .ib-k.has { background: #b9d8c4; } .bk .ib-k.seen { background: #d9ead2; border: 1px solid #9db8a6; }
.bk .ib-k.ok { background: #1f6f52; } .bk .ib-k.mem { background: #d9822b; }
.bk .ib-k.breed { background: #1f6f52; } .bk .ib-k.winter { background: #3b82c4; } .bk .ib-k.pass { background: #d9a52b; } .bk .ib-k.res { background: #7fb59a; }
.bk .ib-months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.bk .ib-months li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 6px; background: var(--bg); font-size: 11px; color: var(--muted); }
.bk .ib-months li.breed { background: #1f6f52; color: #fff; } .bk .ib-months li.winter { background: #3b82c4; color: #fff; }
.bk .ib-months li.pass { background: #d9a52b; color: #fff; } .bk .ib-months li.res { background: #7fb59a; color: var(--ink); } .bk .ib-months li.seen { background: #b9d8c4; color: var(--ink); }
.bk .ib-scale { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.bk .ib-scale li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; background: var(--bg); font-size: 11px; text-align: center; opacity: .55; }
.bk .ib-scale li.on { opacity: 1; outline: 2px solid var(--ink); }
.bk .ib-scale b { font-size: 14px; }
.bk .ib-iucn.ib-lc, .bk .ib-scale .ib-lc { background: #dcefe3; color: #1f5f45; }
.bk .ib-iucn.ib-nt, .bk .ib-scale .ib-nt { background: #eef2c7; color: #5b5f12; }
.bk .ib-iucn.ib-vu, .bk .ib-scale .ib-vu { background: #fbe7b5; color: #6e5214; }
.bk .ib-iucn.ib-en, .bk .ib-scale .ib-en { background: #f8d2b8; color: #8a3a12; }
.bk .ib-iucn.ib-cr, .bk .ib-scale .ib-cr { background: #f3c0c0; color: #8b1c1c; }
.bk .ib-iucn.ib-ex, .bk .ib-scale .ib-ex { background: #3a3a3a; color: #fff; }
.bk .ib-short { gap: 6px; }
.bk .ib-short label.chip { min-height: 36px; cursor: pointer; }
.bk .ib-feature { display: flex; flex-direction: column; gap: 6px; padding: 16px; color: var(--ink); background: var(--gold-bg); border-color: var(--gold-line); align-items: flex-start; }
.bk .ib-srow { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; font-size: 14px; }
.bk .ib-thumb, .bk .ib-thumb img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; flex-shrink: 0; }
.bk .ib-figs figure { margin: 0; } .bk .ib-figs img { width: 100%; border-radius: var(--radius); display: block; }
.bk.ib .hero { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 960px) {
	.bk .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bk .page { grid-template-columns: minmax(0, 1fr); }
	.bk .side { position: static; }
	.bk .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bk .md-item { grid-template-columns: minmax(0, 1fr); }
	.bk .kx-cats { grid-template-columns: 1fr 1fr; }
	.bk .kx-toc { display: none; }
	.bk .kx-toc-m { display: block; }
}
@media (max-width: 760px) {
	.bk { padding: 12px 12px 8px; gap: 12px; }
	.bk .h1 { font-size: 22px; }
	.bk .bx-cols { grid-template-columns: minmax(0, 1fr); }
	.bk .bx-sort { display: none; }
	.bk .bx-open { display: inline-flex; }
	/* filters become a bottom sheet */
	.bk .bx-filters { display: none; position: fixed; inset: auto 0 0 0; top: auto; z-index: 50; max-height: 80vh; overflow-y: auto; border-radius: 16px 16px 0 0;
		box-shadow: 0 -8px 24px rgba(31, 42, 36, .12); padding: 8px 16px 16px; }
	.bk .bx-filters.open { display: block; }
	.bk .bx-filters::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
	.bk .bx-close { display: inline-flex; }
	.bk .bx-see { display: flex; width: 100%; justify-content: center; margin-top: 8px; }
	.bk .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
	.bk .bcard { padding: 12px; }
	.bk .hero { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
	.bk .hero-img { order: -1; }
	.bk .hero-img img { height: 200px; }
	.bk .ksec { padding: 16px 14px; }
	.bk .grid2, .bk .grid3 { grid-template-columns: minmax(0, 1fr); }
	.bk .grid4 { grid-template-columns: 1fr 1fr; }
	.bk .facts { grid-template-columns: 1fr 1fr; }
	.bk .md-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	.bk .md-grid.just .md-tile { height: 120px; }
	.bk .md-grid.sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bk .md-frame { min-height: 200px; }
	.bk .md-stage { padding: 8px; }
	.bk .md-up { padding: 14px; }
	.bk .md-bar { flex-direction: column; align-items: stretch; }
	.bk .md-sort { align-self: flex-start; }
	.bk .kx-cats { grid-template-columns: minmax(0, 1fr); }
	.bk .kx-search { flex-direction: column; }
	.bk .ib-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.bk .ib-scale li span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bk .btn:active { transform: none; }
	html:has(.bk) { scroll-behavior: auto; }
}
@media print {
	.bk .secnav, .bk .side, .bk .bx-filters { display: none !important; }
}

/* «این چه پرنده‌ای است؟» /birds/id (idkey.js) */
.bk .idk-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.bk .idk, .bk .idk-res { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bk .idk h2:focus { outline: none; }
.bk .idk h2:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.bk .idk-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.bk .idk-opts .btn[aria-pressed="true"] { background: var(--link); border-color: var(--link); color: #fff; }
.bk .idk .btn[disabled] { opacity: .5; cursor: not-allowed; }
.bk .idk-res .list li { list-style: none; }
@media (max-width: 760px) {
	.bk .idk-cols { grid-template-columns: 1fr; }
	.bk .idk-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	.bk .idk-opts .btn { justify-content: flex-start; white-space: normal; text-align: start; padding-block: 8px; }
}

/* kb answer «پرسش»: the question's own audio and video, in the forum player */
.bk .kx-players { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }

/* bird page «پرسش‌های پرتکرار از انجمن»: each question opens to the thread's reviewed summary */
.bk .kfaqs { display: flex; flex-direction: column; }
.bk .kfaq, .bk .kfaq-link { border-top: 1px solid var(--line); }
.bk .kfaqs > :first-child { border-top: 0; }
.bk .kfaq summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; cursor: pointer; font-weight: 700; font-size: 15px; line-height: 1.8; }
.bk .kfaq summary::-webkit-details-marker { display: none; }
.bk .kfaq summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk .kfaq-q { flex-grow: 1; min-width: 0; }
.bk .kfaq summary .fa { color: var(--muted); transition: transform .2s ease; }
.bk .kfaq[open] summary .fa { transform: rotate(180deg); color: var(--link); }
.bk .kfaq-a { padding: 0 0 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 2; }
.bk .kfaq-short { margin: 0; padding: 12px 14px; background: var(--chip); border-radius: var(--radius); font-size: 15px; }
.bk .kfaq-a .note { margin: 0; }
.bk .kfaq-more { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--link); font-weight: 600; text-decoration: none; }
.bk .kfaq-more:hover .grow { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .bk .kfaq summary .fa { transition: none; } }

/* species guide: questions, sub-headings, photo gallery */
.bk .ib-faq { border-top: 1px solid var(--line); }
.bk .ib-faq:first-of-type { border-top: 0; }
.bk .ib-faq summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; padding: 6px 0; }
.bk .ib-faq summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.bk .ib-faq p { margin: 0 0 12px; }
.bk .ksec .h3 { font-size: 15px; margin: 12px 0 4px; }
.bk .ib-figs figcaption { font-size: 12px; margin-top: 4px; }
.bk .ib-range { margin: 12px 0 0; } .bk .ib-range img { width: 100%; max-width: 640px; height: auto; display: block; border-radius: var(--radius); background: #fff; }

/* سایت‌های پرنده /kb/sites (sites.php) */
.bk .ks-filter a.chip { min-height: 44px; padding: 0 14px; }
.bk .ks-group { padding: 0; gap: 8px; scroll-margin-top: 80px; }
.bk .ks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk .ks-site { display: flex; flex-direction: column; gap: 8px; padding: 16px; scroll-margin-top: 80px; }
.bk .ks-site:target { background: var(--gold-bg); border-color: var(--gold-line); }
.bk .ks-name { margin: 0; font-size: 16px; line-height: 1.7; }
.bk .ks-name .hint { display: inline-block; font-weight: 400; }
.bk .ks-tags { gap: 6px; }
.bk p.ks-desc { margin: 0; font-size: 14px; line-height: 2; flex-grow: 1; }
.bk .ks-site p.hint { margin: 0; font-size: 12px; line-height: 1.8; }
.bk .ks-foot { justify-content: space-between; gap: 8px; }
.bk .ks-foot .btn { max-width: 100%; }
.bk .ks-foot .btn span[dir] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
	.bk .ks-list { grid-template-columns: minmax(0, 1fr); }
}

/* پرندگان ایران › چهره‌ها (iran-birds-people.php): person cards, initial-letter faces, timeline */
.bk .pp-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bk .pp-card { align-items: flex-start; color: var(--ink); text-decoration: none; min-height: 44px; }
.bk .pp-card:hover .nm { color: var(--link); }
.bk .pp-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk .bi.pp-face img { width: 100%; height: 100%; object-fit: cover; }
.bk .pp-ini { font-family: var(--head-font); font-size: 28px; font-weight: 700; color: var(--link); }
.bk .hero > .pp-ini { font-size: 52px; align-self: center; }
.bk .pp-photo img { height: 340px; object-position: top; }
.bk .pp-works li { margin-bottom: 6px; }
.bk .pp-tl { list-style: none; margin: 0; padding: 0 14px 0 0; border-right: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.bk .pp-tl li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.bk .pp-tl li::before { content: ""; position: absolute; right: -21px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--link); border: 2px solid var(--surface); }
.bk .pp-tl b { font-size: 14px; color: var(--link); }
@media (max-width: 760px) {
	.bk .pp-cards { grid-template-columns: minmax(0, 1fr); }
	.bk .pp-photo img { height: 260px; }
	.bk .hero > .pp-ini { order: -1; width: 88px !important; height: 88px !important; font-size: 38px; }
}

/* کتاب‌های پرنده /kb/books (books.php) */
.bk .kbk-filter a.chip { min-height: 44px; padding: 0 14px; }
.bk .kbk-group { padding: 0; gap: 8px; scroll-margin-top: 80px; }
.bk .kbk-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk .kbk-book { display: flex; flex-direction: column; gap: 6px; padding: 16px; scroll-margin-top: 80px; }
.bk .kbk-book:target { background: var(--gold-bg); border-color: var(--gold-line); }
.bk .kbk-name { margin: 0; font-size: 16px; line-height: 1.7; }
.bk .kbk-name .hint { display: block; font-weight: 400; }
.bk .kbk-book p { margin: 0; }
.bk p.kbk-by { font-size: 14px; }
.bk .kbk-book p.hint { font-size: 12px; line-height: 1.8; }
.bk .kbk-book p.hint a { display: inline-block; min-height: 32px; line-height: 32px; }
.bk .kbk-tags { gap: 6px; margin: 4px 0; }
.bk p.kbk-desc { font-size: 14px; line-height: 2; flex-grow: 1; }
.bk .kbk-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bk .kbk-foot { gap: 8px; margin-top: 4px; }
.bk .kbk-foot .btn { color: var(--ink); max-width: 100%; min-height: 44px; }
.bk .kbk-foot .btn span[dir] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
	.bk .kbk-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---- collection pages: header band, filter bar, section heads (books, sites, glossary, پرنده‌نگری, پرندگان ایران) ----
   One band per page (kb/page-head.php): the light green of the site's chips, a heavier title, real counts in the link
   green, and the site's own flat bird icons as the motif. Gold is the one accent: the middle icon disc. */
.bk .pgh { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: center; padding: 32px 36px; border-radius: 18px; background: var(--chip); }
.bk .pgh-t { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bk .pgh-h { font-size: 34px; line-height: 1.45; font-weight: 800; }
.bk .pgh-sub { margin: 0; font-size: 15px; line-height: 2.05; max-width: 76ch; }
.bk .pgh-stats { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.bk .pgh-stats div { display: flex; flex-direction: column-reverse; }
.bk .pgh-stats dd { margin: 0; font: 800 28px/1.25 var(--head-font); color: var(--link); }
.bk .pgh-stats dt { font-size: 12px; color: var(--muted); }
.bk .pgh-acts, .bk .pgh-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bk .pgh-acts a.btn:not(.primary) { background: var(--surface); color: var(--ink); border-color: var(--line); }
.bk .pgh-acts a.btn:not(.primary):hover { border-color: var(--link); color: var(--link); }
.bk .pgh-acts a.chip, .bk .pgh-jump a.chip { min-height: 40px; padding: 0 14px; background: var(--surface); gap: 6px; }
.bk .pgh-acts a.chip:hover, .bk .pgh-jump a.chip:hover { border-color: var(--link); color: var(--link); }
.bk .pgh-art { position: relative; height: 210px; }
.bk .pgh-b { position: absolute; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.bk .pgh-b img { width: 74%; height: 74%; object-fit: contain; }
.bk .pgh-b1 { width: 150px; height: 150px; inset-inline-start: 0; top: 18px; }
.bk .pgh-b2 { width: 100px; height: 100px; inset-inline-end: 6px; top: 0; background: var(--gold-bg); }
.bk .pgh-b3 { width: 78px; height: 78px; inset-inline-end: 34px; bottom: 0; }

/* filters as one panel: label column, chips beside it */
.bk .fbar { padding: 6px 18px; display: flex; flex-direction: column; }
.bk .fbar-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bk .fbar-row .row { gap: 6px; }
.bk .fbar-l { flex: 0 0 104px; font-size: 13px; font-weight: 700; color: var(--muted); }
.bk .fbar a.chip { min-height: 40px; padding: 0 14px; }
.bk .fbar-n { margin: 0; padding: 10px 0 6px; }

/* a group's head: icon tile, title with its count, one-line note */
.bk .sech { display: flex; align-items: flex-start; gap: 12px; }
.bk .sech .ki { width: 40px; height: 40px; border-radius: 12px; background: var(--link); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.bk .sech .h2 { font-size: 20px; }
.bk .sech p { margin: 2px 0 0; }
.bk .sech-n { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; margin-inline-start: 4px; border-radius: 999px; background: var(--chip); color: var(--link); font-size: 12px; font-weight: 700; vertical-align: middle; }
.bk .kbk-group, .bk .ks-group, .bk .bd-topic { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; scroll-margin-top: 80px; }

/* books: a topic-coloured «cover» beside the title; description, then tags, then the links under a rule */
.bk .kbk-book { gap: 10px; padding: 18px; }
.bk .kbk-top { display: flex; gap: 14px; align-items: flex-start; }
.bk .kbk-cov { flex: 0 0 52px; height: 68px; border-radius: 4px 10px 10px 4px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--chip); color: var(--link); border-inline-start: 5px solid rgba(0, 0, 0, .12); }
.bk .kbk-keep .kbk-cov { background: var(--gold-bg); color: var(--gold-ink); }
.bk .kbk-world .kbk-cov { background: #e6edf3; color: #2a4a63; }
.bk .kbk-kids .kbk-cov { background: #f6e4dc; color: #7a3b22; }
.bk .kbk-name { font-size: 17px; }
.bk .kbk-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }

/* sites: the site's first letter as its mark */
.bk .ks-site { gap: 10px; padding: 18px; }
.bk .ks-top { display: flex; gap: 12px; align-items: center; }
.bk .ks-ini { flex: 0 0 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font: 800 22px var(--head-font); background: #e6edf3; color: #2a4a63; text-transform: uppercase; }
.bk .ks-iran .ks-ini { background: var(--chip); color: var(--link); }
.bk .ks-name .hint { display: block; }
.bk .ks-foot { border-top: 1px solid var(--line); padding-top: 10px; }

/* glossary: two columns of entries inside each group */
.bk .kx-gsec { padding: 22px 24px; }
.bk .kx-gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.bk .kx-gloss .kx-entry { padding: 14px 0; }
.bk .kx-gloss .kx-entry:nth-child(-n+2) { border-top: 0; }
.bk .kx-gloss dt { font-size: 16px; font-weight: 800; color: var(--ink); }
.bk .kx-gloss dd { margin: 4px 0 0; }
.bk .kx-gloss dd p { margin: 0; font-size: 14px; line-height: 2; }
.bk .kx-gloss dd p.hint { font-size: 12px; margin-top: 2px; }
.bk .kx-entry:target { background: var(--gold-bg); border-radius: 8px; padding-inline: 10px; }

/* پرنده‌نگری hub: is / is not, numbered first steps, rule tiles */
.bk .bd-isnot > div { padding: 14px 16px; border-radius: var(--radius); }
.bk .bd-is { background: var(--chip); }
.bk .bd-not { background: var(--warn-bg); }
.bk .bd-isnot .h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.bk .bd-is .h3 .fa { color: var(--link); }
.bk .bd-not .h3 .fa { color: var(--warn-icon); }
.bk .bd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bk .bd-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.bk .bd-step p { margin: 4px 0 0; font-size: 14px; line-height: 1.9; }
.bk .bd-num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--link); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.bk .bd-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk .bd-rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.bk .bd-rule:hover { border-color: var(--link); }
.bk .bd-rule .ki { width: 36px; height: 36px; border-radius: 10px; background: var(--chip); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bk .bd-rule b { display: block; font-size: 15px; }
.bk .bd-rule .hint { display: block; font-size: 13px; }

/* آداب: the section list stays beside the rules on wide screens */
.bk .bd-ethics { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.bk .bd-toc { position: sticky; top: 72px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.bk .bd-toc b { padding: 4px 8px 8px; font-size: 13px; color: var(--muted); }
.bk .bd-toc a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.bk .bd-toc a .fa { color: var(--link); width: 16px; text-align: center; }
.bk .bd-toc a:hover { background: var(--chip); }
.bk .bd-secs { display: flex; flex-direction: column; gap: 14px; }
.bk .bd-eth .ul { counter-reset: r; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bk .bd-eth .ul li { counter-increment: r; position: relative; padding-inline-start: 40px; line-height: 2; }
.bk .bd-eth .ul li::before { content: counter(r, persian); position: absolute; inset-inline-start: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); color: var(--link); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* مستندها: two film cards a row */
.bk .bd-films { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bk .bd-film-h { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.bk .bd-film .kv { font-size: 13px; gap: 6px 14px; padding: 12px; background: var(--bg); border-radius: var(--radius); }
.bk .bd-film p { margin: 0; line-height: 2; font-size: 14px; }

/* پرندگان ایران: species cards lead with their Commons photo; the featured bird gets a wide photo */
.bk .ib-card { padding: 0 0 14px; overflow: hidden; gap: 6px; }
.bk .ib-card > :not(.ib-ph) { margin-inline: 14px; }
.bk .ib-ph { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--chip); margin-bottom: 6px; flex-shrink: 0; }
.bk .ib-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bk .ib-ph img.ib-ph-none { inset: 28%; width: 44%; height: 44%; object-fit: contain; opacity: .55; }
.bk .ib-card .nm::after { content: ""; position: absolute; inset: 0; }
.bk .ib-card { position: relative; }
.bk .ib-card:hover { border-color: var(--link); }
.bk .ib-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk .ib-card .nm:focus-visible { outline: 0; }
.bk .ib-credit { margin: 4px 0 0; }
.bk .ib-feature { flex-direction: row; gap: 0; padding: 0; overflow: hidden; align-items: stretch; }
.bk .ib-feature-img { width: 42%; max-width: 420px; object-fit: cover; display: block; }
.bk .ib-feature-t { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; align-items: flex-start; justify-content: center; }
.bk .ib-feature-t .h2 { font-size: 24px; }

@media (max-width: 960px) {
	.bk .pgh { grid-template-columns: minmax(0, 1fr) 170px; }
	.bk .pgh-art { transform: scale(.75); transform-origin: center; }
	.bk .bd-ethics { grid-template-columns: minmax(0, 1fr); }
	.bk .bd-toc { position: static; flex-direction: row; flex-wrap: wrap; }
	.bk .bd-toc b { width: 100%; }
}
@media (max-width: 760px) {
	.bk .pgh { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; border-radius: 14px; }
	.bk .pgh-art { display: none; }
	.bk .pgh-h { font-size: 26px; }
	.bk .pgh-stats { gap: 8px 22px; }
	.bk .pgh-stats dd { font-size: 22px; }
	.bk .fbar { padding: 4px 14px; }
	.bk .fbar-row { flex-direction: column; align-items: flex-start; gap: 8px; }
	.bk .fbar-l { flex-basis: auto; }
	.bk .kx-gloss, .bk .bd-steps, .bk .bd-rules, .bk .bd-films { grid-template-columns: minmax(0, 1fr); }
	.bk .kx-gloss .kx-entry:nth-child(2) { border-top: 1px solid var(--line); }
	.bk .kx-gsec { padding: 16px 14px; }
	.bk .ib-feature { flex-direction: column; }
	.bk .ib-feature-img { width: 100%; max-width: none; aspect-ratio: 16 / 9; }
	.bk .ib-feature-t { padding: 16px; }
}
