/* DiraChart UI cleanup — July 2026 */

/* Stop giant card headings from breaking across columns. */
[class*="card"] h2,
[class*="tile"] h2,
[class*="module"] h2,
.dc-card h2,
.dc-tile h2,
article h2 {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  hyphens: auto !important;
  line-height: .98 !important;
}

/* Landing cards need strong titles, but not uncontrolled oversized titles. */
@media (min-width: 900px) {
  [class*="card"] h2,
  [class*="tile"] h2,
  .dc-card h2,
  .dc-tile h2,
  article h2 {
    font-size: clamp(2.1rem, 3vw, 4rem) !important;
  }
}

@media (max-width: 899px) {
  [class*="card"] h2,
  [class*="tile"] h2,
  .dc-card h2,
  .dc-tile h2,
  article h2 {
    font-size: clamp(1.8rem, 8vw, 3rem) !important;
  }
}

/* Make card grids stay inside the viewport. */
[class*="grid"],
[class*="cards"],
.dc-grid,
.dc-cards {
  max-width: 100% !important;
}

[class*="card"],
[class*="tile"],
.dc-card,
.dc-tile,
article {
  min-width: 0 !important;
}

/* Hide raw source-file labels after JS rewrites them. */
.dc-source-cleaned {
  color: #506270 !important;
  font-size: .95rem !important;
}

/* Footer injected where missing. */
.dirachart-cleanup-footer {
  margin-top: 64px;
  background: #12265a;
  color: #ffffff;
  border-top: 5px solid #c58d13;
  padding: 34px 28px 26px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dirachart-cleanup-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.dirachart-cleanup-footer h2 {
  color: #ffffff !important;
  font-size: 1.35rem !important;
  line-height: 1.2 !important;
  margin: 0 0 4px !important;
  font-family: Georgia, serif;
}

.dirachart-cleanup-footer p {
  margin: 0;
  color: rgba(255,255,255,.78);
}

.dirachart-cleanup-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.dirachart-cleanup-footer a {
  color: #ffffff !important;
  font-weight: 800;
  text-decoration: none;
}

.dirachart-cleanup-footer a:hover {
  text-decoration: underline;
}
