/* ncept-mou.css — NCEPT/NRP MOU page (/ncept/mou). Relocated from the page's inline <style>. */

/* ── MOU Page Styles ── */
.mou-page {
  --mou-accent: #2cb3cc;
  --mou-accent-bg: rgba(44, 179, 204, 0.08);
  --mou-section-border: rgba(44, 179, 204, 0.25);
  --mou-blockquote-bg: rgba(0, 0, 0, 0.02);
  --mou-blockquote-border: rgba(44, 179, 204, 0.4);
  --mou-toc-bg: var(--card-bg);
  --mou-toc-border: var(--card-border);
  --mou-toc-active: var(--mou-accent);
  --mou-toc-hover-bg: rgba(44, 179, 204, 0.06);
  --mou-badge-bg: rgba(44, 179, 204, 0.12);
  --mou-badge-color: #1a8a9e;
}
[data-bs-theme="dark"] .mou-page {
  --mou-blockquote-bg: rgba(255, 255, 255, 0.03);
  --mou-blockquote-border: rgba(44, 179, 204, 0.3);
  --mou-badge-bg: rgba(44, 179, 204, 0.15);
  --mou-badge-color: #5dd4e8;
}

/* Hero banner */
.mou-hero {
  background: #143a52;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}
.mou-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}
.mou-hero .lead {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  margin-bottom: 0;
}
.mou-hero .badge-date {
  display: inline-block;
  background: rgba(44, 179, 204, 0.2);
  color: #7dd8e8;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35em 0.9em;
  border-radius: 2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(44, 179, 204, 0.3);
}

/* TOC sidebar */
.mou-toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background: var(--mou-toc-bg);
  border: 1px solid var(--mou-toc-border);
  border-radius: 0.75rem;
  padding: 1.25rem 0;
  font-size: 0.82rem;
  scrollbar-width: thin;
}
.mou-toc::-webkit-scrollbar { width: 4px; }
.mou-toc::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 2px; }
.mou-toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  padding: 0 1.25rem;
  margin-bottom: 0.75rem;
}
.mou-toc a {
  display: block;
  padding: 0.3rem 1.25rem;
  color: inherit;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.mou-toc a:hover {
  background: var(--mou-toc-hover-bg);
  color: var(--mou-toc-active);
}
.mou-toc a.active {
  border-left-color: var(--mou-toc-active);
  color: var(--mou-toc-active);
  font-weight: 600;
  background: var(--mou-toc-hover-bg);
}
.mou-toc a.toc-sub {
  padding-left: 2rem;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Document body */
.mou-body {
  line-height: 1.75;
  font-size: 0.95rem;
}
.mou-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--mou-section-border);
  scroll-margin-top: 5.5rem;
}
.mou-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5.5rem;
}
.mou-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 5.5rem;
}
.mou-body .section-badge {
  display: inline-block;
  background: var(--mou-badge-bg);
  color: var(--mou-badge-color);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2em 0.65em;
  border-radius: 0.35rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* Blockquotes for indented policy text */
.mou-body blockquote {
  background: var(--mou-blockquote-bg);
  border-left: 4px solid var(--mou-blockquote-border);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.mou-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Ordered/unordered lists inside the doc */
.mou-body ol, .mou-body ul {
  padding-left: 1.5rem;
}
.mou-body li {
  margin-bottom: 0.6rem;
}
.mou-body li > ol, .mou-body li > ul {
  margin-top: 0.4rem;
}

/* Tables */
.mou-body .table {
  font-size: 0.88rem;
}
.mou-body .table thead th {
  background: var(--table-header-bg);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Signature block */
.mou-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
@media (max-width: 575.98px) {
  .mou-signatures { grid-template-columns: 1fr; }
  .mou-hero h1 { font-size: 1.5rem; }
  .mou-hero {
    border-radius: 0;
    margin-left: calc(-0.75rem - 1px);
    margin-right: calc(-0.75rem - 1px);
    margin-top: -30px;
    padding: 2rem 1.25rem;
  }
}
.mou-sig-group h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mou-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--mou-section-border);
}
.mou-sig-entry {
  margin-bottom: 1rem;
}
.mou-sig-entry .sig-name {
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.3;
}
.mou-sig-entry .sig-title {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0;
}

/* Tier callout cards */
.tier-card {
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}
.tier-card .tier-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}
.tier-card .tier-award {
  font-size: 1.4rem;
  font-weight: 800;
}
.tier-card .tier-desc {
  font-size: 0.82rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}
.tier-3 .tier-label, .tier-3 .tier-award { color: #7c3aed; }
.tier-2 .tier-label, .tier-2 .tier-award { color: #b45309; }
.tier-1 .tier-label, .tier-1 .tier-award { color: #146c43; }
[data-bs-theme="dark"] .tier-3 .tier-label, [data-bs-theme="dark"] .tier-3 .tier-award { color: #a78bfa; }
[data-bs-theme="dark"] .tier-2 .tier-label, [data-bs-theme="dark"] .tier-2 .tier-award { color: #fba94c; }
[data-bs-theme="dark"] .tier-1 .tier-label, [data-bs-theme="dark"] .tier-1 .tier-award { color: #75b798; }

/* Print styles */
@media print {
  .mou-toc, .mou-hero::before { display: none; }
  .mou-hero { background: #143a52 !important; -webkit-print-color-adjust: exact; }
}

/* Summary section */
.mou-summary-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  line-height: 1.7;
}
.mou-summary-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--mou-section-border);
  scroll-margin-top: 5.5rem;
}
.mou-summary-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--mou-accent);
}
.mou-summary-section ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.mou-summary-section li {
  margin-bottom: 0.35rem;
}
.mou-summary-section .comparison-table {
  font-size: 0.82rem;
  margin-top: 1rem;
}
.mou-summary-section .comparison-table .old-col { opacity: 0.6; }
.mou-summary-section .disclaimer {
  font-size: 0.78rem;
  color: var(--secondary);
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

/* Summary link in hero */
.mou-hero .summary-link {
  display: inline-block;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  text-decoration: none;
  margin-top: 1.25rem;
  padding: 0.3em 0.9em;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.15s ease;
}
.mou-hero .summary-link:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.3);
}
.mou-hero .ncept-guide-link {
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.2s ease;
}
.mou-hero .ncept-guide-link:hover {
  background: #fff;
  color: #143a52;
  border-color: #fff;
}

/* Mobile TOC pill */
.mou-toc-mobile {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1040;
  max-width: calc(100% - 2rem);
  width: auto;
}
@media (max-width: 991.98px) {
  .mou-toc-mobile { display: block; }
}
.mou-toc-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-radius 0.2s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
[data-bs-theme="dark"] .mou-toc-pill {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 12px rgba(44,179,204,0.25);
}
.mou-toc-pill svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s ease;
}
.mou-toc-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.mou-toc-mobile.open .mou-toc-pill {
  border-radius: 1rem 1rem 0 0;
}
.mou-toc-mobile.open .mou-toc-pill svg {
  transform: rotate(180deg);
}
.mou-toc-dropdown {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
}
.mou-toc-mobile.open .mou-toc-dropdown { display: block; }
.mou-toc-dropdown a {
  display: block;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.1s ease;
}
.mou-toc-dropdown a:hover,
.mou-toc-dropdown a.active {
  background: var(--mou-toc-hover-bg);
  color: var(--mou-toc-active);
}
.mou-toc-dropdown a.active { font-weight: 600; }
.mou-toc-dropdown a.toc-sub {
  padding-left: 1.75rem;
  font-size: 0.78rem;
  opacity: 0.85;
}
.mou-toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1039;
}
.mou-toc-mobile.open + .mou-toc-overlay { display: block; }

/* Enhanced Web Display Styles */
.def-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.def-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--logo-bg-color);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.def-card-title {
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.def-card-body {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.5;
  margin: 0;
}

.criteria-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.25rem 0;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.criteria-table th {
  background: rgba(44, 179, 204, 0.1); /* Subtle logo color bg */
  color: var(--text-color);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.9rem;
}
[data-bs-theme="dark"] .criteria-table th {
  background: rgba(26, 123, 142, 0.15);
}
.criteria-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.85rem;
  vertical-align: middle;
}
.criteria-table tr:last-child td {
  border-bottom: none;
}
.criteria-table tbody tr:hover {
  background: var(--table-hover-bg);
}

.badge-timeline {
  background-color: var(--growth-teal, #169a72);
  color: #fff;
  font-weight: 600;
  font-size: 0.8em;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  white-space: nowrap;
}
.badge-retention {
  background-color: var(--pension-gold, #ffc107);
  color: #000;
  font-weight: 600;
  font-size: 0.8em;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  white-space: nowrap;
}

/* Permalink copy buttons */
.heading-permalink {
  display: inline-block;
  margin-left: 0.35rem;
  opacity: 0.4;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.7em;
  vertical-align: middle;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.mou-body h2:hover .heading-permalink,
.mou-body h3:hover .heading-permalink,
.mou-body h4:hover .heading-permalink,
.heading-permalink:focus-visible {
  opacity: 0.6;
}
.heading-permalink:hover {
  opacity: 1 !important;
  color: var(--mou-accent);
}

/* Cross-reference links */
.xref {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  border-bottom-color: rgba(0,0,0,0.3);
  transition: border-color 0.15s ease;
}
[data-bs-theme="dark"] .xref {
  border-bottom-color: rgba(255,255,255,0.3);
}
.xref:hover {
  border-bottom-style: solid;
  border-bottom-color: currentColor;
}

/* Glossary abbreviation tooltips */
.mou-body abbr[title] {
  text-decoration: none;
  border-bottom: 1px dotted rgba(128, 128, 128, 0.55);
  cursor: help;
}
.mou-body abbr[title]:hover {
  border-bottom-color: var(--mou-accent);
}

/* Clipboard toast notification */
.mou-toast {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-0.75rem);
  background: var(--card-bg);
  border: 2px solid #22c55e;
  color: inherit;
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(34,197,94,0.25), 0 2px 8px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1050;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mou-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
