/* Struktur və nümayəndəliklər — Desktop 12385:40762, Mobile 12530:39271.
 *
 * Mobile first. Tablet (768–1415) keeps the mobile cards and lays the lists out in two columns, as
 * the other inner pages do; desktop (1416+) is the 1440 composition.
 *
 * The design's strokes are drawn inside the card and count towards its size, so they are inset box
 * shadows here and the paddings include them: Figma's 8px padding inside a 2px stroke is 10px.
 */

.aayda-structure-page {
  /* Figma colours with no site token. */
  --aayda-structure-panel: #eceef1;
  --aayda-structure-featured: #133888;
  --aayda-structure-photo: #e4e7f5;
  --aayda-structure-role: #526071;
  --aayda-structure-office: #f4f5f7;
  --aayda-structure-link: #05349b;
  --aayda-structure-stroke: inset 0 0 0 var(--aayda-border-width-card) var(--aayda-colors-base-white);

  background-color: var(--aayda-colors-surface-disabled);
}

/* -------------------------------------------------------------------------- */
/* Page column and headings                                                   */
/* -------------------------------------------------------------------------- */

.aayda-structure {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 52px;
  width: 100%;
  min-width: 0;
  padding: var(--aayda-numbers-spacing-24) var(--aayda-numbers-spacing-16) 0;
}

.aayda-structure__block {
  min-width: 0;
}

/* The lede is the page record's LeadHtml: its paragraphs keep the description's own type and
 * spacing, as on the technical conditions page. */
.aayda-structure-page .aayda-top-block__description--html p {
  margin: 0;
}

/* Said only when nothing on the page is published yet. */
.aayda-structure__empty {
  margin: 0;
  color: var(--aayda-colors-text);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-medium);
  font-size: var(--aayda-typography-size-16);
  line-height: var(--aayda-typography-line-height-16);
}

.aayda-structure__heading {
  margin: 0 0 var(--aayda-numbers-spacing-16);
  color: var(--aayda-colors-text);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-bold);
  font-size: 22px;
  line-height: 32px;
  letter-spacing: -0.44px;
}

.aayda-structure__tier,
.aayda-structure__departments,
.aayda-structure-offices__list,
.aayda-structure-office__contacts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aayda-structure__item {
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* Leadership                                                                 */
/* -------------------------------------------------------------------------- */

.aayda-structure__leadership {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-structure__panel {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-12);
  padding: var(--aayda-numbers-spacing-12);
  background: var(--aayda-structure-panel);
  border-radius: var(--aayda-radius-card);
}

.aayda-structure__tier {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-structure-person {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--aayda-numbers-spacing-12);
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  color: var(--aayda-colors-text);
  text-decoration: none;
  background: var(--aayda-colors-surface-subtle);
  border-radius: var(--aayda-radius-accordion);
  box-shadow: var(--aayda-structure-stroke);
}

.aayda-structure-person--featured {
  color: var(--aayda-colors-text-on-brand);
  background: var(--aayda-structure-featured);
  box-shadow: none;
}

.aayda-structure-person__photo {
  flex: 0 0 104px;
  height: 108px;
  overflow: hidden;
  background: var(--aayda-structure-photo);
  border-radius: var(--aayda-radius-input);
}

.aayda-structure-person__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.aayda-structure-person__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-4);
  min-width: 0;
  font-family: var(--aayda-typography-font-primary);
  overflow-wrap: anywhere;
}

.aayda-structure-person__name {
  font-weight: var(--aayda-typography-weight-bold);
  font-size: 15px;
  line-height: 20px;
}

.aayda-structure-person__role {
  color: var(--aayda-colors-neutral-text-secondary);
  font-weight: var(--aayda-typography-weight-medium);
  font-size: var(--aayda-typography-size-12);
  line-height: 15px;
}

.aayda-structure-person--featured .aayda-structure-person__role {
  color: var(--aayda-colors-text-on-brand);
}

.aayda-structure-person__arrow {
  position: relative;
  display: flex;
  flex: 0 0 24px;
}

.aayda-structure-person__arrow img,
.aayda-structure-department__arrow img {
  display: block;
  width: 24px;
  height: 24px;
}

/* -------------------------------------------------------------------------- */
/* Departments                                                                */
/* -------------------------------------------------------------------------- */

.aayda-structure__departments {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--aayda-numbers-spacing-8);
  padding: var(--aayda-numbers-spacing-12);
  background: var(--aayda-structure-panel);
  border-radius: var(--aayda-radius-card);
}

.aayda-structure-department {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--aayda-numbers-spacing-16);
  height: 100%;
  min-height: 76px;
  padding: var(--aayda-numbers-spacing-16);
  color: var(--aayda-colors-text-label);
  text-decoration: none;
  background: var(--aayda-colors-surface-subtle);
  border-radius: var(--aayda-radius-accordion);
  box-shadow: var(--aayda-structure-stroke);
}

/* A section's card ("Protokol şöbəsi") is one step darker than the departments' in both frames: on
 * mobile #f3f4f6 against their #fafafb (Figma 12412:78815), on desktop #e9eaee against their #f3f4f6
 * (12385:40828, below in the desktop block). Two classes, so the wide-screen card colour further down
 * cannot paint over it; the hover rule (one part heavier) still wins, as Figma's hover does. */
.aayda-structure-department.aayda-structure-department--section {
  background: var(--aayda-colors-surface-disabled);
}

.aayda-structure-department__name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-semi-bold);
  font-size: var(--aayda-typography-size-14);
  line-height: var(--aayda-typography-line-height-14);
  overflow-wrap: anywhere;
}

.aayda-structure-department__arrow {
  position: relative;
  display: flex;
  flex: 0 0 24px;
}

.aayda-structure-person:focus-visible,
.aayda-structure-department:focus-visible,
.aayda-structure-office__value--link:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Representative offices                                                     */
/* -------------------------------------------------------------------------- */

.aayda-structure-offices {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 40px var(--aayda-numbers-spacing-16) 28px;
}

.aayda-structure-offices__inner {
  min-width: 0;
}

.aayda-structure-offices__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--aayda-numbers-spacing-12);
}

.aayda-structure-office {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 6px;
  background: var(--aayda-structure-office);
  border-radius: var(--aayda-radius-card);
  box-shadow: var(--aayda-structure-stroke);
}

.aayda-structure-office__name {
  margin: 0;
  padding: 10px var(--aayda-numbers-spacing-16);
  color: var(--aayda-colors-navy-900);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-semi-bold);
  font-size: var(--aayda-typography-size-16);
  line-height: 24px;
  overflow-wrap: anywhere;
}

.aayda-structure-office__contacts {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-6);
  padding: var(--aayda-numbers-spacing-14);
  background: var(--aayda-colors-surface);
  border-radius: var(--aayda-radius-accordion);
}

.aayda-structure-office__contact {
  display: flex;
  align-items: flex-start;
  gap: var(--aayda-numbers-spacing-8);
  min-width: 0;
}

.aayda-structure-office__icon {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.aayda-structure-office__text {
  min-width: 0;
  color: var(--aayda-colors-text);
  font-family: var(--aayda-typography-font-primary);
  font-size: var(--aayda-typography-size-12);
  line-height: var(--aayda-typography-line-height-12);
  letter-spacing: var(--aayda-typography-letter-spacing-12);
  overflow-wrap: anywhere;
}

.aayda-structure-office__label {
  font-weight: var(--aayda-typography-weight-medium);
}

.aayda-structure-office__value {
  color: var(--aayda-structure-link);
  font-weight: var(--aayda-typography-weight-semi-bold);
  text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/* Useful links — inner-page treatment, as on the leadership page             */
/* -------------------------------------------------------------------------- */

.aayda-structure-page .aayda-useful-links {
  max-width: none;
  width: 100%;
  height: 188px;
  margin-top: 0;
  background: #eceff0;
}

.aayda-structure-page .aayda-useful-links__viewport {
  padding: var(--aayda-numbers-spacing-36) var(--aayda-numbers-spacing-16);
}

/* A department that opens the dialog is a button, drawn exactly like the linked cards. */
button.aayda-structure-department {
  width: 100%;
  margin: 0;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

/* -------------------------------------------------------------------------- */
/* Department dialog — Figma "Department / Information dialog" 12433:82138    */
/* -------------------------------------------------------------------------- */

/* The layer that holds the panel dims the page behind it, closes the dialog when clicked beside the
 * panel (bug-fix-5 BUG 6, js/pages/structure.js), and centres the panel in the viewport (the annotated fix: the prototype's manual position, beside the clicked card, left the
 * dialog off-centre). The page behind stays locked while it is open (js/pages/structure.js). */
.aayda-structure-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  /* The panel sits in the middle of the visible viewport, wherever the page was scrolled and whichever
   * card opened it, and never closer than 16px to an edge. */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--aayda-numbers-spacing-16);
  /* bug-fix-5 BUG 6: the reference overlay colour is #A3A4A6 as rendered over the page. Figma's own
   * overlay setting (black at 24%) draws #B9B9BB on the page's #F3F4F6, and no black at 24% can reach
   * #A3A4A6; this translucent near-black draws exactly #A3A4A6 there (0.342 × (8, 9, 11) + 0.658 × (243,
   * 244, 246), rounded; 0.342 rather than 0.34 because browsers store the alpha in 8 bits and 0.34 drew
   * #A4A5A7), while the page behind stays visible through it, as an overlay should. */
  background: rgb(8 9 11 / 0.342);
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.aayda-structure-dialog[hidden] {
  display: none;
}

.aayda-structure-dialog.is-open {
  opacity: 1;
}

.aayda-structure-dialog__panel {
  position: relative;
  flex: 0 1 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-24);
  width: 640px;
  /* The layer's padding is the 16px margin; a taller text scrolls inside the panel, never past the
   * viewport. */
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--aayda-numbers-spacing-32);
  background: rgb(255 255 255 / 0.61);
  border-radius: var(--aayda-radius-footer);
  box-shadow: var(--aayda-structure-stroke), 0 1px 4px rgb(0 0 0 / 0.12);

  /* Figma's background blur of 53.2 is a CSS blur of half that. */
  -webkit-backdrop-filter: blur(26.6px);
  backdrop-filter: blur(26.6px);
}

.aayda-structure-dialog__caption {
  margin: 0;
  padding-right: 56px;
  color: var(--aayda-colors-neutral-text-secondary);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-semi-bold);
  font-size: var(--aayda-typography-size-14);
  line-height: normal;
  text-transform: uppercase;
}

.aayda-structure-dialog__body {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-20);
}

/* The name and the 1px rule under it: #364153 at 6%, 15px below the text, then 16px before the 20px
 * gap to the description. */
.aayda-structure-dialog__title {
  margin: 0 0 var(--aayda-numbers-spacing-16);
  padding-bottom: 15px;
  border-bottom: 1px solid rgb(54 65 83 / 0.06);
  color: var(--aayda-colors-navy-900);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-bold);
  font-size: var(--aayda-typography-size-24);
  line-height: var(--aayda-typography-line-height-heading-24);
  letter-spacing: var(--aayda-typography-letter-spacing-24);
  overflow-wrap: anywhere;
}

/* A unit with no description yet: the name and its rule close the panel, with no gap left under. */
.aayda-structure-dialog__body:has(> .aayda-structure-dialog__text[hidden]) .aayda-structure-dialog__title {
  margin-bottom: 0;
}

.aayda-structure-dialog__text {
  margin: 0;
  color: var(--aayda-colors-text);
  font-family: var(--aayda-typography-font-primary);
  font-weight: var(--aayda-typography-weight-semi-bold);
  font-size: var(--aayda-typography-size-16);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  overflow-wrap: anywhere;
  /* The description is the admin's plain text, set as textContent. Figma's description (12433:82138)
     breaks its lines with "\n", 26px apart, with no list indent, so a line break typed in the admin
     (each numbered item, for instance) starts a new line here too, and a long line wraps under it. */
  white-space: pre-line;
}

/* Close (Figma 12447:82187): 40px, white at 46%, 1px #e2e7ec, top 18 / right 22. Its hover variant
 * (12447:82184) fills #f3f4f6, has no stroke, and turns the cross #285afe. */
.aayda-structure-dialog__close {
  position: absolute;
  top: 18px;
  right: 22px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background: rgb(255 255 255 / 0.46);
  border: 1px solid #e2e7ec;
  border-radius: 20px;
  cursor: pointer;
  appearance: none;
  transition:
    background-color 0.3s ease-out,
    border-color 0.3s ease-out;
}

.aayda-structure-dialog__close img {
  display: block;
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease-out;
}

.aayda-structure-dialog__close::after {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  background-color: #285afe;
  -webkit-mask: url("../../assets/icons/structure-dialog-close.svg") center / 100% 100% no-repeat;
  mask: url("../../assets/icons/structure-dialog-close.svg") center / 100% 100% no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  content: "";
}

.aayda-structure-dialog__close:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
  background-color: var(--aayda-colors-surface-disabled);
  border-color: transparent;
}

.aayda-structure-dialog__close:focus-visible img {
  opacity: 0;
}

.aayda-structure-dialog__close:focus-visible::after {
  opacity: 1;
}

@media (hover: hover) {
  .aayda-structure-dialog__close:hover {
    background-color: var(--aayda-colors-surface-disabled);
    border-color: transparent;
  }

  .aayda-structure-dialog__close:hover img {
    opacity: 0;
  }

  .aayda-structure-dialog__close:hover::after {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aayda-structure-dialog,
  .aayda-structure-dialog__close,
  .aayda-structure-dialog__close img,
  .aayda-structure-dialog__close::after {
    transition: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Hover and keyboard focus                                                   */
/* -------------------------------------------------------------------------- */

/* The desktop design's prototype hovers (12385:40762), each a change to the component's hover variant
 * over 0.3s ease-out:
 *   PersonCard, chair (12527:38711 → 12527:38710): the fill darkens to #0c3fad; the portrait's crop
 *     narrows from 0.726 to 0.698 of the image's width — a 1.04× zoom about the frame's centre.
 *   PersonCard (12109:73449 → 12433:82174) — the deputies and the chief of staff: fill #fafafb at 71%,
 *     shadow 0 2 4 #000 4%, name #112757, role #133888, arrow #3363ff; the crop narrows from 0.579 to
 *     0.520 — a 1.114× zoom about the frame's centre.
 *   Department (12321:5282 → 12336:78132): fill #fafafb, name #133888, the arrow #112757 → #3363ff.
 *   Every card's arrow keeps its place: only its colour changes (the annotated fix — the department
 *   arrow used to turn 45°). The chair's arrow goes #e8ecf2 → #00f296 (12527:38711 → 12527:38710).
 *   Office card (12385:39902 → 12385:40099): fill #d4d9e3 at 14%, title #133888.
 * The portrait's frame keeps its size and clips the picture in both variants, so the zoom never
 * reaches past the card. The advisers' cards and the mobile design carry no interaction. The chief of
 * staff's card hovers but leads nowhere, like the office cards, so it stays a plain card. Pointer
 * hover only — a touch screen keeps no sticky state — and the same look on keyboard focus, under the
 * focus ring. */

.aayda-structure-person,
.aayda-structure-department,
.aayda-structure-office {
  transition:
    background-color 0.3s ease-out,
    box-shadow 0.3s ease-out;
}

.aayda-structure-person__name,
.aayda-structure-person__role,
.aayda-structure-department__name,
.aayda-structure-office__name {
  transition: color 0.3s ease-out;
}

.aayda-structure-person__image {
  transition: transform 0.3s ease-out;
}

/* The person arrow's hover colour: the same icon as a mask, filled #3363ff — Figma's hover arrow is
 * that file with only its stroke colour changed. */
.aayda-structure-person:not(.aayda-structure-person--featured) .aayda-structure-person__arrow::after {
  position: absolute;
  inset: 0;
  background-color: var(--aayda-colors-blue-400);
  -webkit-mask: url("../../assets/icons/structure-arrow-person.svg") center / 100% 100% no-repeat;
  mask: url("../../assets/icons/structure-arrow-person.svg") center / 100% 100% no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  content: "";
}

.aayda-structure-person:not(.aayda-structure-person--featured) .aayda-structure-person__arrow img {
  transition: opacity 0.3s ease-out;
}

/* The chair's and the departments' arrows change colour the same way: the same icon as a mask, in the
 * hover variant's colour, faded in over the default one. */
.aayda-structure-person--featured .aayda-structure-person__arrow::after,
.aayda-structure-department__arrow::after {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--aayda-structure-arrow-mask) center / 100% 100% no-repeat;
  mask: var(--aayda-structure-arrow-mask) center / 100% 100% no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  content: "";
}

.aayda-structure-person--featured .aayda-structure-person__arrow::after {
  --aayda-structure-arrow-mask: url("../../assets/icons/structure-arrow-on-brand.svg");
  background-color: var(--aayda-colors-green-600);
}

.aayda-structure-department__arrow::after {
  --aayda-structure-arrow-mask: url("../../assets/icons/structure-arrow-department.svg");
  background-color: var(--aayda-colors-blue-400);
}

.aayda-structure-person--featured .aayda-structure-person__arrow img,
.aayda-structure-department__arrow img {
  transition: opacity 0.3s ease-out;
}

.aayda-structure-person--featured:focus-visible {
  background-color: #0c3fad;
}

.aayda-structure-person--featured:focus-visible .aayda-structure-person__image {
  transform: scale(1.04);
}

.aayda-structure-person--featured:focus-visible .aayda-structure-person__arrow::after {
  opacity: 1;
}

.aayda-structure-person--featured:focus-visible .aayda-structure-person__arrow img {
  opacity: 0;
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible {
  background-color: rgb(250 250 251 / 0.71);
  box-shadow: var(--aayda-structure-stroke), 0 2px 4px rgb(0 0 0 / 0.04);
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible .aayda-structure-person__name {
  color: var(--aayda-colors-navy-900);
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible .aayda-structure-person__role {
  color: var(--aayda-structure-featured);
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible .aayda-structure-person__image {
  transform: scale(1.114);
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible .aayda-structure-person__arrow::after {
  opacity: 1;
}

a.aayda-structure-person:not(.aayda-structure-person--featured):focus-visible .aayda-structure-person__arrow img {
  opacity: 0;
}

.aayda-structure-department:is(a, button):focus-visible {
  background-color: var(--aayda-colors-surface-subtle);
}

.aayda-structure-department:is(a, button):focus-visible .aayda-structure-department__name {
  color: var(--aayda-structure-featured);
}

.aayda-structure-department:is(a, button):focus-visible .aayda-structure-department__arrow::after {
  opacity: 1;
}

.aayda-structure-department:is(a, button):focus-visible .aayda-structure-department__arrow img {
  opacity: 0;
}

@media (hover: hover) {
  .aayda-structure-person--featured:hover {
    background-color: #0c3fad;
  }

  .aayda-structure-person--featured:hover .aayda-structure-person__image {
    transform: scale(1.04);
  }

  .aayda-structure-person--featured:hover .aayda-structure-person__arrow::after {
    opacity: 1;
  }

  .aayda-structure-person--featured:hover .aayda-structure-person__arrow img {
    opacity: 0;
  }

  /* The deputies' links, the chief of staff's card and an unplaced leader's plain card in the deputies'
   * row: the second PersonCard's hover. */
  :is(a.aayda-structure-person:not(.aayda-structure-person--featured), .aayda-structure__tier--single div.aayda-structure-person, .aayda-structure__tier--row div.aayda-structure-person):hover {
    background-color: rgb(250 250 251 / 0.71);
    box-shadow: var(--aayda-structure-stroke), 0 2px 4px rgb(0 0 0 / 0.04);
  }

  :is(a.aayda-structure-person:not(.aayda-structure-person--featured), .aayda-structure__tier--single div.aayda-structure-person, .aayda-structure__tier--row div.aayda-structure-person):hover .aayda-structure-person__name {
    color: var(--aayda-colors-navy-900);
  }

  :is(a.aayda-structure-person:not(.aayda-structure-person--featured), .aayda-structure__tier--single div.aayda-structure-person, .aayda-structure__tier--row div.aayda-structure-person):hover .aayda-structure-person__role {
    color: var(--aayda-structure-featured);
  }

  :is(a.aayda-structure-person:not(.aayda-structure-person--featured), .aayda-structure__tier--single div.aayda-structure-person, .aayda-structure__tier--row div.aayda-structure-person):hover .aayda-structure-person__image {
    transform: scale(1.114);
  }

  /* The advisers' cards carry no prototype interaction in Figma. Their portraits zoom by the same
   * 1.114 as the other non-chair PersonCard so every picture on the page answers the pointer alike —
   * a page decision, not a Figma state. The picture alone moves; the card keeps its colours. */
  .aayda-structure__tier--advisers .aayda-structure-person:hover .aayda-structure-person__image {
    transform: scale(1.114);
  }

  a.aayda-structure-person:not(.aayda-structure-person--featured):hover .aayda-structure-person__arrow::after {
    opacity: 1;
  }

  a.aayda-structure-person:not(.aayda-structure-person--featured):hover .aayda-structure-person__arrow img {
    opacity: 0;
  }

  .aayda-structure-department:is(a, button):hover {
    background-color: var(--aayda-colors-surface-subtle);
  }

  .aayda-structure-department:is(a, button):hover .aayda-structure-department__name {
    color: var(--aayda-structure-featured);
  }

  .aayda-structure-department:is(a, button):hover .aayda-structure-department__arrow::after {
    opacity: 1;
  }

  .aayda-structure-department:is(a, button):hover .aayda-structure-department__arrow img {
    opacity: 0;
  }

  /* The office card is not a link; Figma's hover tints it while the pointer is over it, and its e-mail
   * link stays the one thing to act on. */
  .aayda-structure-office:hover {
    background-color: rgb(212 217 227 / 0.14);
  }

  .aayda-structure-office:hover .aayda-structure-office__name {
    color: var(--aayda-structure-featured);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aayda-structure-person,
  .aayda-structure-department,
  .aayda-structure-office,
  .aayda-structure-person__name,
  .aayda-structure-person__role,
  .aayda-structure-person__image,
  .aayda-structure-department__name,
  .aayda-structure-office__name,
  .aayda-structure-department__arrow img,
  .aayda-structure-person__arrow img,
  .aayda-structure-person__arrow::after,
  .aayda-structure-department__arrow::after {
    transition: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Tablet: the mobile cards, two to a row                                     */
/* -------------------------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1415px) {
  .aayda-structure__tier--row,
  .aayda-structure__tier--advisers,
  .aayda-structure__departments,
  .aayda-structure-offices__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The chair and the chief of staff stay alone on their rows, one column wide and centred, so the
   * tiers still read as an organisation chart. */
  .aayda-structure__tier--single {
    flex-direction: row;
    justify-content: center;
  }

  .aayda-structure__tier--single > .aayda-structure__item {
    flex: 0 1 calc((100% - var(--aayda-numbers-spacing-12)) / 2);
  }
}

/* From 1024 the three-card rows of the desktop design fit: the deputies, the departments and the
 * offices go three to a row, and the chair and the chief of staff take one column's width. The
 * advisers stay two to a row — four of the mobile card do not fit before desktop. */
@media (min-width: 1024px) and (max-width: 1415px) {
  .aayda-structure__tier--row,
  .aayda-structure__departments,
  .aayda-structure-offices__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .aayda-structure__tier--single > .aayda-structure__item {
    flex-basis: calc((100% - 2 * var(--aayda-numbers-spacing-12)) / 3);
  }
}

/* -------------------------------------------------------------------------- */
/* Desktop 1440 composition                                                   */
/* -------------------------------------------------------------------------- */

@media (min-width: 1416px) {
  /* The design's 259px top block, as the other inner pages pin it. */
  .aayda-structure-page .aayda-top-block {
    height: 259px;
    min-height: 259px;
  }

  .aayda-structure {
    gap: 60px;
    max-width: calc(var(--aayda-container-content) + 2 * var(--aayda-numbers-spacing-84));
    margin: 0 auto;
    padding: 80px var(--aayda-numbers-spacing-84) 0;
  }

  .aayda-structure__heading {
    margin-bottom: var(--aayda-numbers-spacing-20);
    font-size: var(--aayda-typography-size-24);
    line-height: 36px;
    letter-spacing: var(--aayda-typography-letter-spacing-24);
  }

  /* One panel holds every tier: the board's and the advisers' panels lose their own frame. */
  .aayda-structure__leadership {
    gap: var(--aayda-numbers-spacing-16);
    padding: var(--aayda-numbers-spacing-28);
    background: var(--aayda-structure-panel);
    border-radius: var(--aayda-radius-card);
  }

  .aayda-structure__panel {
    gap: var(--aayda-numbers-spacing-16);
    padding: 0;
    background: none;
    border-radius: 0;
  }

  .aayda-structure__tier--single {
    flex-direction: row;
    justify-content: center;
  }

  .aayda-structure__tier--single > .aayda-structure__item {
    flex: 0 1 calc((100% - 2 * var(--aayda-numbers-spacing-24)) / 3);
  }

  .aayda-structure__tier--row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-24);
  }

  .aayda-structure__tier--advisers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-16);
  }

  .aayda-structure-person {
    min-height: 160px;
    padding: 10px 18px 10px 10px;
  }

  .aayda-structure-person--featured {
    gap: var(--aayda-numbers-spacing-16);
    padding: 10px;
  }

  .aayda-structure-person__photo {
    flex-basis: 149px;
    height: 140px;
  }

  .aayda-structure-person__name {
    font-size: var(--aayda-typography-size-16);
  }

  .aayda-structure-person__role {
    color: var(--aayda-structure-role);
    font-size: var(--aayda-typography-size-14);
  }

  .aayda-structure-person--featured .aayda-structure-person__role {
    color: var(--aayda-colors-text-on-brand);
  }

  /* The arrow sits in the card's top right corner on desktop, out of the row. */
  .aayda-structure-person__arrow {
    position: absolute;
    top: 8px;
    right: 11px;
  }

  .aayda-structure-person--featured .aayda-structure-person__arrow {
    top: 10px;
    right: 9px;
  }

  .aayda-structure-person__arrow img,
  .aayda-structure-department__arrow img {
    width: 29px;
    height: 29px;
  }

  /* The chief of staff's card (Figma 12385:40793): the name's line is 23.2px, the advisers' too. */
  .aayda-structure__tier--single .aayda-structure-person:not(.aayda-structure-person--featured) .aayda-structure-person__name {
    line-height: 23.2px;
  }

  /* Advisers: the design's smaller card, four to a row. */
  .aayda-structure__tier--advisers .aayda-structure-person {
    min-height: 152px;
    padding: 9px 12px 9px 10px;
  }

  /* Every adviser's frame is the design's 137 × 134 whatever the name's length: the frame never shrinks
   * (it did at 0 1 137px, so a long name such as "Mahmud Məmmədəliyev" narrowed its portrait to ~109px);
   * the name wraps in the text column beside it instead. */
  .aayda-structure__tier--advisers .aayda-structure-person__photo {
    flex: 0 0 137px;
    height: 134px;
  }

  .aayda-structure__tier--advisers .aayda-structure-person__text {
    gap: 4.8px;
  }

  .aayda-structure__tier--advisers .aayda-structure-person__name {
    line-height: 23.2px;
  }

  .aayda-structure__tier--advisers .aayda-structure-person__role {
    color: var(--aayda-colors-text);
    line-height: 20.3px;
  }

  .aayda-structure__departments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-24);
    padding: var(--aayda-numbers-spacing-28);
  }

  .aayda-structure-department {
    min-height: 96px;
    padding: 22px;
    background: var(--aayda-colors-surface-disabled);
  }

  .aayda-structure-department__name {
    font-size: var(--aayda-typography-size-16);
    line-height: var(--aayda-typography-line-height-16);
    letter-spacing: var(--aayda-typography-letter-spacing-16);
  }

  .aayda-structure-department__arrow {
    flex-basis: 29px;
  }

  .aayda-structure-department.aayda-structure-department--section {
    background: #e9eaee;
  }

  /* The offices band runs the page's full width, its cards on a 1208px column. */
  .aayda-structure-offices {
    margin: 60px 0 80px;
    padding: var(--aayda-numbers-spacing-48) var(--aayda-numbers-spacing-16) 60px;
    background: var(--aayda-structure-panel);
    border-radius: var(--aayda-radius-card);
  }

  .aayda-structure-offices__inner {
    max-width: 1208px;
    margin: 0 auto;
  }

  .aayda-structure-offices .aayda-structure__heading {
    margin-bottom: var(--aayda-numbers-spacing-24);
  }

  .aayda-structure-offices__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--aayda-numbers-spacing-24);
  }

  /* Here the design's 4px padding is measured from the card's edge, not from inside its stroke. */
  .aayda-structure-office {
    gap: var(--aayda-numbers-spacing-4);
    padding: var(--aayda-numbers-spacing-4);
  }

  .aayda-structure-office__name {
    padding: 11px var(--aayda-numbers-spacing-16);
    letter-spacing: -0.176px;
  }

  .aayda-structure-office__contacts {
    gap: var(--aayda-numbers-spacing-4);
    padding: var(--aayda-numbers-spacing-16);
  }

  .aayda-structure-page .aayda-useful-links {
    height: 251px;
    border-radius: var(--aayda-radius-footer) var(--aayda-radius-footer) 0 0;
  }

  .aayda-structure-page .aayda-useful-links__viewport {
    box-sizing: border-box;
    width: 1440px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 58px var(--aayda-numbers-spacing-84);
  }

  .aayda-structure-page .aayda-useful-links__item,
  .aayda-structure-page .aayda-useful-links__card {
    flex-basis: 299px;
    width: 299px;
  }
}
