/* Shared chrome shell — public site, CMS, and studio preview.
   Selectors are stronger than homepage.css so presentation modes win. */
html body .header.site-chrome{
  position:sticky;
  top:0;
  z-index:40;
  display:block;
  flex-wrap:nowrap;
  align-items:var(--chrome-align, center);
  justify-content:space-between;
  gap:var(--chrome-gap, 12px);
  min-height:var(--chrome-min-h, 86px);
  max-height:none;
  width:100%;
  max-width:100%;
  margin-inline:auto;
  padding:0;
  background:var(--chrome-bg, #fff);
  color:var(--chrome-color, #152349);
  border:0;
  border-bottom:var(--chrome-border, 1px) solid var(--chrome-line, #e8edf5);
  border-radius:0;
  box-shadow:none;
  box-sizing:border-box;
  font-family:var(--chrome-font, Tajawal, Tahoma, sans-serif);
  overflow:visible;
}
html body .header.site-chrome .site-chrome-header-inner{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,5fr) minmax(0,1fr);
  align-items:center;
  gap:var(--chrome-gap, 12px);
  width:min(100%, var(--chrome-max, 1520px));
  min-height:var(--chrome-min-h, 86px);
  margin-inline:auto;
  padding:var(--chrome-pad-y, 8px) var(--chrome-pad-x, 22px);
  box-sizing:border-box;
}
html body .header.site-chrome[data-sticky="0"]{position:relative; top:auto}
html body .header.site-chrome[data-shadow="1"]{box-shadow:0 8px 24px #15234914}
html{scroll-padding-top:calc(var(--chrome-min-h, 86px) + var(--chrome-gap-below, 0px) + 12px)}
html body .header.site-chrome + main,
html body .header.site-chrome + .chrome-preview-sample{
  margin-top:var(--chrome-gap-below, 0px);
}
h1, h2, #results, #cms-main{scroll-margin-top:calc(var(--chrome-min-h, 86px) + var(--chrome-gap-below, 0px) + 12px)}
html body .header.site-chrome .site-chrome-region{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  min-width:0;
  max-width:100%;
}
html body .header.site-chrome .nav{
  min-height:0;
}
html body .header.site-chrome .site-chrome-region[data-region="center"]{justify-content:center}
html body .header.site-chrome .site-chrome-region[data-region="trailing"]{justify-content:flex-end}
html body .header.site-chrome .site-chrome-logo{
  max-width:100%;
  min-width:0;
}
html body .header.site-chrome .site-chrome-logo .brand-mark--wide{
  height:var(--brand-mark-size, 56px);
  max-width:100%;
}
/* The editor's fit choice owns this; the literal here is only a fallback. */
html body .header.site-chrome .brand-mark-img{max-width:100%; object-fit:var(--brand-mark-fit, contain)}
html body .header.site-chrome .site-chrome-tagline{
  display:block;
  line-height:1.45;
  font-weight:600;
  overflow-wrap:anywhere;
}
html body .header.site-chrome .site-chrome-nav{display:flex; align-items:center; min-width:0; max-width:100%}
html body .header.site-chrome .chrome-drawer{display:flex; align-items:center; min-width:0; max-width:100%}
html body .header.site-chrome .chrome-drawer > nav{display:flex; align-items:stretch; min-width:0}
html body .header.site-chrome .nav{gap:var(--nav-icon-label-gap, 4px)}
html body .header.site-chrome summary.chrome-drawer-toggle,
html body .header.site-chrome summary.chrome-sub-toggle{list-style:none; cursor:pointer}
html body .header.site-chrome summary::-webkit-details-marker{display:none}
html body .header.site-chrome .chrome-drawer-toggle{display:none}
html body .header.site-chrome .site-chrome-cta{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:#123acf;
  color:#fff;
  padding:8px 14px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}
html body .header.site-chrome .site-chrome-social{display:flex; gap:8px; flex-wrap:wrap}
html body .header.site-chrome .site-chrome-social a{font-size:13px; font-weight:700}
html body .footer.site-chrome-footer{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
  max-width:100%;
  margin:18px auto 0;
  padding:var(--chrome-pad-y, 22px) 0;
  background:var(--chrome-bg, transparent);
  color:var(--chrome-color, #5c6881);
  box-sizing:border-box;
  font-family:var(--chrome-font, Tajawal, Tahoma, sans-serif);
  overflow-wrap:anywhere;
}
html body .site-chrome-footer-grid{
  display:grid;
  width:min(100%, var(--chrome-max, 1440px));
  margin-inline:auto;
  padding-inline:var(--chrome-pad-x, 28px);
  box-sizing:border-box;
  grid-template-columns:var(--chrome-tracks, repeat(var(--chrome-columns-desktop, 1), minmax(0, 1fr)));
  gap:var(--chrome-gap, 20px);
  align-items:start;
  justify-items:var(--chrome-align, start);
  text-align:start;
}
html body .site-chrome-column{min-width:0;display:flex;flex-direction:column;gap:10px;box-sizing:border-box}
html body .footer.site-chrome-footer .site-chrome-logo{max-width:100%}
html body .footer.site-chrome-footer .brand-mark--wide,
html body .footer.site-chrome-footer .brand-mark-img{width:auto;max-width:100%;height:var(--brand-mark-size, 56px)}
html body .site-chrome-footer-bar{
  display:flex;
  width:min(100%, var(--chrome-max, 1440px));
  margin-inline:auto;
  padding-inline:var(--chrome-pad-x, 28px);
  box-sizing:border-box;
  justify-content:var(--chrome-bar-align, flex-start);
  background:var(--chrome-bar-bg, transparent);
}
html body .site-chrome-links{display:flex; flex-direction:column; gap:8px; min-width:0}
html body .site-chrome-links .footer-links{display:flex; flex-wrap:wrap; gap:12px 18px}
html body .chrome-sub{position:relative}
html body .chrome-sub-list{
  position:absolute;
  inset-inline-start:0;
  top:100%;
  z-index:30;
  min-width:min(220px, 80vw);
  margin:0;
  padding:8px;
  list-style:none;
  background:#fff;
  border:1px solid #e1e6f0;
  border-radius:12px;
  box-shadow:0 12px 30px #1523491a;
}
html body .chrome-sub-list a{display:block; padding:8px 10px; color:inherit; text-decoration:none}
html body .header.site-chrome :focus-visible,
html body .footer.site-chrome-footer :focus-visible{
  outline:3px solid #123acf;
  outline-offset:3px;
}
.chrome-preview-sample{padding:28px 22px 12px; min-height:160px}
.chrome-preview-sample h1{margin:0 0 8px}
.chrome-preview-spacer{height:720px}
.chrome-preview-body{overflow-x:clip; margin:0}

@media (min-width:1101px){
  html body [data-hide-desktop="1"]{display:none !important}
  html body .header.site-chrome[data-nav-desktop="row"] .site-chrome-nav nav{flex-wrap:wrap; overflow:visible}
  html body .header.site-chrome[data-nav-desktop="scroll"] .site-chrome-nav nav{
    flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; max-width:100%;
  }
  html body .header.site-chrome[data-nav-desktop="scroll"] .site-chrome-nav nav::-webkit-scrollbar{display:none}
  html body .header.site-chrome[data-nav-desktop="drawer"] .chrome-drawer-toggle{display:inline-flex}
  html body .header.site-chrome[data-nav-desktop="drawer"] .chrome-drawer > nav{display:none}
  html body .header.site-chrome[data-nav-desktop="drawer"] .chrome-drawer-control[open] + nav{
    display:flex; flex-direction:column; position:absolute; z-index:60; inset-inline:12px; top:100%;
    padding:12px; background:#fff; border:1px solid #e1e6f0; border-radius:16px;
    box-shadow:0 16px 40px #15234922; max-height:min(70vh, 520px); overflow:auto;
  }
}
@media (min-width:761px) and (max-width:1100px){
  /* Keep every header region on one row — do not dump trailing content onto an empty second band. */
  html body .header.site-chrome .site-chrome-header-inner{
    align-items:center;
  }
  html body .header.site-chrome .site-chrome-logo .brand-mark--wide{
    height:var(--brand-mark-size-tablet, var(--brand-mark-size)) !important;
    max-width:min(var(--brand-mark-max-tablet, var(--brand-mark-max)), 50vw);
  }
  html body .site-chrome-footer-grid{grid-template-columns:var(--chrome-tracks, repeat(var(--chrome-columns-tablet, 1), minmax(0, 1fr)))}
  html body [data-hide-tablet="1"]{display:none !important}
  html body .header.site-chrome[data-nav-tablet="scroll"] .site-chrome-nav nav,
  html body .header.site-chrome[data-nav-tablet="row"] .site-chrome-nav nav{
    overflow-x:auto; scrollbar-width:none; max-width:100%; flex-wrap:nowrap;
  }
  html body .header.site-chrome[data-nav-tablet="scroll"] .site-chrome-nav nav::-webkit-scrollbar,
  html body .header.site-chrome[data-nav-tablet="row"] .site-chrome-nav nav::-webkit-scrollbar{display:none}
  html body .header.site-chrome[data-nav-tablet="row"] .site-chrome-nav nav{flex-wrap:wrap; overflow:visible}
  html body .header.site-chrome[data-nav-tablet="drawer"] .chrome-drawer-toggle{display:inline-flex}
  html body .header.site-chrome[data-nav-tablet="drawer"] .chrome-drawer > nav{display:none}
  html body .header.site-chrome[data-nav-tablet="drawer"] .chrome-drawer-control[open] + nav{
    display:flex; position:absolute; z-index:60; inset-inline:12px; top:100%;
    flex-direction:column; padding:12px; background:#fff; border:1px solid #e1e6f0;
    border-radius:16px; max-height:70vh; overflow:auto;
  }
}
@media (max-width:760px){
  html body .header.site-chrome{width:100%}
  html body .header.site-chrome .site-chrome-header-inner{
    align-items:center;
    padding-inline:12px;
  }
  html body .header.site-chrome .site-chrome-region[data-region="trailing"]{display:none}
  /* On phones a track may not collapse below its content: that is what squeezed
     the brand into one word per line. */
  html body .header.site-chrome .site-chrome-region{min-width:min-content}
  html body .header.site-chrome .site-chrome-logo{max-width:100%}
  html body .header.site-chrome .site-chrome-logo .brand-mark--wide{
    height:var(--brand-mark-size-mobile, var(--brand-mark-size)) !important;
    max-width:min(var(--brand-mark-max-mobile, var(--brand-mark-max)), 70vw);
  }
  html body .header.site-chrome .header-note{display:none}
  html body .site-chrome-footer-grid{grid-template-columns:var(--chrome-tracks, 1fr)}
  html body .footer.site-chrome-footer[data-columns-mobile="2"] .site-chrome-footer-grid,
  html body .footer.site-chrome-footer[data-columns-mobile="3"] .site-chrome-footer-grid,
  html body .footer.site-chrome-footer[data-columns-mobile="4"] .site-chrome-footer-grid{
    grid-template-columns:var(--chrome-tracks, repeat(var(--chrome-columns-mobile), minmax(0, 1fr)));
  }
  html body [data-hide-mobile="1"]{display:none !important}
  html body .header.site-chrome[data-nav-mobile="drawer"] .chrome-drawer-toggle{display:inline-flex}
  html body .header.site-chrome[data-nav-mobile="drawer"] .chrome-drawer > nav{display:none}
  html body .header.site-chrome[data-nav-mobile="drawer"] .chrome-drawer-control[open] + nav{
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    position:absolute;
    inset-inline:12px;
    top:100%;
    z-index:60;
    gap:4px;
    width:auto !important;
    max-width:calc(100vw - 24px) !important;
    min-width:0;
    padding:12px;
    background:#fff;
    border:1px solid #e1e6f0;
    border-radius:16px;
    box-shadow:0 16px 40px #15234922;
    max-height:min(70vh, 520px);
    overflow:auto;
    box-sizing:border-box;
  }
  html body .header.site-chrome[data-nav-mobile="drawer"] .chrome-drawer-control[open] + nav .nav{
    flex-direction:row;
    justify-content:flex-start;
    width:100%;
    min-width:0;
    min-height:44px;
    white-space:normal;
  }
  html body .header.site-chrome[data-nav-mobile="scroll"] .chrome-drawer > nav{
    display:flex; overflow-x:auto; max-width:100%; width:100%; flex-wrap:nowrap; scrollbar-width:thin;
  }
  html body .header.site-chrome[data-nav-mobile="row"] .chrome-drawer > nav{
    display:flex; flex-wrap:wrap; justify-content:flex-start; width:100%; overflow:visible;
  }
  html body .header.site-chrome[data-nav-shape="pill"] .nav.active::after{display:none}
}
html body .header.site-chrome[data-nav-shape="pill"] .nav{
  border-radius:999px;
  padding-inline:12px;
}
html body .header.site-chrome[data-nav-shape="pill"] .nav.active{
  background:#edf1ff;
}
html body .header.site-chrome[data-nav-shape="pill"] .nav.active::after{display:none}
html body .header.site-chrome .site-chrome-nav,
html body .header.site-chrome .chrome-drawer,
html body .header.site-chrome .chrome-drawer > nav,
html body .header.site-chrome .site-chrome-region{
  min-width:0;
  max-width:100%;
}
html body .header.site-chrome .brand-mark--wide,
html body .header.site-chrome .brand-mark-img{
  width:auto !important;
  max-width:100% !important;
  height:var(--brand-mark-size, 56px) !important;
}
@media (max-width:1100px){
  html body .header.site-chrome .brand-mark--wide,
  html body .header.site-chrome .brand-mark-img{
    max-width:100% !important;
    height:var(--brand-mark-size-tablet, var(--brand-mark-size, 56px)) !important;
  }
  html body .header.site-chrome .chrome-drawer > nav{overflow-x:auto}
}
@media (max-width:760px){
  html body .header.site-chrome .brand-mark--wide,
  html body .header.site-chrome .brand-mark-img{
    max-width:100% !important;
    height:var(--brand-mark-size-mobile, var(--brand-mark-size, 44px)) !important;
  }
}
/* A scrollable menu keeps a soft edge so hidden links stay discoverable even
   when the scrollbar itself is hidden. */
html body .header.site-chrome .site-chrome-nav nav[data-scrollable="1"],
html body .header.site-chrome .chrome-drawer > nav[data-scrollable="1"]{
  -webkit-mask-image:linear-gradient(to left, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image:linear-gradient(to left, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
html body .header.site-chrome .chrome-drawer-toggle{
  border:1px solid var(--chrome-line, #e1e6f0);
  background:#fff;
  color:var(--navy, #152349);
  border-radius:999px;
  padding:8px 14px;
  font:700 14px Tajawal, Tahoma, sans-serif;
}
