/* =====================================================
   LEGACY ARCHIVE RENDERING MODE
   Restores early-2000s HTML behavior safely
   Scoped to .legacy-content only
   Helped by legacy-fixer.js in theme's JS folder
   ===================================================== */

/* --- Tables behave like old shrink-to-fit layouts --- */
.legacy-content table {
  width: auto;
  border-collapse: separate;
}
/* Restore deprecated align attribute behavior */
.legacy-content table[align="right"],
.legacy-content img[align="right"] {
  float: right;
  margin-left: 1rem;
}
.legacy-content table[align="left"],
.legacy-content img[align="left"] {
  float: left;
  margin-right: 1rem;
}
.legacy-content [align="center"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
/* Prevent modern themes forcing full-width tables */
.legacy-content table[align] {
  width: auto !important;
  max-width: max-content;
  display: table;
}
/* Old nowrap tag support */
.legacy-content nobr {
  white-space: nowrap;
}
/* Restore early table text density */
.legacy-content td {
  line-height: 1.35;
  vertical-align: top;
}
/* Normalize <br>-based layouts used as lists */
.legacy-content td br {
  line-height: 1.1;
}
/* Spacer-cell era fixes */
.legacy-content td:empty {
  min-width: 0.75rem;
}
/* Clear legacy floats */
.legacy-content::after {
  content: "";
  display: block;
  clear: both;
}
/* Hint that big table scrolls  */
@media (max-width: 768px) {
  .legacy-content table {
    border-right: 1px solid rgba(0,0,0,0.08);
  }
}