.technical-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 42px;
  margin-top: .7rem;
  padding: .7rem 1rem;
  border: 1px solid color-mix(in srgb, #0d8dca 55%, #d9e4e9);
  border-radius: 999px;
  background: color-mix(in srgb, #0d8dca 8%, transparent);
  color: #076b9d;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.technical-detail-link:hover,
.technical-detail-link:focus-visible {
  transform: translateY(-1px);
  background: #0d8dca;
  color: #fff;
  outline: none;
}

@media (max-width: 640px) {
  .technical-detail-link {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .technical-detail-link {
    border-color: #355767;
    background: rgba(54, 183, 238, .1);
    color: #65cdf4;
  }
}

html.technical-overlay-open {
  overflow: hidden;
}

.technical-system-dialog {
  width: min(1540px, calc(100% - 24px));
  max-width: none;
  height: min(940px, calc(100dvh - 24px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 171, 194, .55);
  border-radius: 24px;
  background: #f6f9fb;
  color: #101820;
  box-shadow: 0 40px 120px rgba(1, 18, 28, .38);
}

.technical-system-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.technical-system-dialog::backdrop {
  background: rgba(3, 20, 29, .72);
  backdrop-filter: blur(12px);
}

.technical-system-dialog__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid #d6e4ea;
  background: rgba(255, 255, 255, .96);
}

.technical-system-dialog__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.technical-system-dialog__identity img {
  width: 176px;
  height: 32px;
  object-fit: contain;
  object-position: left center;
}

.technical-system-dialog__identity div {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #d6e4ea;
}

.technical-system-dialog__identity span,
.technical-system-dialog__identity strong {
  display: block;
}

.technical-system-dialog__identity span {
  color: #65808e;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.technical-system-dialog__identity strong {
  overflow: hidden;
  color: #0a2737;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-system-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #b9cfda;
  border-radius: 999px;
  background: #edf5f8;
  color: #092535;
  font: inherit;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.technical-system-dialog__close:hover,
.technical-system-dialog__close:focus-visible {
  border-color: #0d8dca;
  background: #0d8dca;
  color: #fff;
  outline: none;
}

.technical-system-dialog__stage {
  position: relative;
  min-height: 0;
  background: #f6f9fb;
}

.technical-system-dialog iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f6f9fb;
}

.technical-system-dialog__loader {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: #f6f9fb;
  color: #526b78;
  font-size: .78rem;
  font-weight: 750;
}

.technical-system-dialog.is-loading .technical-system-dialog__loader {
  display: grid;
}

.technical-system-dialog__loader i {
  width: 34px;
  height: 34px;
  border: 3px solid #d6e4ea;
  border-top-color: #0d8dca;
  border-radius: 50%;
  animation: af24-technical-spin .75s linear infinite;
}

@keyframes af24-technical-spin {
  to { transform: rotate(1turn); }
}

@media (max-width: 700px) {
  .technical-system-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .technical-system-dialog__bar {
    min-height: 64px;
    padding: 10px 12px;
    gap: 10px;
  }

  .technical-system-dialog__identity {
    flex: 1 1 auto;
    overflow: hidden;
    gap: 10px;
  }

  .technical-system-dialog__identity img {
    flex: 0 0 42px;
    width: 42px;
    height: 34px;
    object-fit: cover;
    object-position: left;
  }

  .technical-system-dialog__identity div {
    flex: 1 1 auto;
    padding-left: 10px;
  }

  .technical-system-dialog__identity span {
    font-size: .56rem;
  }

  .technical-system-dialog__identity strong {
    max-width: none;
    font-size: .86rem;
  }

  .technical-system-dialog__close {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 50%;
  }

  .technical-system-dialog__close b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

@media (prefers-color-scheme: dark) {
  .technical-system-dialog,
  .technical-system-dialog__stage,
  .technical-system-dialog iframe,
  .technical-system-dialog__loader {
    background: #06151e;
    color: #b9c8d0;
  }

  .technical-system-dialog__bar {
    border-bottom-color: #21404f;
    background: rgba(10, 32, 44, .97);
  }

  .technical-system-dialog__identity img {
    content: url("/assets/brand/af24-logo-on-dark.svg");
  }

  .technical-system-dialog__identity div {
    border-left-color: #21404f;
  }

  .technical-system-dialog__identity span { color: #879aa5; }
  .technical-system-dialog__identity strong { color: #f4f8fa; }

  .technical-system-dialog__close {
    border-color: #355767;
    background: #0e2937;
    color: #f4f8fa;
  }
}

@media (prefers-reduced-motion: reduce) {
  .technical-system-dialog__loader i { animation: none; }
}
