/* Bayanat Labs Open (/open, /ar/open). Builds on assets/article.css; only the
   pieces the release pages add: facts table, badges, rights status, filters,
   link cards and the BibTeX copy button. */

.open-hub-crumbs { max-width: none; margin: 0; padding: 22px 64px 0; }
.open-hub-hero .lang-alt { color: var(--indigo); font-weight: 600; white-space: nowrap; }
.open-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.open-hero .download-row { margin-top: 26px; }
.open-badge { font-family: var(--mono); font-size: 12px; color: var(--indigo-deep); background: #eef0ff; border-radius: 6px; padding: 3px 8px; }
.open-nw { white-space: nowrap; }
.open-muted { color: var(--gray-400); font-weight: 400; }
.open-note { font-size: 14px !important; line-height: 1.6 !important; color: var(--gray-400) !important; }
.open-review-note { max-width: 760px; margin: 0 auto; padding: 8px 64px 32px; font-size: 14px; line-height: 1.6; color: var(--gray-500); }
.open-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px !important; }
.open-tags span { font-size: 12.5px; color: var(--gray-500); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

table.data.open-facts { margin: 6px 0 22px; }
table.data.open-facts th { width: 11em; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--gray-500); border-bottom: 1px solid var(--line); vertical-align: top; padding: 11px 14px; }
table.data.open-facts td:first-child { font-weight: 400; white-space: normal; color: var(--gray-700); }
table.data.open-table td:first-child { white-space: normal; }

.open-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.open-stats div { border-radius: 0 !important; }
.open-hub-stats { max-width: 980px; }

.open-right { display: inline-block; font-size: 12.5px; font-weight: 600; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.open-right-allowed { background: #ecfdf3; color: #067647; }
.open-right-restricted { background: #fff4e5; color: #9a3412; }
.open-right-na { background: #f4f4f5; color: var(--gray-500); }

.open-claim { border-left: 3px solid var(--indigo-soft); background: #f7f7ff; border-radius: 0 12px 12px 0; padding: 16px 20px; }
.open-doi { list-style: none; padding: 0 !important; }
.open-bibtex { position: relative; }
.open-copy { margin: -6px 0 18px; font-size: 14px; padding: 10px 18px; cursor: pointer; background: #fff; }
.open-home, .open-family { font-size: 16px !important; }

.open-cta .open-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.open-cta .open-cta-family { font-size: 15px; }

.open-filters { padding-top: 26px; }
.open-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.open-filter-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-400); min-width: 9em; }
.open-chip { font: inherit; font-size: 13.5px; color: var(--gray-700); background: #fff; border: 1px solid #d9d9e2; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.open-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.open-chip:focus-visible, .open-copy:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.open-empty { font-size: 15px; color: var(--gray-400); }
.open-card[hidden] { display: none; }
.open-card .body { padding-top: 28px; }

.open-grid { margin-top: 12px; }
.open-link-card { display: block; padding: 20px 20px 6px; transition: border-color .2s ease; }
.open-link-card:hover { border-color: #c7c9f5; }
.open-link-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.open-link-card h3 span { color: var(--indigo); }
.open-link-card p { font-size: 14.5px; line-height: 1.6; color: var(--gray-500); margin: 0 0 14px; }
.open-subhead { font-size: 22px !important; margin-top: 34px !important; }
.open-why p { font-size: 16.5px; line-height: 1.7; color: var(--gray-700); max-width: 760px; }
.open-why .disambiguation { font-size: 14px; color: var(--gray-400); }
.hub-section .table-scroll { max-width: 1150px; }
.open-about-lead { font-size: 16px; line-height: 1.65; color: var(--gray-500); max-width: 760px; margin: 0 0 4px; }
.open-about-grid { grid-template-columns: repeat(3, 1fr); }

/* About pages (policy, legal matrix, how we build). */
.open-figure img { display: block; width: 100%; height: auto; }
table.data.open-doc-table code { white-space: nowrap; }
/* The six-column legal matrix: wider than the text column on large screens
   (equal negative margins, so it stays centred in LTR and RTL), scrollable on
   small ones. */
.table-scroll.open-matrix { margin-left: min(0px, calc(50% - min(530px, 50vw - 24px))); margin-right: min(0px, calc(50% - min(530px, 50vw - 24px))); }
.table-scroll.open-matrix table.data.open-table { min-width: 760px; }
table.data.open-matrix-table th:first-child, table.data.open-matrix-table td:first-child { width: 12em; }
table.data.open-matrix-table th:nth-child(n+2):nth-child(-n+5), table.data.open-matrix-table td:nth-child(n+2):nth-child(-n+5) { width: 8.5em; }
/* Release table of the Arabic AI Model Tracker (/tools/arabic-ai-model-tracker):
   eight columns, filtered by the hub's chips (rows carry .open-card). */
.table-scroll.open-tracker table.data.open-table { min-width: 980px; }
table.data.open-tracker-table { font-size: 13.5px; }
table.data.open-tracker-table td, table.data.open-tracker-table th { padding: 9px 10px; }
table.data.open-tracker-table td:first-child { font-weight: 400; color: var(--gray-700); }
table.data.open-tracker-table td:nth-child(2) { font-weight: 600; min-width: 9em; }
table.data.open-tracker-table td:nth-child(5) { min-width: 6.5em; }

html[dir="rtl"] .open-filter-label { letter-spacing: 0; text-transform: none; font-family: 'IBM Plex Sans Arabic', sans-serif; font-weight: 600; }
html[dir="rtl"] table.data.open-facts th { text-align: right; }
html[dir="rtl"] .open-claim { border-left: 0; border-right: 3px solid var(--indigo-soft); border-radius: 12px 0 0 12px; }
html[dir="rtl"] .open-doi { padding-right: 0 !important; }
html[dir="rtl"] pre.cite { text-align: left; }

@media (max-width: 900px) {
  .open-hub-crumbs, .open-review-note { padding-left: 28px; padding-right: 28px; }
  .open-about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .table-scroll table.data.open-table, .table-scroll table.data.open-facts { min-width: 0; }
  table.data.open-table td, table.data.open-table th { padding-left: 8px; padding-right: 8px; }
  .open-hub-crumbs, .open-review-note { padding-left: 20px; padding-right: 20px; }
  table.data.open-facts th { width: auto; }
  .open-filter-label { min-width: 100%; }
  .table-scroll.open-matrix table.data.open-table { min-width: 820px; }
  table.data.open-matrix-table th:first-child, table.data.open-matrix-table td:first-child { width: 9em; }
  table.data.open-matrix-table th:nth-child(n+2):nth-child(-n+5), table.data.open-matrix-table td:nth-child(n+2):nth-child(-n+5) { width: 6em; }
  .table-scroll.open-tracker table.data.open-table { min-width: 900px; }
}
