html[data-mode="light"] body.horizontal .wrapper {
  background-color:#f3f4f6!important;
  background-image:linear-gradient(rgba(241,245,249,0.91),rgba(241,245,249,0.91)),
    url("../../assets/images/cbu-bg-pic-3.2ec7ebae08c6.jpg")!important;
  background-repeat:no-repeat!important;background-size:cover!important;background-attachment:fixed!important;
}
html[data-mode="dark"] body.horizontal .wrapper {
  background-color:#1a1d21!important;
  background-image:linear-gradient(rgba(26,29,33,0.93),rgba(26,29,33,0.93)),
    url("../../assets/images/cbu-bg-pic-3.2ec7ebae08c6.jpg")!important;
  background-repeat:no-repeat!important;background-size:cover!important;background-attachment:fixed!important;
}

html[data-mode="light"] .dg {
  --surface:   #ffffff;
  --border:    var(--line, #E2E8F0);
  --ink2:      var(--ink, #0F172A);
  --ink3:      var(--muted, #64748B);
}
html[data-mode="dark"] .dg {
  --surface:   #2a2e33;
  --border:    rgba(255,255,255,.09);
  --ink2:      #e7e9eb;
  --ink3:      #9aa0a6;
}
:root { --dg-radius: clamp(.5863rem, .67vw, .8375rem); }

.dg {
  display: flex; flex-direction: column;
  gap: clamp(.5863rem, 1.2vw, .9213rem);
  padding: clamp(.5863rem, 1.2vw, .9213rem) clamp(.8375rem, 2vw, 2.01rem);
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 992px) { .dg { gap: clamp(.5863rem, .804vw, .9213rem); padding: clamp(.5863rem, .804vw, .9213rem) clamp(.8375rem, 1.34vw, 2.01rem); } }

.dg-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5863rem;
}
.dg-title { color: var(--ink2); font-size: clamp(1.273rem, calc(.938rem + 1.3vw), 2.01rem); font-weight: 700; margin: 0 0 0 .335rem; }
@media (min-width: 992px) { .dg-title { font-size: clamp(1.273rem, calc(.938rem + .871vw), 2.01rem); } }
.dg-toolbar-actions { display: flex; align-items: center; gap: .5863rem; flex-wrap: wrap; }
.dg-toolbar-actions label { color: var(--ink3); font-size: clamp(.737rem, calc(.67rem + .4vw), .9045rem); font-weight: 600; }
@media (min-width: 992px) { .dg-toolbar-actions label { font-size: clamp(.737rem, calc(.67rem + .268vw), .9045rem); } }

.dg-card {
  background: var(--surface);
  border: .0419rem solid var(--border);
  border-radius: var(--dg-radius);
  box-shadow: var(--shadow);
  padding: clamp(.8375rem, 2.2vw, 1.5075rem);
  flex: 1 1 auto;
  display: flex; flex-direction: column;
}
@media (min-width: 992px) { .dg-card { padding: clamp(.8375rem, 1.474vw, 1.5075rem); } }
.dg-embed {
  width: 100%; height: 82vh; border: .0419rem solid var(--border); border-radius: .4188rem;
}
@media (min-width: 992px) { .dg-embed { height: 54.94vh; } }
.dg-preview-img {
  width: 100%; height: auto; display: block;
  border: .0419rem solid var(--border); border-radius: .4188rem;
}
.dg-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1 1 auto;
  padding: clamp(2.0938rem, 8vh, 4.6063rem) .8375rem;
  color: var(--ink3); text-align: center; gap: .5863rem;
}
@media (min-width: 992px) { .dg-empty { padding: clamp(2.0938rem, 5.36vh, 4.6063rem) .8375rem; } }
.dg-empty i { font-size: clamp(1.876rem, 4.5vw, 2.68rem); opacity: .55; color: var(--ink3); }
@media (min-width: 992px) { .dg-empty i { font-size: clamp(1.876rem, 3.015vw, 2.68rem); } }

.dg-download-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .335rem;
  box-sizing: border-box; height: var(--ctl-h, 1.4238rem);   /* standard control height */
  background: var(--B6, #2D4F8A); color: #fff;
  padding: 0 .7538rem; border-radius: .335rem;
  text-decoration: none; font-weight: 700; white-space: nowrap;
  font-size: .6281rem;
  transition: background .15s, transform .1s;
}
.dg-download-btn:hover { background: var(--B8, #122035); }
.dg-download-btn:active { transform: scale(.98); }
html[data-mode="dark"] .dg-download-btn { background: #4caf50; }
html[data-mode="dark"] .dg-download-btn:hover { background: #43a047; }

.dg-period-select {
  box-sizing: border-box; height: var(--ctl-h, 1.4238rem);   /* standard control height */
  padding: 0 .5863rem; border-radius: .335rem; border: .0419rem solid var(--border);
  background: var(--surface); color: var(--ink2);
  font-size: .6281rem;
  font-family: inherit; cursor: pointer; min-width: 10.05rem;
}
.dg-field { display: inline-flex; align-items: center; gap: .4188rem; }
.dg-field .csel-button { font-size: .6281rem; }

/* viewer + fullscreen button */
.dg-card { position: relative; }
.dg-fs-btn { position: absolute; top: .4188rem; right: .4188rem; z-index: 2;
  background: var(--surface); color: var(--ink2); border-color: var(--border); }
.dg-fs-btn:hover { background: var(--B1, #C8DAEF); }
html[data-mode="dark"] .dg-fs-btn:hover { background: rgba(76,175,80,.15); }
.dg-view { min-height: 0; }
.dg-card.nm-fs-open .dg-view { overflow: auto; display: flex; align-items: center; justify-content: center; }
.dg-card.nm-fs-open .dg-preview-img { width: 100%; height: 100%; object-fit: contain; border: 0; }
.dg-card.nm-fs-open .px-reveal { height: 100%; aspect-ratio: auto; border-radius: 0; }
.dg-card.nm-fs-open .dg-embed { height: 100%; }

@media (min-width:1920px) {
  .dg { padding-left: clamp(.8375rem, 2.01vw, 3.7688rem); padding-right: clamp(.8375rem, 2.01vw, 3.7688rem); }
  .dg-title { font-size: 2.278rem; }
  .dg-toolbar-actions label { font-size: 1.005rem; }
  .dg-period-select { min-width: 13.4rem; }
  .dg-empty i { font-size: 3.082rem; }
  .dg-empty span { font-size: 1.005rem; }
}

/* Phones/tablets: title on its own row; under it the period selector (its
   name above it) and the download button share one row. */
@media (max-width: 991.98px) {
  .dg { padding: .5025rem; gap: .5025rem; }
  .dg-title { font-size: 1.139rem; margin-left: .0838rem; width: 100%; }
  .dg-toolbar { gap: .4188rem; }
  .dg-toolbar-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4188rem; align-items: end; }
  .dg-toolbar-actions.dg-two-btn { grid-template-columns: minmax(0, 1fr) auto auto; }
  .dg-field { display: flex; flex-direction: column; align-items: stretch; gap: .1675rem; min-width: 0; }
  .dg-field > label { font-size: .5025rem; margin: 0; }
  .dg-field .csel, .dg-field .csel-button, .dg-period-select { width: 100%; min-width: 0; }
  .dg-card { padding: .5025rem; }
}


/* ── page end: the same gap above the site footer on every page ── */
.dg { padding-bottom: .4375rem; }
