/* Cyberlligency EU AI Act Reference Edition — page-scoped layout corrections.
   This file intentionally does not modify global assets or other pages. */

/* Long desktop contents list remains sticky, but can be scrolled independently. */
@media (min-width: 901px) {
  .reference-layout > .toc {
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 16px;
  }

  .reference-layout > .toc::-webkit-scrollbar {
    width: 8px;
  }

  .reference-layout > .toc::-webkit-scrollbar-thumb {
    background: #cfd8e6;
    border-radius: 8px;
  }

  .reference-layout > .toc::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* Match the established NIST/Reference Edition table treatment. */
.reference-content .table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 8px;
  -webkit-overflow-scrolling: touch;
}

.reference-content .table-wrap .data-table {
  margin: 0;
}

/* Keep wide comparison tables readable without changing the global design. */
.reference-content .data-table th,
.reference-content .data-table td {
  min-width: 130px;
}

.reference-content .data-table th:first-child,
.reference-content .data-table td:first-child {
  min-width: 155px;
}

@media (max-width: 900px) {
  .reference-layout > .toc {
    max-height: none;
    overflow: visible;
  }
}


/* Premium FAQ: page-scoped and isolated from all other Reference Editions. */
.reference-content .faq-list {
  display: grid;
  gap: 10px;
}

.reference-content .faq-list details {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.reference-content .faq-list summary {
  cursor: pointer;
  padding: 16px 48px 16px 18px;
  font-weight: 650;
  position: relative;
  list-style: none;
}

.reference-content .faq-list summary::-webkit-details-marker {
  display: none;
}

.reference-content .faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  line-height: 1;
}

.reference-content .faq-list details[open] summary::after {
  content: "–";
}

.reference-content .faq-answer {
  border-top: 1px solid #e5eaf1;
  padding: 16px 18px 18px;
}

.reference-content .faq-answer p:first-child {
  margin-top: 0;
}

.reference-content .faq-answer p:last-child {
  margin-bottom: 0;
}

.reference-content .faq-related {
  font-size: 0.95rem;
}

.reference-content .implementation-resources {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid #2a5d9f;
  border-radius: 8px;
  background: #f4f7fb;
}

.reference-content .implementation-resources p {
  margin: 6px 0 8px;
}

.reference-content .toc a.is-active {
  color: #163f73;
  font-weight: 700;
  background: #eef4fb;
  border-radius: 6px;
}

@media (max-width: 700px) {
  .reference-content .faq-list summary {
    padding: 14px 42px 14px 14px;
  }

  .reference-content .faq-answer {
    padding: 14px;
  }
}
