/* ===== Mandatory Disclosure page ===== */

.md-banner {
  background: var(--navy-deep);
  color: #fff;
  padding: 56px 0 40px;
}
.md-banner h1 { color: #fff; margin-bottom: 10px; }
.md-banner p { color: #cfe0ee; font-size: 1.05rem; max-width: 640px; margin-bottom: 24px; }
.md-print-btn { border: none; cursor: pointer; }

.md-wrap { padding: 56px 0 90px; }

.md-section { margin-bottom: 46px; }
.md-section:last-child { margin-bottom: 0; }
.md-section-title {
  font-size: 1.3rem;
  color: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.md-section-actions { margin: 0 0 16px; }

/* Label / value rows */
.md-kv-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #fff;
}
.md-kv-table tr { border-bottom: 1px solid var(--line); }
.md-kv-table tr:last-child { border-bottom: none; }
.md-kv-table th {
  text-align: left;
  vertical-align: top;
  width: 44%;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  border-right: 1px solid var(--line);
}
.md-kv-table td.md-value {
  padding: 14px 18px;
  color: var(--ink-soft);
  min-width: 120px;
}
/* Empty value cells get a dashed placeholder line */
.md-kv-table td.md-value:empty::after {
  content: "";
  display: block;
  height: 1px;
  border-bottom: 1.5px dashed #c9bfa0;
  width: 70%;
}

/* VIEW link (opens the document's own page) */
.md-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 8px 2px 0;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.md-pdf-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.md-pdf-link:hover,
.md-pdf-link:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
  transform: translateY(-1px);
}

/* Result / teacher tables */
.md-table-wrap { width: 100%; overflow-x: auto; }
.md-data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}
.md-data-table th, .md-data-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.94rem;
}
.md-data-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.md-data-table td:empty::after {
  content: "";
  display: block;
  height: 1px;
  border-bottom: 1.5px dashed #c9bfa0;
  width: 80%;
}
.md-data-table tbody tr:nth-child(even) { background: var(--paper); }

/* ===================================================================
   Single document page  (/mandatory-disclosure/<key>)
   =================================================================== */
.md-doc-banner { padding: 40px 0 32px; }
.md-doc-banner h1 { margin-bottom: 0; }

.md-back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #cfe0ee;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.md-back-link:hover,
.md-back-link:focus-visible { color: var(--gold); text-decoration: underline; }

.md-doc-viewer {
  max-width: 980px;
  margin: 0 auto;
  min-height: 300px;
  padding: 12px;
  background: #e9e6dc;
  border-radius: 8px;
  -webkit-user-select: none;
  user-select: none;
}
.md-modal-msg {
  margin: 40px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
}
.md-modal-msg.is-error { color: #b3261e; }

.md-pdf-page {
  display: block;
  margin: 0 auto 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  max-width: 100%;
}

/* Excel view */
.md-xl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.md-xl-tabs button {
  padding: 6px 14px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.md-xl-tabs button.active { background: var(--navy); color: #fff; }
.md-xl-holder { overflow-x: auto; background: #fff; }
.md-xl-table { width: 100%; border-collapse: collapse; }
.md-xl-table th, .md-xl-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: nowrap;
}
.md-xl-table tr:first-child th,
.md-xl-table tr:first-child td { background: var(--navy); color: #fff; font-weight: 700; }
.md-xl-table tbody tr:nth-child(even) td { background: var(--paper); }
.md-xl-table tbody tr:nth-child(even):first-child td { background: var(--navy); }

@media (max-width: 700px) {
  .md-kv-table th { width: 50%; padding: 12px; font-size: 0.92rem; }
  .md-kv-table td.md-value { padding: 12px; }
  .md-section-title { font-size: 1.12rem; }
  .md-pdf-link { padding: 7px 12px; font-size: 0.85rem; }
  .md-doc-banner { padding: 28px 0 24px; }
  .md-doc-viewer { padding: 8px; border-radius: 0; }
}

/* ===================================================================
   Print / Save as PDF
   =================================================================== */
@media print {
  .site-header, .site-footer, .social-float, .admissions-tab,
  .md-print-btn, .md-pdf-link, .md-section-actions,
  .md-back-link, #scrollProgressBar {
    display: none !important;
  }
  body { background: #fff; }
  .md-banner { background: #fff !important; color: #000 !important; padding: 0 0 20px; }
  .md-banner h1, .md-banner p { color: #000 !important; }
  .md-banner .eyebrow { color: #444 !important; }
  .md-wrap { padding: 20px 0; }
  .md-section { page-break-inside: avoid; margin-bottom: 28px; }
  .md-kv-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .md-data-table th { background: #333 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}