/* =========================================================
   HIKAL — Integrated Annual Report 2025-26 — Search UI
   A centred command palette on the desktop, a full-screen
   sheet on a phone. Montserrat and the report's blues.
   ========================================================= */

:root {
  --hs-ink:        #17467A;
  --hs-ink-2:      #4A6B90;
  --hs-ink-3:      #7D93AC;
  --hs-accent:     #0354AC;
  --hs-accent-d:   #17467A;
  --hs-surface:    #FFFFFF;
  --hs-surface-2:  #F5F9FD;
  --hs-border:     #DCE7F2;
  --hs-border-2:   #C2D6E8;
  --hs-hover:      rgba(3, 84, 172, .05);
  --hs-active:     rgba(3, 84, 172, .10);
  --hs-mark:       #D0E7F7;
  --hs-shadow:     0 30px 80px rgba(9, 43, 79, .24);
  --hs-scrim:      rgba(9, 34, 62, .55);
}

/* =========================================================
   TRIGGER
   The icon in the header is 20px, which is a fine thing to look
   at and too small a thing to hit with a thumb. A pseudo-element
   grows the tap target to 44px without moving anything.
   ========================================================= */
.site-header__search {
  position: relative;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .site-header__search::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
}

/* =========================================================
   SHELL
   ========================================================= */
.hs {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.hs.is-open {
  display: block;
}

.hs__scrim {
  position: absolute;
  inset: 0;
  background: var(--hs-scrim);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: hs-fade .2s ease-out;
}

.hs__panel {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  max-height: min(76vh, 660px);
  margin: 84px auto 0;
  display: flex;
  flex-direction: column;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: 18px;
  box-shadow: var(--hs-shadow);
  overflow: hidden;
  animation: hs-rise .24s cubic-bezier(.22, .61, .36, 1);
}

@keyframes hs-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hs-rise {
  from { opacity: 0; transform: translateY(-14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   HEAD — the field, the count, the category chips
   ========================================================= */
.hs__head {
  border-bottom: 1px solid var(--hs-border);
  background: var(--hs-surface);
  flex: 0 0 auto;
}

.hs__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.hs__field-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--hs-ink-2);
}

.hs__field-icon svg {
  width: 20px;
  height: 20px;
}

.hs__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-family: inherit;
  /* 16px keeps iOS from zooming the page when the field takes focus */
  font-size: 16px;
  line-height: 1.4;
  color: var(--hs-ink);
  padding: 4px 0;
  -webkit-appearance: none;
  appearance: none;
}

.hs__input::placeholder {
  color: var(--hs-ink-3);
}

.hs__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.hs__clear,
.hs__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--hs-ink-2);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

/* Two crosses side by side read as one control repeated, so the field's
   clear is a small filled chip and the dialog's close is set off by a rule. */
.hs__clear {
  width: 22px;
  height: 22px;
  background: var(--hs-border);
  color: var(--hs-surface);
}

.hs__clear svg {
  width: 12px;
  height: 12px;
}

.hs__close {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--hs-border);
  border-radius: 0 999px 999px 0;
  width: 44px;
}

.hs__close svg {
  width: 18px;
  height: 18px;
}

.hs__clear:hover {
  background: var(--hs-ink-3);
}

.hs__close:hover {
  background: var(--hs-active);
  color: var(--hs-accent);
}

.hs__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 12px;
}

.hs__count {
  margin: 0;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hs-ink-3);
}

.hs__chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.hs__chips::-webkit-scrollbar {
  display: none;
}

.hs-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  background: var(--hs-surface-2);
  color: var(--hs-ink-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.hs-chip span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--hs-ink-3);
}

.hs-chip:hover {
  border-color: var(--hs-border-2);
  color: var(--hs-ink);
}

.hs-chip.is-on {
  background: var(--hs-accent);
  border-color: var(--hs-accent);
  color: #fff;
}

.hs-chip.is-on span {
  color: rgba(255, 255, 255, .8);
}

/* =========================================================
   BODY
   ========================================================= */
.hs__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 12px 18px;
}

.hs-sec + .hs-sec {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hs-border);
}

.hs-sec__h,
.hs-grp__h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hs-ink-3);
}

.hs-grp + .hs-grp {
  margin-top: 18px;
}

.hs-grp__n {
  font-size: 11px;
  font-weight: 700;
  color: var(--hs-ink-3);
}

.hs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- a result row ---------- */
.hs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background-color .18s ease;
}

.hs-row:hover,
.hs-row.is-active {
  background: var(--hs-hover);
}

.hs-row__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hs-row__title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hs-ink);
}

.hs-row__snip {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--hs-ink-2);
  /* two lines is enough to judge a hit by; the rest is on the page */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hs-row mark {
  background: var(--hs-mark);
  color: var(--hs-accent-d);
  border-radius: 2px;
  padding: 0 1px;
}

.hs-row__go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--hs-ink-3);
  transition: color .18s ease, transform .18s ease;
}

.hs-row__go svg {
  width: 15px;
  height: 15px;
}

.hs-row:hover .hs-row__go,
.hs-row.is-active .hs-row__go {
  color: var(--hs-accent);
  transform: translateX(2px);
}

/* ---------- the category tag ---------- */
.hs-cat {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.6;
  opacity: .95;
}

.hs-cat--overview    { color: #17467A; background: rgba(23, 70, 122, .07); }
.hs-cat--strategy    { color: #0354AC; background: rgba(3, 84, 172, .07); }
.hs-cat--leadership  { color: #004886; background: rgba(0, 72, 134, .07); }
.hs-cat--performance { color: #1268B3; background: rgba(18, 104, 179, .07); }
.hs-cat--business    { color: #00427A; background: rgba(0, 66, 122, .07); }
.hs-cat--research    { color: #007F71; background: rgba(0, 127, 113, .07); }
.hs-cat--value       { color: #009988; background: rgba(0, 153, 136, .08); }
.hs-cat--esg         { color: #2F7568; background: rgba(47, 117, 104, .08); }
.hs-cat--downloads   { color: #5A6B7D; background: rgba(90, 107, 125, .07); }

.hs-grp__h .hs-cat {
  align-self: center;
}

/* Inside a group the heading already names the category — repeating it on
   every row is noise. The flat "Explore" list keeps its tags. */
.hs-grp .hs-row .hs-cat {
  display: none;
}

/* =========================================================
   QUICK ANSWER
   ========================================================= */
.hs-qa {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  margin: 4px 0 16px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--hs-border-2);
  border-radius: 14px;
  background: linear-gradient(180deg, #F2F8FD 0%, #E7F2FB 100%);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.hs-qa::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--hs-accent);
}

.hs-qa:hover {
  border-color: var(--hs-accent);
  box-shadow: 0 10px 26px rgba(3, 84, 172, .12);
}

.hs-qa__tag {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--hs-accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hs-qa__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hs-qa__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--hs-ink-2);
}

.hs-qa__value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hs-ink);
}

.hs-qa__note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--hs-ink-2);
}

.hs-qa__cta {
  flex: 0 0 auto;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--hs-accent);
  white-space: nowrap;
}

.hs-qa__cta svg {
  width: 13px;
  height: 13px;
}

/* =========================================================
   RECENT PILLS · EMPTY STATE
   ========================================================= */
.hs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 6px 4px;
}

.hs-pill {
  padding: 6px 12px;
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  background: var(--hs-surface-2);
  color: var(--hs-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}

.hs-pill:hover {
  border-color: var(--hs-border-2);
  color: var(--hs-ink);
}

.hs-pill--clear {
  color: var(--hs-ink-3);
  background: none;
  border-style: dashed;
}

.hs-none {
  padding: 30px 16px 34px;
  text-align: center;
}

.hs-none__h {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hs-ink);
}

.hs-none__h strong {
  color: var(--hs-accent);
}

.hs-none__p {
  margin: 0;
  font-size: 13px;
  color: var(--hs-ink-2);
}

.hs-link {
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--hs-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* =========================================================
   FOOT — keyboard hints
   ========================================================= */
.hs__foot {
  flex: 0 0 auto;
  display: flex;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--hs-border);
  background: var(--hs-surface-2);
  font-size: 11px;
  color: var(--hs-ink-3);
}

.hs__foot kbd {
  display: inline-block;
  min-width: 17px;
  margin-right: 2px;
  padding: 1px 4px;
  border: 1px solid var(--hs-border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  color: var(--hs-ink-2);
}

/* =========================================================
   PAGE STATE — lock behind the sheet, mark the landing spot
   ========================================================= */
body.hs-locked {
  overflow: hidden;
}

.hs-pulse {
  animation: hs-pulse-anim 2.2s ease-out forwards;
}

@keyframes hs-pulse-anim {
  0%   { box-shadow: inset 0 0 0 0 rgba(3, 84, 172, 0); }
  18%  { box-shadow: inset 0 0 0 3px rgba(3, 84, 172, .45); }
  100% { box-shadow: inset 0 0 0 0 rgba(3, 84, 172, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hs__scrim,
  .hs__panel {
    animation: none;
  }

  .hs-pulse {
    animation: none;
  }
}

/* =========================================================
   TABLET — iPad portrait and down
   ========================================================= */
@media (max-width: 1024px) {
  .hs__panel {
    width: min(680px, calc(100vw - 40px));
    max-height: min(80vh, 640px);
    margin-top: 64px;
  }

  /* Touch targets, not mouse targets. */
  .hs-row {
    padding: 14px 12px;
  }

  .hs__close {
    width: 48px;
    height: 40px;
  }

  .hs__foot {
    display: none;
  }
}

/* =========================================================
   PHONE — the palette becomes the whole screen
   ========================================================= */
@media (max-width: 640px) {
  .hs__scrim {
    display: none;
  }

  .hs__panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: hs-fade .18s ease-out;
  }

  .hs__field {
    padding: 12px 12px;
    /* clear of the notch on an iPhone in portrait */
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .hs__meta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 12px 10px;
  }

  .hs__chips {
    margin: 0 -12px;
    padding: 0 12px 2px;
  }

  .hs__body {
    padding: 8px 8px calc(28px + env(safe-area-inset-bottom));
  }

  .hs-row {
    padding: 14px 10px;
    border-radius: 10px;
  }

  .hs-row__title {
    font-size: 14px;
  }

  .hs-row__snip {
    font-size: 12px;
  }

  /* The answer card stacks — the CTA has no room beside the value. */
  .hs-qa {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .hs-qa__body {
    flex-basis: 100%;
    order: 2;
  }

  .hs-qa__cta {
    order: 3;
    align-self: flex-start;
  }

  .hs-qa__value {
    font-size: 15.5px;
  }
}

@media (max-width: 380px) {
  .hs-row__go {
    display: none;
  }

  .hs__count {
    font-size: 11px;
  }
}
