/* Extracted original inline declarations; no visual redesign. */
.legacy-1 { padding-right: 0; }
.legacy-2 { font-weight: bold; }
.legacy-3 { padding-left:40px }
.legacy-4 { font-weight:bold; font-style:italic; }
.legacy-5 { font-weight:bold; }
.legacy-6 { padding-left:60px }
.legacy-7 { text-decoration:underline; }
.legacy-8 { padding-top: 10px; padding-bottom: 30px; }
.legacy-9 { display: block; text-decoration: none; color: #888; }
.legacy-10 { font-weight: bold }
.legacy-11 { font-size: small }
iframe { max-width: 100%; }

/* Preserve the original footer separator and first social cell spacing. */
#footer .footer-separator { border-right: 1px solid #aaa; }
#footer .footer-social-start { padding-left: 20px; }
#footer [data-copy-link] {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#footer [data-copy-status] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Titles previously lived in table cells, which had no heading top margin.
   Keep semantic headings without adding space above the original content edge. */
#main .mainTable > h1:first-child,
#main > h1:first-child {
  margin-top: 0;
}

/* Definition-list equivalents of the original sidebar label/value columns. */
#mainFixed dl.sideTable {
  position: relative;
  margin: 0;
}
/* A single rule spans the full list, including the gaps between facts. */
#mainFixed dl.sideTable::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% / 3);
  border-left: 1px solid #ccc;
  pointer-events: none;
}
#mainFixed dl.sideTable > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
#mainFixed dl.sideTable dt {
  grid-column: 1;
  grid-row: 1;
  font-weight: bold;
  padding: 0 12px;
}
#mainFixed dl.sideTable dd {
  grid-column: 2;
  margin: 0;
  padding-left: 12px;
}

/* Paragraph spacing between complete sidebar facts. */
#mainFixed dl.sideTable > div + div {
  margin-top: 1em;
}

/* Keep schedule tables consistent with the original Safara sidebar. */
#mainFixed table.sideTable {
  float: left;
  width: 100%;
  border: 1px solid #ccc;
  border-collapse: collapse;
  background: #e6e6e6;
  font-size: 12px;
}
#mainFixed table.sideTable caption {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 10px 10px 1em;
  font-weight: bold;
  font-size: 13px;
  text-align: left;
}
#mainFixed table.sideTable th,
#mainFixed table.sideTable td {
  float: none;
  text-align: left;
  vertical-align: top;
}
#mainFixed table.sideTable th {
  width: 110px;
  padding: 0 10px;
  font-weight: bold;
  border-right: 1px solid #ccc;
}
#mainFixed table.sideTable td {
  padding: 0 20px 10px 10px;
  border: 0;
}
#mainFixed table.sideTable tbody tr:not(:last-child) th,
#mainFixed table.sideTable tbody tr:not(:last-child) td {
  border-bottom: 1px solid #ccc;
}
@media screen and (max-width: 800px) {
  #mainFixed table.sideTable {
    display: block;
    width: 100%;
  }
}

/* Keep project section labels consistent with the Moura programme pages. */
#main .mainTable > h2,
#main .mainTable section > h2 {
  margin: 0;
  padding: 0 0 10px;
  font-size: 14px;
  font-style: italic;
  font-weight: bold;
  line-height: 22px;
}
#main .mainTable > h2 + p,
#main .mainTable section > h2 + p {
  margin-top: 0;
}

/* Keep main-content images inside the same padded column as the text. */
#main .mainTable img {
  max-width: 100%;
  height: auto;
}

/* Keep all team details beside each portrait, with clear separation between members. */
#main .teamTable section {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
#main .teamTablePicture {
  width: auto;
}
#main .teamTableDescription {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: auto;
}
#main .teamTableDescription > p:has(> a) {
  margin-top: auto;
  margin-bottom: 0;
}

/* Use a consistent square crop for the About-page team portraits. */
#main .teamTablePicture img {
  display: block;
  width: 250px;
  height: 250px;
  object-fit: cover;
  object-position: center;
}

/* Justify paragraph text in the main content column. */
#main p {
  text-align: justify;
}
#main .home,
#main .home > * {
  text-align: center;
}
#mainFixed p {
  text-align: start;
}

/* Keep the main text clear of the adjacent sidebar without widening its column. */
#mainScroll {
  box-sizing: border-box;
  padding-right: 40px;
}

/* Match the original .mainTable/.teamTable table-header titles. */
#main .mainTable > h1,
#main .teamTable > h1,
#main .teamTable > h2 {
  font-size: 40px;
  font-weight: bold;
  line-height: normal;
  text-align: left;
  margin: 0;
  padding: 0 0 20px;
}
@media screen and (max-width: 800px) {
  #main .mainTable > h1 {
    font-size: 30px;
    padding: 5px 5px 10px;
  }
}

/* Carry the original table-cell typography over to semantic content blocks. */
#main .mainTable,
#main .teamTable,
#main > p {
  font-size: 14px;
  line-height: 22px;
}

/* Match the original grey content links and prevent the legacy a:visited
   navigation rule from turning visited content links into uppercase blocks. */
#main .mainTable a,
#mainFixed a,
#main > p a {
  color: #888;
  text-decoration: none;
  text-transform: none;
  display: inline;
  padding: 0;
}

/* Leave breathing room below the final sidebar fact. */
#mainFixed dl.sideTable {
  padding-bottom: 1em;
}
