/* Reset & Base Styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* Prevents any horizontal scrolling */
  color: #111;
  background-color: #ffffff;
  font-family: "Computer Modern", "Times New Roman", Times, serif;
  line-height: 1.45;
  font-size: 16px;
}

/* Palatinate Purple Topbar */
.topbar {
  background-color: #68246D; /* Official Durham Palatinate Purple */
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: opacity 0.2s ease;
}

.topbar a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.topbar-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.github-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Report Content Wrapper */
.content {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Title & Academic Author Formatting */
h1.title {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0 20px 0;
  line-height: 1.35;
}

.author-block {
  text-align: center;
  margin: 0 auto 40px auto;
  line-height: 1.4;
}

.author-name {
  font-size: 17px;
  font-weight: bold;
  color: #222;
  margin-bottom: 3px;
}

.author-affiliation {
  font-size: 15px;
  color: #333;
  margin-bottom: 3px;
}

.author-email {
  font-size: 14px;
  font-family: "Courier New", Courier, monospace;
}

.author-email a {
  color: #333;
  text-decoration: none;
}

.author-email a:hover {
  text-decoration: underline;
}

/* Section Headings */
h2 {
  font-size: 19px;
  font-weight: bold;
  margin: 35px 0 15px 0;
}

p {
  text-align: justify;
  margin: 0 0 5px 0;
  text-indent: 1.5em;
}

h2 + p, .no-indent {
  text-indent: 0;
}

ul {
  margin: 15px 0 15px 10px;
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
  text-align: justify;
}

/* Figures & Images */
.figure {
  text-align: center;
  margin: 30px 0;
  max-width: 100%;
}

.figure img {
  max-width: 85%;
  height: auto;
}

.fig-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin: 30px 0;
  max-width: 100%;
}

.fig-col {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.fig-col img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.fig-col iframe {
  width: 100%;
  max-width: 100%;
  height: 260px;
  border: 1px solid #222;
  border-radius: 3px;
  background: #111111;
  display: block;
  overflow: hidden;
}

.caption {
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
  line-height: 1.3;
}

/* Tables */
.table-caption {
  text-align: center;
  font-size: 14.5px;
  margin-bottom: 6px;
}

table {
  width: 85%;
  max-width: 100%;
  margin: 25px auto;
  border-collapse: collapse;
  font-size: 14.5px;
}

th, td {
  padding: 5px 12px;
  text-align: right;
}

th {
  border-top: 2px solid black;
  border-bottom: 1px solid black;
  font-weight: bold;
}

tr:last-child td {
  border-bottom: 2px solid black;
}

th:first-child, td:first-child {
  text-align: left;
}

/* References (Academic Hanging Indent & Safe URL Wrapping) */
.references {
  margin-top: 15px;
  max-width: 100%;
}

.ref-item {
  padding-left: 2.2em;
  text-indent: -2.2em;
  margin: 0 0 12px 0;
  text-align: left; /* Left-align prevents huge gaps between words */
  line-height: 1.45;
  font-size: 14.5px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ref-item a {
  color: #004499;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-all; /* Forces long links to break neatly onto new lines */
  display: inline;
}

.ref-item a:hover {
  text-decoration: underline;
}