/* The site palette is shared with the Saudi guide and the article templates. */
.abnia-hub {
    --akh-brand: var(--abnia-blue);
    --akh-action: var(--abnia-sky);
    --akh-ink: #171717;
    --akh-body: #424242;
    --akh-accent: var(--akh-ink);
    --akh-focus: var(--akh-ink);
    --akh-line: #dedede;
    --akh-tint: #f5f5f5;
    --akh-paper: #fff;
    --akh-canvas: #fafafa;
    color: var(--akh-ink); background: var(--akh-canvas); font-family: system-ui, "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    text-align: start; line-height: 1.75; overflow-wrap: anywhere; width: 100%; min-width: 0;
}
.abnia-hub *, .abnia-hub *::before, .abnia-hub *::after { box-sizing: border-box; }
.abnia-hub [hidden] { display: none !important; }
.abnia-hub .akh-visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; padding: 0; border: 0;
}
.abnia-hub :where(a,button,input,summary,select,textarea):focus-visible {
    outline: 3px solid var(--akh-focus); outline-offset: 3px;
}
.abnia-hub a { color: var(--akh-accent); text-underline-offset: .2em; }
.abnia-hub :is(h1,h2,h3,h4,p) { margin: 0; font-family: inherit; letter-spacing: normal; }
.abnia-hub button, .abnia-hub input { font: inherit; letter-spacing: normal; }
.abnia-hub button, .abnia-hub summary { cursor: pointer; }
.abnia-hub [id] { scroll-margin-block-start: 5rem; }
.abnia-hub .akh-wrap { width: min(100% - 3rem, 74.5rem); margin-inline: auto; }
.abnia-hub .akh-hero {
    padding: 0; background: var(--akh-brand); color: white;
}
.abnia-hub .akh-mast { position: relative; isolation: isolate; }
.abnia-hub .akh-hero-inner {
    position: relative; display: grid; align-items: center;
    grid-template-columns: minmax(0,1fr) minmax(8rem,28%); gap: 1rem;
    padding-block: clamp(1.35rem,4vw,3.4rem);
}
.abnia-hub .akh-mast::before {
    content: ""; position: absolute; z-index: -1; inset: 0 auto 0 0; width: 48%;
    background: var(--abnia-blue);
    pointer-events: none;
}
.abnia-hub .akh-hero h1 { margin: 0; color: white; font-weight: 800; line-height: 1.26; text-wrap: balance; }
.abnia-hub .akh-hero h1 span { display: block; font-size: clamp(35px,4.6vw,68px); }
.abnia-hub .akh-hero em { display: block; margin-block-start: .14em; color: inherit; font: inherit;
    font-size: clamp(20px,2.65vw,40px); line-height: 1.45; }
.abnia-hub .akh-brand { display: grid; place-items: center; min-width: 0; }
.abnia-hub .akh-mark { width: 100%; max-width: 18rem; position: relative; }
.abnia-hub .akh-brand img { filter: var(--akh-logo-ink, brightness(0) invert(1)); display: block; width: 100%; height: auto; margin: 0; border: 0; }
.abnia-hub .akh-logo-filter { position: absolute; pointer-events: none; }
.abnia-hub .akh-mark-name { color: white; font-size: 1.75rem; font-weight: 800; }
.abnia-hub .akh-hero-foot { background: white; color: var(--akh-ink); border-bottom: 1px solid var(--akh-line); }
.abnia-hub .akh-lead { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
    gap: .85rem 2rem; padding-block: clamp(1rem,2.3vw,1.75rem) .3rem; }
.abnia-hub .akh-intro { max-width: 68ch; margin: 0; color: var(--akh-ink);
    font-size: clamp(16px,1.3vw,18px); line-height: 1.65; }
.abnia-hub .akh-askbar { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.1rem;
    min-height: 44px; padding: .52rem 1rem; border-radius: 9px; background: var(--akh-action); color: #111;
    font-weight: 750; text-decoration: none !important; }
.abnia-hub .akh-askbar span { font: 1.35em/1 sans-serif; }
.abnia-hub .akh-askbar:is(:hover,:focus-visible) { background: var(--akh-ink); color: white; }
.abnia-hub .akh-jumps { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center;
    gap: 0 1.15rem; margin: 0; padding: 0; border-top: 1px solid var(--akh-line); }
.abnia-hub .akh-jumps a { display: inline-flex; align-items: center; min-height: 44px; color: var(--akh-ink);
    font-weight: 700; text-decoration: underline; text-decoration-color: var(--akh-brand); text-underline-offset: .33em; }
.abnia-hub .akh-readers, .abnia-hub .akh-discovery { padding-block: clamp(1.65rem,4vw,3.25rem); }
.abnia-hub .akh-major, .abnia-hub .abnia-lab > .akh-wrap > h2, .abnia-hub .akh-discovery > h2 {
    font-size: clamp(28px,3.3vw,44px); line-height: 1.35; font-weight: 750;
    margin: 0 0 clamp(.9rem,2vw,1.55rem); text-wrap: balance;
}
.abnia-hub .akh-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 20px; }
.abnia-hub .akh-card {
    min-width: 0; padding: clamp(20px,2vw,26px); background: var(--akh-paper); color: var(--akh-ink);
    border: 1px solid var(--akh-line); border-radius: 24px;
}
.abnia-hub .akh-card > h3, .abnia-hub .akh-brief .akh-brief-intro h3 {
    font-size: clamp(1.25rem,2vw,1.65rem); line-height: 1.5; font-weight: 750; margin: 0 0 .8rem;
}
.abnia-hub :is(.akh-ask,.akh-archive,.akh-brief) { grid-column: span 7; }
.abnia-hub :is(.akh-reading,.akh-profiles,.akh-sources) { grid-column: span 5; }
.abnia-hub .akh-field { display: flex; align-items: stretch; gap: .4rem; }
.abnia-hub .akh-field input { width: 0; flex: 1; min-width: 0; font-size: 1rem; color: var(--akh-ink); border: 1px solid var(--akh-body); border-radius: 8px; padding: .5rem .65rem; background: white; }
.abnia-hub .akh-field button, .abnia-hub .akh-prompts button, .abnia-hub .akh-passage-button {
    border: 1px solid var(--akh-accent); border-radius: 8px; background: var(--akh-paper);
    color: var(--akh-accent); padding: .4rem .7rem; min-height: 44px;
}
.abnia-hub .akh-field button { background: var(--akh-action); color: #111; border-color: var(--akh-action); }
.abnia-hub .akh-prompts { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-block-start: .65rem; }
.abnia-hub .akh-status:not(:empty), .abnia-hub .akh-results:not(:empty) { margin-block: .75rem; }
.abnia-hub .akh-results article, .abnia-hub .akh-results > h3 { padding: .65rem .9rem; background: var(--akh-tint); border-inline-start: 3px solid var(--akh-accent); }
.abnia-hub .akh-results > * + * { margin-block-start: .65rem; }
.abnia-hub .akh-features { display: grid; gap: .8rem; }
.abnia-hub .akh-feature { display: grid; grid-template-columns: minmax(4rem,.36fr) 1fr; gap: .85rem; align-items: center; text-decoration: none !important; }
.abnia-hub .akh-feature + .akh-feature { border-top: 1px solid var(--akh-line); padding-top: .8rem; }
.abnia-hub .akh-feature img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; margin: 0; }
.abnia-hub .akh-feature h4 { color: var(--akh-ink); font-size: 1rem; line-height: 1.55; }
.abnia-hub .akh-feature p, .abnia-hub .akh-areas span { color: var(--akh-body); font-size: .9rem; }
.abnia-hub .akh-text-link { color: var(--akh-accent); font-size: .875rem; font-weight: 700; }
.abnia-hub .akh-feature:hover .akh-text-link { text-decoration: underline; }
.abnia-hub .akh-answer-section { display: block; color: var(--akh-body); font-size: .8rem; }
.abnia-hub .akh-answers details + details, .abnia-hub .akh-areas a + a { border-top: 1px solid var(--akh-line); }
.abnia-hub .akh-answers summary { padding: .65rem 0; color: var(--akh-ink); font-weight: 700; }
.abnia-hub .akh-answer-body { padding-block-end: .8rem; }
.abnia-hub .akh-areas a { display: grid; grid-template-columns: 1fr auto; padding: .65rem 0; text-decoration: none !important; }
.abnia-hub .akh-areas a span { grid-column: 1; }
.abnia-hub .akh-areas a i { grid-column: 2; grid-row: 1/3; align-self: center; font-style: normal; }
.abnia-hub .akh-preview-note { width: min(100% - 2rem,74.5rem); margin: 0 auto 1rem; color: var(--akh-body); }
body.abnia-hub-page #content.page-class { padding-top: 0; }
body.abnia-hub-page #content.page-class > .container { width: 100%; max-width: none; padding-inline: 0; }
body.abnia-hub-page #content.page-class > .container > .page-entry-title,
body.abnia-hub-page #content.page-class > .container > .row > aside { display: none; }
body.abnia-hub-page #content.page-class > .container > .row { width: 100%; margin: 0 !important; }
body.abnia-hub-page #content.page-class > .container > .row > :is(.content-left,.content-right) { width: 100%; max-width: 100%; flex: 0 0 100%; padding-inline: 0 !important; }
body.abnia-hub-page #content.page-class .bs-card-box.wd-back:has(.abnia-hub) { margin: 0; padding: 0; border: 0; box-shadow: none; }
/* Justify Arabic prose, while leaving the final line and single-line controls in reading order. */
body.abnia-hub-page .abnia-hub :is(.akh-intro, .akh-feature p, .akh-answer-body p, .akh-profile-body p,
    .akh-results article p, .akh-chat article div p, .akh-chat blockquote, .akh-brief-read p,
    .akh-episode-list details p, .akl-intro, .akl-policy p, .akl-reference):lang(ar) {
    text-align: justify !important; text-align-last: start; text-justify: auto; word-spacing: normal;
}
@media (max-width: 900px) {
    .abnia-hub .akh-grid > .akh-card { grid-column: 1/-1; }
}
@media (max-width: 700px) {
    .abnia-hub .akh-wrap { width: calc(100% - 32px); }
    .abnia-hub .akh-hero-inner { grid-template-columns: minmax(0,1fr) clamp(5.25rem,24vw,8rem); gap: .4rem; }
    .abnia-hub .akh-lead { grid-template-columns: minmax(0,1fr); gap: .7rem; }
    .abnia-hub .akh-askbar { justify-self: stretch; }
    .abnia-hub .akh-jumps { justify-content: space-between; gap: 0 .5rem; }
    .abnia-hub .akh-jumps a { font-size: max(.875rem,14px); }
    .abnia-hub .akh-feature { grid-template-columns: minmax(4rem,.37fr) 1fr; }
    .abnia-hub .akh-card { padding: 1rem; border-radius: 14px; }
    .abnia-hub .akh-grid { gap: .75rem; }
}
@media (max-width: 375px) {
    .abnia-hub .akh-jumps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 .25rem; }
    .abnia-hub .akh-jumps a { justify-content: center; text-align: center; line-height: 1.45; text-wrap: balance; }
}
/* The theme prints its desktop masthead above the mobile logo even when it has no visible content. */
@media (max-width: 991px) {
    body.abnia-hub-page .bs-headfive { padding-block: 0; }
    body.abnia-hub-page .bs-headfive .bs-header-main:has(.main > .d-none.d-lg-flex:only-child) { display: none; }
    body.abnia-hub-page .bs-headfive .bs-menu-full { padding-block: 0; }
    body.abnia-hub-page .bs-menu-full .main .logo .navbar-brand { display: inline-flex; align-items: center; padding: 0; margin-block: 0; }
    body.abnia-hub-page .bs-menu-full .navbar-brand img.custom-logo { width: auto; max-height: 56px; }
}

body.abnia-hub-page .abnia-hub :is(.akh-major, .akh-card > h3, .akh-discovery > h2) { color: var(--akh-ink); }
