/* Reorganized from wwwroot/css/ref.css. */
.ref-page {
    position: relative;
    padding: 0 0 clamp(64px, 8vw, 110px);
    color: #172033;
}

.ref-background {
    min-height: clamp(720px, 92vh, 1120px);
    padding-top: clamp(86px, 12vw, 80px);
    padding-bottom: clamp(98px, 13vw, 170px);

    background-position:
        top center,
        bottom center;
    background-repeat:
        repeat-x,
        repeat-x;
    background-size:
        100% auto,
        100% auto;
}

.ref-content {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: clamp(30px, 5vw, 58px);
    padding-top:0;

}

.ref-symbol-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(405px, 100%);
    margin: 0 auto clamp(42px, 5vw, 64px);
    overflow: hidden;
}

.ref-symbol-strip img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.ref-eyebrow {
    margin: 0 0 12px;
    color: #672290;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ref-content h1 {
    margin: 0;
    color: var(--fr-purple);
    font-size: var(--summit-title-font-size);
    font-weight: 760;
    line-height: var(--summit-title-line-height);
    letter-spacing: 0;
}

.ref-color-rule {
    display: flex;
    width: 172px;
    height: 4px;
    margin: 22px 0 30px;
}

.ref-color-rule span {
    flex: 1;
}

.ref-color-rule span:nth-child(1) {
    background: #f3d400;
}

.ref-color-rule span:nth-child(2) {
    background: #46b34a;
}

.ref-color-rule span:nth-child(3) {
    background: #672290;
}

.ref-color-rule span:nth-child(4) {
    background: #ef333f;
}

.ref-color-rule span:nth-child(5) {
    background: #00a9e0;
}

.ref-copy {
    display: grid;
    gap: 18px;
    max-width: 820px;
}

.ref-copy p {
    margin: 0;
    color: #263149;
    font-size: clamp(1.04rem, 1.45vw, 1.2rem);
    line-height: 1.78;
}

.ref-copy sup {
    font-size: 0.68em;
    line-height: 0;
    vertical-align: super;
    top:0!important;
}

.ref-document-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin-top: 32px;
    padding: 14px 20px;
    border: 1px solid #672290;
    background: #672290;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ref-document-link:hover,
.ref-document-link:focus-visible {
    background: #4f1475;
    border-color: #4f1475;
    color: #fff;
    transform: translateY(-1px);
}

.ref-document-link i {
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.ref-page-khmer .ref-content h1 {
    font-family: "Moul", "Moul-Regular", serif;
    font-weight: 400;
    line-height: 1.55;
}

.ref-page-khmer .ref-copy,
.ref-page-khmer .ref-document-link,
.ref-page-khmer .ref-eyebrow {
    font-family: "Hanuman", "Khmer OS Metal Chrieng", serif;
}

.ref-page-khmer .ref-copy strong {
    color: #111827;
    font-weight: 800;
}

.ref-pdf-modal .modal-content {
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

.ref-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(13, 18, 32, 0.38);
    outline: 0;
}

.ref-pdf-modal.show {
    display: block;
}

.ref-pdf-modal .modal-dialog {
    width: min(1140px, calc(100% - 32px));
    margin: 24px auto;
}

.ref-pdf-modal .modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: min(88vh, 900px);
    background: #fff;
    box-shadow: 0 24px 70px rgba(14, 21, 40, 0.28);
}

.ref-pdf-modal .modal-header,
.ref-pdf-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-color: #e8e2ee;
}

.ref-pdf-modal .modal-header {
    border-bottom: 1px solid #e8e2ee;
}

.ref-pdf-modal .modal-footer {
    border-top: 1px solid #e8e2ee;
}

.ref-pdf-modal .modal-title {
    margin: 0;
    color: #672290;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.ref-pdf-modal .btn-close {
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f6f1fa;
    color: #672290;
    cursor: pointer;
    opacity: 1;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ref-pdf-modal .btn-close::before,
.ref-pdf-modal .btn-close::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.ref-pdf-modal .btn-close::before {
    transform: rotate(45deg);
}

.ref-pdf-modal .btn-close::after {
    transform: rotate(-45deg);
}

.ref-pdf-modal .btn-close:hover,
.ref-pdf-modal .btn-close:focus-visible {
    background: #672290;
    color: #fff;
    box-shadow: 0 8px 20px rgba(103, 34, 144, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.ref-pdf-modal .modal-body {
    flex: 1;
    padding: 0;
    background: #f5f3f7;
    overflow: auto;
}

.ref-pdf-viewer {
    display: grid;
    gap: 22px;
    padding: 22px;
}

.ref-pdf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    color: #672290;
    font-weight: 700;
}

.ref-pdf-page {
    width: min(100%, 900px);
    margin: 0 auto;
}

.ref-pdf-page img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 10px 30px rgba(22, 28, 45, 0.12);
}

.ref-pdf-page-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #672290;
    font-weight: 700;
}

.modal-backdrop.show {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(13, 18, 32, 0.5);
}

body.modal-open {
    overflow: hidden;
}
