/* Gartner FES modal — narrow card + compact type; full copy preserved in HTML */
.fes-modal-root {
  --fes-orange: #E97A4A;
  --fes-orange-deep: #D9531E;
  --fes-ink: #1A1A1A;
  --fes-cream: #F7F3EC;
  --fes-white: #FFFFFF;
  --fes-muted: rgba(26, 26, 26, 0.62);
  --fes-line: rgba(26, 26, 26, 0.10);
  --fes-teal: #1F6F6B;
  --fes-gartner-navy: #0B1F3A;
}

.fes-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 12px max(8px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fes-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.fes-modal {
  position: relative;
  box-sizing: border-box;
  background: var(--fes-white);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: auto;
  overflow: visible;
  box-shadow: 0 24px 64px -16px rgba(11, 31, 58, 0.38);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--fes-ink);
  line-height: 1.4;
}

.fes-modal-overlay.is-open .fes-modal {
  transform: translateY(0) scale(1);
}

.fes-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: var(--fes-cream);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fes-ink);
  font-size: 15px;
  line-height: 1;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
}

.fes-close:hover {
  background: var(--fes-line);
  transform: scale(1.06);
}

.fes-body {
  box-sizing: border-box;
  padding: 36px 18px 14px;
  position: relative;
  overflow-x: hidden;
}

.fes-eyebrow {
  font-family: ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fes-teal);
  margin-bottom: 4px;
  line-height: 1.3;
}

.fes-title {
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.fes-title .fes-accent {
  color: var(--fes-orange-deep);
}

.fes-lede {
  font-size: 11px;
  color: var(--fes-muted);
  margin-bottom: 10px;
  line-height: 1.38;
}

.fes-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--fes-line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.fes-fact {
  padding: 7px 8px;
  border-right: 1px solid var(--fes-line);
}

.fes-fact:last-child { border-right: none; }

.fes-fact-label {
  font-family: ui-monospace, monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fes-muted);
  margin-bottom: 2px;
  line-height: 1.2;
}

.fes-fact-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--fes-ink);
  line-height: 1.25;
}

.fes-fact-value.is-booth {
  font-family: ui-monospace, monospace;
  color: var(--fes-orange-deep);
}

.fes-discount {
  background: var(--fes-ink);
  color: var(--fes-cream);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.fes-discount::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -25%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(233, 122, 74, 0.15), transparent 65%);
  pointer-events: none;
}

.fes-discount-left { position: relative; min-width: 0; }

.fes-discount-label {
  font-family: ui-monospace, monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fes-orange);
  margin-bottom: 2px;
}

.fes-discount-code {
  font-family: ui-monospace, monospace;
  font-size: clamp(17px, 5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fes-cream);
  line-height: 1.1;
}

.fes-discount-hint {
  font-size: 10px;
  color: rgba(247, 243, 236, 0.58);
  margin-top: 3px;
  line-height: 1.3;
}

.fes-discount-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.fes-copy-btn {
  background: var(--fes-orange);
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 108px;
}

.fes-copy-btn:hover { background: var(--fes-orange-deep); }

.fes-copy-btn.is-copied { background: var(--fes-teal); }

.fes-register-btn {
  background: transparent;
  color: var(--fes-cream);
  border: 1px solid rgba(247, 243, 236, 0.35);
  padding: 7px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 108px;
  transition: all 0.2s ease;
}

.fes-register-btn:hover {
  background: var(--fes-cream);
  color: var(--fes-ink);
  border-color: var(--fes-cream);
}

.fes-boardroom {
  background: var(--fes-cream);
  border: 1px solid var(--fes-line);
  border-left: 3px solid var(--fes-teal);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.fes-boardroom-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fes-teal);
  margin-bottom: 6px;
  line-height: 1.2;
}

.fes-boardroom-eyebrow .fes-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fes-orange-deep);
  flex-shrink: 0;
}

.fes-boardroom-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}

.fes-boardroom-text {
  font-size: 10.5px;
  color: var(--fes-muted);
  line-height: 1.38;
  margin-bottom: 6px;
}

.fes-boardroom-link {
  color: var(--fes-teal);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--fes-teal);
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.fes-boardroom-link:hover {
  color: var(--fes-orange-deep);
  border-bottom-color: var(--fes-orange-deep);
}

.fes-cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fes-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.fes-btn-primary {
  background: var(--fes-orange);
  color: #fff;
}

.fes-btn-primary:hover {
  background: var(--fes-orange-deep);
  transform: translateY(-1px);
}

.fes-btn-secondary {
  background: transparent;
  color: var(--fes-ink);
  border: 1px solid var(--fes-line);
}

.fes-btn-secondary:hover {
  border-color: var(--fes-ink);
  background: var(--fes-ink);
  color: #fff;
}

.fes-btn .fes-arrow { transition: transform 0.2s ease; }

.fes-btn:hover .fes-arrow { transform: translateX(2px); }

body.fes-modal-open { overflow: hidden; }

/* Tighter on short windows so the full card fits without scrolling */
@media (max-height: 720px) {
  .fes-modal-overlay {
    padding: 6px 10px;
  }
  .fes-modal {
    font-size: 12px;
    border-radius: 10px;
  }
  .fes-body {
    padding: 32px 16px 10px;
  }
  .fes-title {
    font-size: clamp(16px, 3.5vw, 18px);
    margin-bottom: 4px;
  }
  .fes-lede {
    margin-bottom: 8px;
  }
  .fes-facts {
    margin-bottom: 8px;
  }
  .fes-discount {
    margin-bottom: 8px;
    padding: 8px 10px;
  }
  .fes-boardroom {
    margin-bottom: 8px;
    padding: 8px 10px;
  }
  .fes-cta-row {
    gap: 6px;
  }
  .fes-btn {
    padding: 8px 14px;
  }
}

/* Room for a touch more content on tall displays */
@media (min-height: 880px) {
  .fes-modal {
    max-width: 480px;
  }
  .fes-body {
    padding: 40px 22px 18px;
  }
}

@media (max-width: 520px) {
  .fes-modal {
    max-width: 100%;
  }
  .fes-body {
    padding: 34px 14px 12px;
  }
  .fes-facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .fes-fact {
    border-right: none;
    border-bottom: 1px solid var(--fes-line);
    padding: 8px 10px;
  }
  .fes-fact:nth-child(odd) {
    border-right: 1px solid var(--fes-line);
  }
  .fes-fact:nth-last-child(-n+2) {
    border-bottom: none;
  }
  .fes-discount {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .fes-discount-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .fes-copy-btn,
  .fes-register-btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  .fes-cta-row {
    flex-direction: column;
  }
  .fes-btn {
    width: 100%;
    justify-content: center;
  }
}
