/* Generated by src/build.js (rtlcss) from css/components/header.css — LTR version, do not edit: edit css/components/header.css and rebuild */
/* ==========================================================================
   header.css — sticky top bar, mobile dropdown, search bar, QR share window
   and languages window (shared by all pages).
   Scroll state comes from js/components/header.js:
     .hdr.is-stuck  → page scrolled down (capsule becomes a full-width bar;
                      on phones ≤ 720px it stays the capsule, see the end)
     --hdr-k        → 0…1 shrink factor (logo height, bar padding)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared icon defaults (stroked line icons)
   -------------------------------------------------------------------------- */
.hdr__ic {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--color-navy-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Sticky wrapper + bar
   -------------------------------------------------------------------------- */
.hdr {
  --hdr-k: 0;
  position: sticky;
  top: -18px;
  z-index: 50;
  padding: 18px 24px 0;
  transition: padding .3s ease, transform .4s cubic-bezier(.22, .61, .36, 1);
}

/* Form switch done off-screen / on first paint without animating (header.js) */
.hdr.is-instant,
.hdr.is-instant * {
  transition: none !important;
}

/* Auto-hide while scrolling down (header.js) — slides fully out, shadow included */
.hdr.is-hidden {
  transform: translateY(calc(-100% - 28px));
}

@media (prefers-reduced-motion: reduce) {
  .hdr {
    transition: none;
  }
}

.hdr__bar {
  position: relative;
  box-sizing: border-box;
  max-width: var(--cw, 1180px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 32px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-mist-200);
  border-radius: 999px;
  box-shadow: none;
  transition: max-width .3s ease, padding .3s ease, border-radius .3s ease, box-shadow .3s ease;
}

/* scrolled: full-width bar, padding shrinks continuously with --hdr-k */
.hdr.is-stuck {
  padding-right: 0;
  padding-left: 0;
}

.hdr.is-stuck .hdr__bar {
  max-width: 100%;
  padding: calc(8px - 5px * var(--hdr-k)) max(24px, calc((100% - var(--cw, 1180px) + 48px) / 2));
  border-width: 0 0 1px 0;
  border-radius: 0;
  box-shadow: 0 10px 24px -18px rgba(26, 43, 69, 0.4);
}

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */
.hdr__logo {
  display: flex;
  flex: none;
  align-items: center;
}

.hdr__logo-img {
  display: block;
  width: auto;
  height: calc(52px - 16px * var(--hdr-k));
  transition: height .25s ease;
}

/* --------------------------------------------------------------------------
   Main navigation (pill group)
   -------------------------------------------------------------------------- */
.hdr__nav {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 5px;
  border-radius: 999px;
  background: var(--color-mist-100);
  font-size: 15px;
  font-weight: 700;
}

.hdr__nav-link {
  padding: 9px 20px;
  border-radius: 999px;
  color: var(--color-ink-700);
  transition: background .2s ease, color .2s ease;
}

.hdr__nav-link:hover {
  color: var(--color-blue-500);
  background: rgba(255, 255, 255, .7);
}

.hdr__nav-link[aria-current="page"],
.hdr__nav-link[aria-current="page"]:hover {
  color: var(--color-blue-500);
  background: var(--color-white);
  box-shadow: 0 6px 14px -8px rgba(26, 43, 69, 0.35);
}

/* --------------------------------------------------------------------------
   Round tool buttons (menu · language · QR · search)
   -------------------------------------------------------------------------- */
.hdr__tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hdr__btn {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-mist-200);
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.hdr__btn .hdr__ic {
  transition: stroke .2s ease;
}

/* language button: globe + label + chevron */
.hdr__btn--lang {
  width: auto;
  height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  color: var(--color-navy-700);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}

.hdr__btn--lang .hdr__ic {
  stroke: var(--color-blue-500);
}

.hdr__chev-up {
  display: none;
}

.hdr__btn--lang[aria-expanded="true"] .hdr__chev-up {
  display: inline;
}

.hdr__btn--lang[aria-expanded="true"] .hdr__chev-down {
  display: none;
}

/* open (panel showing) and hover: filled accent */
.hdr__btn--lang[aria-expanded="true"],
.hdr__btn--icon[aria-expanded="true"],
.hdr__btn--lang:hover,
.hdr__btn--icon:hover {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: var(--color-white);
}

.hdr__btn--lang[aria-expanded="true"] .hdr__ic,
.hdr__btn--icon[aria-expanded="true"] .hdr__ic,
.hdr__btn--lang:hover .hdr__ic,
.hdr__btn--icon:hover .hdr__ic {
  stroke: var(--color-white);
}

/* search: solid accent button */
.hdr__btn--search {
  border: 2px solid var(--color-blue-500);
  background: var(--color-blue-500);
  box-shadow: 0 10px 20px -10px rgba(59, 117, 150, 0.8);
}

.hdr__btn--search .hdr__ic {
  stroke: var(--color-white);
}

.hdr__btn--search:hover {
  background: var(--hover-cream);
  border-color: var(--hover-cream-border);
  color: var(--hover-cream-ink);
}

.hdr__btn--search:hover .hdr__ic {
  stroke: var(--hover-cream-ink);
}

/* hamburger (shown ≤ 720px) */
.hdr__menu-btn {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  border-color: var(--color-mist-200);
}

.hdr .hdr__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 117, 150, .25);
}

/* --------------------------------------------------------------------------
   Mobile dropdown menu
   -------------------------------------------------------------------------- */
.hdr__drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  box-sizing: border-box;
  width: 240px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--color-white);
  border: 1px solid var(--color-mist-200);
  border-radius: 22px;
  box-shadow: 0 24px 48px -24px rgba(26, 43, 69, 0.45);
}

.hdr__drop-link {
  display: block;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy-700);
  transition: background .2s ease, color .2s ease;
}

.hdr__drop-link:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.hdr__drop-link[aria-current="page"],
.hdr__drop-link[aria-current="page"]:hover {
  font-weight: 800;
  color: var(--color-blue-500);
  background: var(--color-blue-50);
}

/* --------------------------------------------------------------------------
   Close (×) button used by the search bar and both windows
   -------------------------------------------------------------------------- */
.hdr-x {
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.hdr-x--lg {
  width: 48px;
  height: 48px;
  border-color: var(--color-mist-200);
}

.hdr-x .hdr__ic {
  transition: stroke .2s ease;
}

.hdr-x:hover {
  background: var(--color-ink-800);
  border-color: var(--color-ink-800);
  color: var(--color-white);
}

.hdr-x:hover .hdr__ic {
  stroke: var(--color-white);
}

/* --------------------------------------------------------------------------
   Search bar (drops below the top bar)
   -------------------------------------------------------------------------- */
.hdr-search {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  box-sizing: border-box;
  padding: 12px 24px 0;
}

.hdr-search__inner {
  max-width: var(--cw, 1180px);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.hdr-search__dialog {
  width: 590px;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdr-search__field {
  flex: 1;
  min-width: 0;
}

.hdr-search__form {
  box-sizing: border-box;
  height: 56px;
  margin: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--color-blue-500);
  border-radius: 999px;
  background: var(--color-white);
  box-shadow: 0 0 0 5px rgba(59, 117, 150, 0.12);
}

.hdr-search__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hdr-search__icon .hdr__ic {
  stroke: var(--color-blue-500);
}

.hdr-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-navy-700);
}

.hdr-search__submit {
  flex: none;
  box-sizing: border-box;
  height: 44px;
  padding: 0 22px;
  border: 2px solid var(--color-blue-500);
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.hdr-search__submit:hover {
  background: var(--color-cream-300);
  color: var(--color-navy-700);
  border-color: var(--color-blue-300);
}

/* faint full-page layer behind the search bar; a click on it closes the search */
.hdr-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 26, 44, 0.06);
  cursor: default;
}

/* --------------------------------------------------------------------------
   Modal windows (QR share · languages): shared frame
   -------------------------------------------------------------------------- */
.hdr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  box-sizing: border-box;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 43, 69, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hdr-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.hdr-modal__dialog {
  position: relative;
  z-index: 1;
  width: 460px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: linear-gradient(-180deg, var(--color-cream-200) 0%, var(--color-sky-50) 100%);
  border: 1px solid var(--color-mist-200);
  border-radius: 32px;
  box-shadow: 0 40px 90px -30px rgba(26, 43, 69, 0.5);
}

.hdr-modal__dialog:focus {
  outline: none;
}

.hdr-modal__head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* faded calligraphy ornament in the top-left corner */
.hdr-modal__ornament {
  position: absolute;
  z-index: -1;
  top: -70px;
  right: -70px;
  width: 300px;
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
}

.hdr-modal__title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hdr-modal__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 24px;
}

.hdr-modal__body {
  padding: 0 24px 24px;
}

.hdr-modal__box {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--color-line-neutral);
  border-radius: 24px;
  background: var(--color-white);
}

/* --------------------------------------------------------------------------
   QR share window
   -------------------------------------------------------------------------- */
.hdr-qr__code {
  align-self: center;
  box-sizing: border-box;
  width: 232px;
  height: 232px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: var(--color-white);
}

.hdr-qr__code-img {
  display: block;
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.hdr-qr__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hdr-qr__url-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-white);
}

.hdr-qr__url {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  unicode-bidi: isolate;
  font-size: 14px;
  color: var(--color-ink-700);
}

/* copy button: "نسخ" + copy icon → "تم النسخ" + check icon on green */
.hdr-qr__copy {
  flex: none;
  box-sizing: border-box;
  height: 40px;
  padding: 0 18px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 2px solid var(--color-blue-500);
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.hdr-qr__copy .hdr__ic {
  stroke: var(--color-white);
  transition: stroke .2s ease;
}

.hdr-qr__ic-check,
.hdr-qr__copied-txt {
  display: none;
}

.hdr-qr__copy.is-copied {
  background: var(--color-success);
  border-color: var(--color-success);
}

.hdr-qr__copy.is-copied .hdr-qr__ic-copy,
.hdr-qr__copy.is-copied .hdr-qr__copy-txt {
  display: none;
}

.hdr-qr__copy.is-copied .hdr-qr__ic-check {
  display: inline-block;
}

.hdr-qr__copy.is-copied .hdr-qr__copied-txt {
  display: inline;
}

.hdr-qr__copy:hover {
  background: var(--hover-cream);
  color: var(--hover-cream-ink);
  border-color: var(--hover-cream-border);
}

.hdr-qr__copy:hover .hdr__ic {
  stroke: var(--hover-cream-ink);
}

/* social share circles */
.hdr-qr__share {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hdr-qr__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.hdr-qr__soc {
  flex: none;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-blue-50);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.hdr-qr__soc svg {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: var(--color-blue-500);
  stroke: none;
}

.hdr-qr__soc:hover {
  background: var(--hover-fill);
  border-color: var(--hover-fill);
}

.hdr-qr__soc:hover svg {
  fill: var(--color-white);
}

/* --------------------------------------------------------------------------
   Languages window
   -------------------------------------------------------------------------- */
.hdr-modal--lang .hdr-modal__dialog {
  width: 780px;
}

.hdr-modal--lang .hdr-modal__title-row {
  gap: 16px;
}

.hdr-modal--lang .hdr-modal__title {
  font-size: 26px;
}

.hdr-modal--lang .hdr-modal__box {
  padding: 16px 8px 8px;
  overflow: hidden;
  gap: 8px;
}

/* filter field */
.hdr-lm__search-wrap {
  padding: 0 8px 0 18px;
}

.hdr-lm__search {
  box-sizing: border-box;
  height: 50px;
  padding: 0 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 2px solid var(--color-blue-500);
  border-radius: 999px;
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(59, 117, 150, 0.08);
}

.hdr-lm__search .hdr__ic {
  stroke: var(--color-blue-500);
}

.hdr-lm__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-navy-700);
}

/* scrolling list (ltr container keeps the scrollbar on the right edge) */
.hdr-lm__scroll {
  max-height: 340px;
  overflow-y: auto;
  direction: ltr;
  scrollbar-width: thin;
  scrollbar-color: var(--color-blue-200) transparent;
}

.hdr-lm__scroll::-webkit-scrollbar {
  width: 8px;
}

.hdr-lm__scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 0 8px;
}

.hdr-lm__scroll::-webkit-scrollbar-thumb {
  background: var(--color-blue-200);
  border: 2px solid var(--color-white);
  border-radius: 999px;
}

.hdr-lm__scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-blue-500);
}

.hdr-lm__grid {
  padding: 6px 8px 8px 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}

.hdr-lm__empty {
  direction: ltr;
  margin: 0;
  padding: 18px 12px 22px;
  text-align: center;
  font-size: 14px;
  color: var(--color-ink-500);
}

/* one language pill */
.hdr-lm__item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 18px 9px 9px;
  border: 1px solid var(--color-mist-200);
  border-radius: 999px;
  background: var(--color-mist-50);
  color: var(--color-navy-700);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.hdr-lm__code {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-line-soft);
  color: var(--color-blue-600) /* 5:1 on the badge */;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}

.hdr-lm__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.hdr-lm__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 17px;
}

.hdr-lm__sub {
  font-size: 13px;
  color: var(--color-ink-500);
  transition: color .2s ease;
}

.hdr-lm__arr {
  stroke: var(--color-blue-500);
  transition: stroke .2s ease;
}

/* the current language gets a check, the others an arrow */
.hdr-lm__arr--check,
.hdr-lm__item.is-current .hdr-lm__arr--go {
  display: none;
}

.hdr-lm__item.is-current .hdr-lm__arr--check {
  display: inline-block;
}

/* hover + current language: filled accent pill */
.hdr-lm__item:hover,
.hdr-lm__item.is-current {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: var(--color-white);
}

.hdr-lm__item:hover .hdr-lm__code,
.hdr-lm__item.is-current .hdr-lm__code {
  background: var(--color-cream-200);
  color: var(--color-navy-700);
}

.hdr-lm__item:hover .hdr-lm__sub,
.hdr-lm__item.is-current .hdr-lm__sub {
  color: rgba(255, 255, 255, .8);
}

.hdr-lm__item:hover .hdr-lm__arr,
.hdr-lm__item.is-current .hdr-lm__arr {
  stroke: var(--color-white);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hdr__bar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .hdr__lang-txt,
  .hdr__chev {
    display: none;
  }

  .hdr__btn--lang {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .hdr__nav-link {
    padding: 8px 14px;
    font-size: 14px;
  }
}

/* four links (الرئيسية · المواد · المحتوى الإرشادي · من نحن): compact from
   760px down, so they never wrap inside the capsule before the menu button
   takes over (≤ 720px) */
@media (max-width: 760px) {
  .hdr__nav {
    padding: 4px;
  }

  .hdr__nav-link {
    padding: 7px 11px;
    font-size: 13px;
  }
}

@media (max-width: 700px) {
  .hdr__logo-img {
    height: 38px;
  }

  .hdr__btn,
  .hdr__btn--lang {
    width: 40px;
    height: 40px;
  }
}

/* Phones: the capsule all the way down the page, the same as at the top —
   18px under the screen's top, framed and rounded — never the full-width bar
   (header.js still sets .is-stuck further down: here it only adds a soft
   shadow, as the capsule then floats over the content) */
@media (max-width: 720px) {
  .hdr {
    top: 0;
  }

  .hdr.is-stuck {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hdr.is-stuck .hdr__bar {
    max-width: var(--cw, 1180px);
    padding-top: 8px;
    padding-bottom: 8px;
    border-width: 1px;
    border-radius: 999px;
    box-shadow: 0 10px 24px -18px rgba(26, 43, 69, 0.4);
  }
}

@media (max-width: 639px) {
  .hdr,
  .hdr.is-stuck {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* menu button instead of the links: up to 720px the four links would not
   fit beside the logo and the tools with room to spare */
@media (max-width: 720px) {
  .hdr__nav {
    display: none;
  }

  .hdr__menu-btn {
    display: flex;
  }

  .hdr__bar,
  .hdr.is-stuck .hdr__bar {
    justify-content: flex-start;
    padding-right: 8px;
    padding-left: 8px;
  }

  .hdr__logo {
    margin-inline-end: auto;
  }
}

@media (min-width: 721px) {
  .hdr__drop {
    display: none;
  }
}

@media (max-width: 560px) {
  .hdr-modal--lang {
    padding: 10px;
  }

  .hdr-modal--lang .hdr-modal__dialog {
    border-radius: 28px;
  }

  .hdr-modal--lang .hdr-modal__head {
    padding: 18px 16px 12px;
  }

  .hdr-modal--lang .hdr-modal__title {
    font-size: 22px;
  }

  .hdr-modal--lang .hdr-modal__body {
    padding: 0 8px 8px;
  }

  .hdr-modal--lang .hdr-modal__box {
    padding: 10px 2px 4px;
    border-radius: 22px;
  }

  .hdr-lm__search-wrap {
    padding: 0 6px;
  }

  .hdr-lm__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px 6px 6px;
  }

  .hdr-lm__item {
    gap: 8px;
    padding: 6px 10px 6px 6px;
  }

  .hdr-lm__code {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .hdr-lm__name {
    font-size: 14px;
  }

  .hdr-lm__sub {
    font-size: 11.5px;
  }

  .hdr-lm__arr,
  .hdr-lm__item.is-current .hdr-lm__arr--check {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Opening motion (keyframes in css/base.css)
   -------------------------------------------------------------------------- */
.hdr-modal__backdrop,
.hdr-scrim {
  animation: pop-fade .25s ease;
}

.hdr-modal__dialog {
  animation: pop-in .38s cubic-bezier(.22, .61, .36, 1);
}

.hdr-search,
.hdr__drop {
  animation: pop-drop .24s cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .hdr-modal__backdrop,
  .hdr-scrim,
  .hdr-modal__dialog,
  .hdr-search,
  .hdr__drop {
    animation: none;
  }
}

/* Closing motion (.is-closing is set by GP.hide — js/core/dom.js) */
.hdr-modal.is-closing .hdr-modal__backdrop,
.hdr-scrim.is-closing {
  animation: pop-fade-out .2s ease-in forwards;
}

.hdr-modal.is-closing .hdr-modal__dialog {
  animation: pop-out .22s cubic-bezier(.4, 0, 1, 1) forwards;
}

.hdr-search.is-closing,
.hdr__drop.is-closing {
  animation: pop-lift .18s cubic-bezier(.4, 0, 1, 1) forwards;
}
