@font-face {
  font-family: Noto Arabic;
  src: url("assets/NotoSansArabic-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Noto Arabic;
  src: url("assets/NotoSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  font-family: Noto Arabic, Tahoma, sans-serif;
  color: #101e3b;
  background: #fff;
  --paper: #f4f6fb;
  --ink: #101e3b;
  --navy: #0b1635;
  --blue: #214abc;
  --blue-dark: #173785;
  --accent: #f9df68;
  --muted: #465671;
  --line: #dbe2ee;
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --section-space: clamp(2.9rem, 6.5vw, 6rem);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #3862d1; outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font-size: clamp(1.85rem, 4.15vw, 3.25rem); line-height: 1.35; }
p { line-height: 1.85; }
.wrap { width: min(1220px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: fixed; z-index: 5; inset-inline-start: 1rem; top: -6rem; padding: .5rem 1rem; background: #fff; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }

.trial {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem 1rem;
  border: 0;
  color: #fff;
  background: var(--blue);
  font-size: .875rem;
  font-weight: 700;
}
.trial:hover { background: var(--blue-dark); }
.trial-divider { width: 1px; height: .875rem; background: #ffffff75; }

.header { background: #fff; }
.header-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; line-height: 1.55; }
.brand b, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .875rem; }
.brand-mark { display: block; flex: none; width: 48px; height: 48px; object-fit: contain; }
.header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem clamp(.6rem, 2.4vw, 2rem); }
.header nav a { display: block; padding-block: .65rem; font-size: .9375rem; font-weight: 700; text-decoration: none; }
.header nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: .4em; }
.header .nav-contact { padding-inline: .85rem; border: 1px solid #d1dcf1; border-radius: .45rem; color: var(--blue-dark); }

.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: radial-gradient(ellipse at 24% 50%, #234c9f, transparent 64%), var(--navy);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("assets/club-pitch.webp") center 38% / cover no-repeat;
  mix-blend-mode: luminosity;
  opacity: .24;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  min-height: clamp(460px, 43vw, 620px);
}
.hero-copy { position: relative; z-index: 1; padding-block: clamp(2rem, 5.1vw, 5rem); }
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: fit-content;
  color: var(--accent);
  font-size: clamp(.875rem, 1.45vw, 1.05rem);
  font-weight: 700;
}
.hero-eyebrow::before { content: ""; width: 1.7rem; height: 2px; flex-shrink: 0; background: currentColor; }
.hero-title-prefix { margin-block-start: clamp(1rem, 2.8vw, 2.2rem); color: #d7e3ff; font-size: clamp(1rem, 1.7vw, 1.35rem); }
.hero h1 { font-size: clamp(3.35rem, 7.05vw, 6.35rem); line-height: 1.09; margin-block: .05em .14em; }
.hero h1 span { display: block; color: #a9c7ff; }
.hero-role { color: #eef3ff; font-size: clamp(1.05rem, 2vw, 1.45rem); }
.hero .actions { margin-block-start: clamp(1.05rem, 2.8vw, 2.05rem); }

.hero-visual {
  position: relative;
  align-self: stretch;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-width: 0;
  overflow: hidden;
}
.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% 6% auto;
  aspect-ratio: 1;
  border: 1px solid #bdd6ff63;
  border-radius: 50%;
  background: radial-gradient(circle, #5b8ffa5c, #294fa31f 70%);
  box-shadow: 0 0 0 clamp(.85rem, 2.6vw, 2.1rem) #90b5ff21, 0 0 0 clamp(1.7rem, 5.2vw, 4.2rem) #90b5ff12;
}
.hero-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -20% 23%;
  height: 20%;
  border-block: 1px solid #bdd6ff48;
  transform: skewY(-14deg);
}
.hero-portrait {
  display: block;
  justify-self: center;
  width: 108%;
  height: auto;
  filter: drop-shadow(0 1.3rem 2rem #07102b77);
}
.hero-number {
  position: absolute;
  inset-block-start: 15%;
  inset-inline-end: 2.5%;
  display: grid;
  justify-items: center;
  min-width: 5.3rem;
  padding: .45rem .65rem .65rem;
  border-block-start: 2px solid var(--accent);
  background: #0a1737e8;
  color: #fff;
  font-weight: 700;
}
.hero-number strong { color: var(--accent); font-size: clamp(3.25rem, 7.2vw, 6.55rem); line-height: 1; }
.hero-number span { font-size: .875rem; white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: .55rem 1.15rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
}
.button-solid { background: var(--accent); color: var(--navy); }
.button-solid:hover { background: #fff0a4; }
.button-outline { border-color: #9ab2e1; background: #1126539e; color: #fff; }
.button-outline:hover { background: #254681; }
.button-dark { background: var(--blue-dark); color: #fff; }
.button-dark:hover { background: var(--navy); }
.button-light { background: #fff; border-color: #b4c4e4; color: var(--blue-dark); }
.button-light:hover { background: #ecf2ff; }
.hero :focus-visible, .footer :focus-visible, .election-card :focus-visible { outline-color: var(--accent); }

.hero-facts { background: #f0f4fc; color: var(--ink); border-block-end: 1px solid var(--line); }
.hero-facts-inner { display: grid; grid-template-columns: 1fr 1.16fr .63fr; }
.hero-facts a, .hero-facts button {
  display: flex;
  gap: .8rem;
  align-items: center;
  min-width: 0;
  min-height: 87px;
  padding: .65rem clamp(.7rem, 2vw, 1.5rem);
  border: 0;
  border-inline-start: 1px solid var(--line);
  background: none;
  color: inherit;
  text-align: start;
  text-decoration: none;
  line-height: 1.5;
}
.hero-facts button { border-inline-end: 1px solid var(--line); }
.hero-facts a:hover, .hero-facts button:hover { background: #e1ebfe; }
.hero-facts :focus-visible { outline-color: var(--blue); outline-offset: -4px; }
.hero-facts small { display: block; color: var(--muted); font-size: .875rem; }
.hero-facts time, .hero-facts strong { display: block; font-weight: 700; margin-block-start: .17rem; }
.fact-icon {
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #dae6ff;
  color: var(--blue-dark);
  object-fit: cover;
}
.fact-calendar::before { content: ""; width: .95rem; height: .85rem; border: 2px solid currentColor; border-radius: .2rem; }
.fact-calendar::after { content: ""; position: absolute; width: .95rem; border-block-start: 2px solid currentColor; margin-block-start: -.35rem; }
.fact-place::before { content: ""; width: .84rem; height: .84rem; border: 2px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); margin-block-start: -.15rem; }
.fact-place::after { content: ""; position: absolute; width: .3rem; height: .3rem; border-radius: 50%; background: currentColor; margin-block-start: -.15rem; }

.team { background: #fff; }
.team-inner { padding-block: var(--section-space); }
.team-heading { margin-block-end: clamp(1.55rem, 3.5vw, 2.5rem); }
.team-heading h2 span { color: var(--blue); white-space: nowrap; }
.team-group + .team-group { margin-block-start: clamp(1.9rem, 4.35vw, 3.5rem); }
.team-group h3 {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding-block: .7rem;
  margin-block-end: .75rem;
  border-block: 1px solid var(--line);
  color: var(--blue-dark);
  font-size: clamp(1rem, 1.85vw, 1.24rem);
  line-height: 1.45;
}
.team-group h3::before { content: ""; width: .5rem; height: .5rem; flex: none; background: #c28a27; transform: skew(-12deg); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.65rem, 1.5vw, 1.15rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.team-senior .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-leadership .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-junior .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 805px; }
.candidate {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #fff;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.candidate-without-photo { align-self: start; height: auto; grid-template-rows: 1fr; background: var(--paper); }
.candidate-without-photo .candidate-copy { padding: clamp(.85rem, 2vw, 1.35rem); background: none; }
.candidate:focus-within { border-color: #6789d1; box-shadow: 0 .6rem 1.5rem #1229511a; }
.candidate-photo {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.23;
  overflow: hidden;
  background: radial-gradient(ellipse at 49% 54%, #f3f7ff 0%, #c9d9f5 80%);
}
.candidate-photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22% 42% -28% -22%;
  border: 1px solid #fff9;
  transform: skewX(-23deg);
  background: #ffffff30;
}
.team-leadership .candidate-photo, .team-junior .candidate-photo { aspect-ratio: 1.6; }
.team-leadership .candidate:first-child .candidate-photo { background: radial-gradient(ellipse at 49% 52%, #7197f6, #224bad 84%); }
.team-leadership .candidate:first-child .candidate-photo::before { background: #a4beff2c; border-color: #d2e3ff75; }
.candidate-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.candidate-photo-original img { object-fit: cover; object-position: center top; }
.candidate-photo-original img[src$="profile-mohamed-abd-rabo.webp"],
.candidate-dialog-original img[src$="profile-mohamed-abd-rabo.webp"] { object-position: center 18%; }
.candidate-photo-original img[src$="profile-mohamed-madbouly.webp"],
.candidate-dialog-original img[src$="profile-mohamed-madbouly.webp"] { object-position: center 19%; }
.candidate-copy {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: .77rem clamp(.6rem, 1.25vw, .95rem);
  border-block-start: 2px solid #a9bfeb;
}
.team-leadership .candidate:first-child .candidate-copy { border-color: #dba94b; }
.candidate-copy h4 { font-size: clamp(.98rem, 1.47vw, 1.2rem); line-height: 1.45; }
.team-leadership .candidate-copy h4 { font-size: clamp(1.05rem, 1.9vw, 1.48rem); }
.candidate-role { margin-block-start: .24rem; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.candidate-number {
  position: absolute;
  inset-block-start: clamp(.4rem, .95vw, .75rem);
  inset-inline-end: clamp(.4rem, .95vw, .75rem);
  display: grid;
  place-items: center;
  min-width: clamp(2rem, 3.55vw, 3rem);
  min-height: clamp(2rem, 3.55vw, 3rem);
  padding-inline: .25rem;
  border-radius: .3rem;
  background: var(--navy);
  color: #fff;
  font-size: clamp(1.3rem, 2.35vw, 1.85rem);
  line-height: 1;
}
.team-leadership .candidate:first-child .candidate-number { background: var(--accent); color: var(--navy); }
.candidate-profile {
  align-self: flex-start;
  margin-block-start: auto;
  min-height: 44px;
  padding: .22rem .7rem;
  border: 1px solid #b3c8ec;
  border-radius: .38rem;
  background: #edf3ff;
  color: var(--blue-dark);
  font-size: .875rem;
  font-weight: 700;
}
.candidate-profile:hover, .candidate-profile:focus-visible { background: #dfeaff; }
.content { display: grid; grid-template-columns: .87fr 1.13fr; gap: clamp(1.25rem, 5vw, 4rem); padding-block: var(--section-space); }
.content p { color: var(--muted); margin-block-start: .55rem; }
.about-section { background: var(--paper); border-block: 1px solid var(--line); }
.about { align-items: start; }
.about h2 { max-width: 12ch; }
.about-bio { padding-inline-start: clamp(.9rem, 2.25vw, 1.75rem); border-inline-start: 3px solid #c58c2e; }
.about-bio p:first-child { color: var(--ink); font-size: clamp(1.05rem, 1.55vw, 1.19rem); margin: 0; }

.election { background: #e8effc; border-block-end: 1px solid #d3dff2; }
.election-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: stretch;
  padding-block: var(--section-space);
}
.election-card, .election-details { padding: clamp(1.3rem, 4vw, 3.4rem); }
/* Entrance photo from Wikimapia, converted to WebP, CC BY-SA 3.0.
   https://wikimapia.org/1477784/El-Nasr-Sporting-Club
   https://creativecommons.org/licenses/by-sa/3.0/ */
.election-card {
  border-radius: 0 .8rem .8rem 0;
  color: #fff;
  background:
    linear-gradient(90deg, #0b163580, #0b1635e8 75%),
    linear-gradient(0deg, #0b1635c4, #0b16352e 65%),
    url("assets/club-entrance.webp") center 58% / cover no-repeat var(--navy);
}
.election-card h2 { display: flex; align-items: center; gap: .65rem; font-size: clamp(1.12rem, 2vw, 1.42rem); }
.election-card h2::before { content: ""; width: 1.4rem; height: 2px; background: var(--accent); }
.election-date { display: flex; flex-direction: column; gap: .28rem; margin-block: 1.35rem 1rem; color: var(--accent); line-height: 1.2; }
.election-date strong { font-size: clamp(2.65rem, 6vw, 4.9rem); }
.election-date span { font-size: 1.2rem; }
.election-card p { color: #e7efff; }
.election-details { border: 1px solid #cad8ef; border-inline-start: 0; border-radius: .8rem 0 0 .8rem; background: #fff; }
.election-details dl { display: grid; gap: .85rem; margin: 0; }
.election-details dl div { padding-block-end: .85rem; border-block-end: 1px solid var(--line); }
.election-details dt { color: var(--blue-dark); font-weight: 700; }
.election-details dd { margin: .2rem 0 0; line-height: 1.75; }
.election-details dl div:last-child { padding-block-end: 0; border-block-end: 0; }

.programme { background: var(--paper); border-block: 1px solid var(--line); }
.topics { padding: 1.35rem; background: #fff; border: 1px solid var(--line); border-radius: .65rem; }
.topics h3 { font-size: 1rem; margin-block-end: .65rem; }
.topic {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin-block: .35rem;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--paper);
  color: var(--blue-dark);
  text-align: start;
}
.topic:hover { background: #eaf0ff; }
.topic-icon { font-family: sans-serif; font-size: 1.25rem; width: 1.7rem; text-align: center; }

.questions { align-items: center; }
.questions-intro {
  padding: clamp(1.2rem, 3.5vw, 2rem);
  border: 1px solid #324b7f;
  border-block-start: 3px solid #3763cb;
  border-radius: .7rem;
  background:
    linear-gradient(90deg, #0b16358f, #0b1635ef 76%),
    linear-gradient(0deg, #0b1635b8, #0b16353d 70%),
    url("assets/club-pool.webp") center 66% / cover no-repeat var(--navy);
  color: #fff;
}
.questions-intro p { color: #f1f5ff; }
.questions-intro :focus-visible { outline-color: var(--accent); }
.questions-intro .button-dark { background: var(--accent); color: var(--navy); }
.questions-intro .button-dark:hover { background: #fff0a4; }
.questions h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
.contact-avatar { display: block; border: 2px solid #8aa6f3; border-radius: 50%; background: var(--blue); margin-block-end: .65rem; }
.questions .actions { margin-block-start: .9rem; }
.faq { border-block-start: 1px solid var(--line); }
.faq details { border-block-end: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: .85rem; font-weight: 700; }
.faq summary:hover { color: var(--blue-dark); }
.faq details p { margin-block: 0 .8rem; }
.footer { padding-block: 1.65rem 4.5rem; background: var(--navy); color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer .brand-mark { width: 44px; height: 44px; }
.footer p, .footer small { color: #d5e1fa; font-size: .875rem; }
.footer small { display: inline-block; }

@media (max-width: 1000px) {
  .team-senior .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-senior .candidate-photo { aspect-ratio: 1.4; }
}

@media (max-width: 760px) {
  .header-inner { flex-direction: column; align-items: start; gap: .55rem; padding-block: .6rem .3rem; }
  .header nav { width: 100%; gap: 0; justify-content: space-between; border-block-start: 1px solid var(--line); }
  .header nav a, .header .nav-contact { display: flex; align-items: center; min-height: 44px; padding: .3rem .2rem; border: 0; font-size: .875rem; text-align: center; line-height: 1.4; }
  .header nav a:first-child { padding-inline-start: 0; }
  .header nav a:last-child { padding-inline-end: 0; }
  .brand-mark { width: 41px; height: 41px; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding-block: 1.55rem .65rem; }
  .hero h1 { font-size: clamp(2.88rem, 12.2vw, 4.75rem); }
  .hero-visual { width: min(100%, 450px); margin-inline: auto; }
  .hero-visual::before { inset-block-start: 11%; }
  .hero-portrait { width: 100%; }
  .hero-number { inset-block-start: 10%; inset-inline-end: 0; padding: .3rem .45rem .45rem; min-width: 4.35rem; }
  .hero-number strong { font-size: clamp(2.75rem, 10vw, 4.55rem); }
  .hero-facts-inner { grid-template-columns: 1fr 1fr; }
  .hero-facts a, .hero-facts button { min-height: 67px; padding: .6rem .55rem; gap: .45rem; font-size: .875rem; }
  .hero-facts a:nth-child(2) { border-inline-end: 1px solid var(--line); }
  .hero-facts button { grid-column: 1 / -1; min-height: 50px; border-block-start: 1px solid var(--line); }
  .hero-facts button small { display: none; }
  .fact-icon { flex-basis: 1.85rem; width: 1.85rem; height: 1.85rem; }
  .team .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team .candidate-photo { aspect-ratio: 1.16; }
  .team-leadership .candidate:first-child { grid-column: 1 / -1; }
  .team-leadership .candidate:first-child .candidate-photo { aspect-ratio: 1.65; }
  .team-leadership .candidate:first-child h4 { font-size: 1.27rem; }
  .content, .election-inner { grid-template-columns: 1fr; }
  .about h2 { max-width: none; }
  .election-card { border-radius: .7rem .7rem 0 0; }
  .election-details { border-inline-start: 1px solid #cad8ef; border-block-start: 0; border-radius: 0 0 .7rem .7rem; }
  .footer-inner { align-items: start; flex-direction: column; }
}

@media (max-width: 370px) {
  .button { padding-inline: .7rem; font-size: .875rem; }
  .hero-facts a .fact-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.chat-launch {
  position: fixed;
  z-index: 3;
  inset-inline-end: max(1.4rem, env(safe-area-inset-left));
  inset-block-end: max(1.4rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 58px;
  padding: .4rem .5rem .4rem 1rem;
  border: 1px solid #adc5ff;
  border-radius: 50px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 30px #101c384a;
}
.chat-launch:hover { background: var(--blue-dark); }
.chat-launch img, .chat-head img { border-radius: 50%; background: #e4edff; object-fit: cover; }
dialog { padding: 0; border: 1px solid var(--line); color: #18243b; border-radius: 16px; box-shadow: 0 20px 70px #101c384a; }
dialog::backdrop { background: #101c3877; }
.candidate-dialog {
  inline-size: min(40rem, calc(100% - 1.5rem));
  max-block-size: calc(100dvh - 1.5rem);
  border: 0;
  border-radius: 1.05rem;
  background: #fff;
  overscroll-behavior: contain;
}
.candidate-dialog::backdrop {
  background: #08142ab8;
  backdrop-filter: blur(4px);
}
.candidate-dialog-close {
  position: sticky;
  z-index: 2;
  inset-block-start: 0;
  block-size: 0;
}
.candidate-dialog-close .close {
  position: absolute;
  inset-block-start: .75rem;
  inset-inline-end: .75rem;
  inline-size: 44px;
  block-size: 44px;
  border-color: #94a8d5;
  background: var(--navy);
  color: #fff;
}
.candidate-dialog-close .close:hover { background: var(--blue-dark); }
.candidate-dialog-close .close:focus-visible { outline-color: var(--accent); }

.candidate-dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(6.2rem, 24vw, 10.25rem);
  align-items: center;
  gap: clamp(.8rem, 3.2vw, 1.5rem);
  padding: 1.5rem clamp(1rem, 4vw, 1.8rem);
  padding-inline-end: 4.25rem;
  border-block-end: 3px solid #d9af48;
  background: radial-gradient(ellipse at 16% 110%, #25468b, var(--navy) 72%);
  color: #fff;
}
.candidate-dialog-head:has(.candidate-dialog-photo[hidden]) { grid-template-columns: 1fr; }
.candidate-dialog-heading { min-inline-size: 0; }
.candidate-dialog-number {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-block-end: .65rem;
  padding: .17rem .58rem;
  border-radius: .32rem;
  background: var(--accent);
  color: var(--navy);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
}
.candidate-dialog-number strong { font-size: 1.18rem; }
.candidate-dialog-heading h2 { font-size: clamp(1.34rem, 4.9vw, 2.05rem); line-height: 1.4; }
.candidate-dialog-role { margin-block-start: .38rem; color: #dce7ff; line-height: 1.55; }
.candidate-dialog-photo {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #adc3f38c;
  border-radius: .78rem;
  background: radial-gradient(ellipse at 55% 22%, #7897ed, #203b77 79%);
}
.candidate-dialog-photo img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.candidate-dialog-original img { object-fit: cover; object-position: center top; }

.candidate-dialog-bio { padding: clamp(1.05rem, 4vw, 1.75rem); }
.candidate-intro { font-size: clamp(1rem, 2.7vw, 1.08rem); line-height: 1.8; }
.candidate-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: .65rem;
  margin: 1rem 0 0;
}
.candidate-facts > div {
  padding: .8rem .88rem;
  border-radius: .6rem;
  border: 1px solid #d9e3f4;
  background: #f3f6fc;
}
.candidate-facts dt { color: var(--blue-dark); font-weight: 700; font-size: .875rem; }
.candidate-facts dd { margin: .2rem 0 0; line-height: 1.66; }
.candidate-training { margin-block-start: .9rem; padding-block-start: .5rem; border-block-start: 1px solid var(--line); }
.candidate-training summary { min-height: 44px; padding-block: .46rem; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.candidate-training ul { margin-block: .2rem 0; padding-inline-start: 1.25rem; line-height: 1.8; }

@media (max-width: 480px) {
  .candidate-dialog-head {
    grid-template-columns: minmax(0, 1fr) clamp(4.8rem, 24vw, 6.5rem);
    padding: 2.9rem .95rem 1.1rem;
  }
  .candidate-dialog-role { font-size: .875rem; }
  .candidate-dialog-number { margin-block-end: .45rem; }
}

.chat {
  inline-size: min(390px, calc(100% - 24px));
  inset: auto;
  inset-inline-end: max(1.4rem, env(safe-area-inset-left));
  inset-block-end: max(1.4rem, env(safe-area-inset-bottom));
  margin: 0;
  background: #f9fbff;
}
.chat-frame { display: flex; flex-direction: column; height: min(540px, calc(100dvh - 60px)); }
.chat-head { display: flex; align-items: center; gap: .65rem; padding: .8rem; background: var(--navy); color: #fff9f1; }
.chat-head :focus-visible { outline-color: var(--accent); }
.chat-head h2 { font-size: 1.05rem; }
.chat-head p { font-size: .875rem; }
.chat-head form { margin-inline-start: auto; }
.close { padding: 0; width: 42px; height: 42px; border: 1px solid currentColor; border-radius: 50%; color: inherit; background: transparent; font: 1.55rem system-ui; }
.close:hover { background: #bb987534; }
.chat-messages { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .7rem; padding: 1rem; }
.chat-note { color: var(--muted); font-size: .875rem; text-align: center; }
.bubble { max-width: 94%; padding: .6rem .85rem; border-radius: 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: #ebeff5; color: #202e45; }
.bubble.user { align-self: flex-end; background: #173765; color: white; }
.chat-status { padding: .4rem 1rem; color: var(--muted); font-size: .875rem; }
.chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); }
.chat-form input { min-width: 0; flex: 1; padding: .55rem .6rem; border: 1px solid #b4c3e3; border-radius: 7px; color: inherit; background: white; }
.chat-form button { padding: .45rem .8rem; border: none; border-radius: 7px; background: var(--navy); color: white; font-weight: 700; }
.chat-form button:disabled { opacity: .65; cursor: wait; }
.preview { width: min(520px, calc(100% - 24px)); background: #f5f7fb; }
.preview-body { padding: 1.5rem; }
.preview h2 { font-size: 1.55rem; }
.preview form { float: inline-end; }
.preview li { margin-block: .5rem; line-height: 1.8; }

@media (max-width: 760px) {
  .chat-launch {
    inset-inline-end: max(.75rem, env(safe-area-inset-left));
    inset-block-end: max(.75rem, env(safe-area-inset-bottom));
    min-width: 52px;
    min-height: 52px;
    justify-content: center;
    padding: .25rem;
  }
  .chat-launch span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .chat { inset-inline-end: max(.75rem, env(safe-area-inset-left)); }
}
