:root {
  color-scheme: light dark;

  /* Dark palette */
  --bg-dark: #121212;
  --text-dark: #c7c7c7;
  --text-h1-dark: #ffffff;
  --text-h-all-dark: #c9c9c9;
  --even-rtable-dark: #1e1e1e;
  --odd-rtable-dark: #2c2c2c;
  --border-dark: #333333;
  --thead-dark: #252525;
  --hover-dark: #353535;
  --link-dark: #7ab7ff;

  /* Matching light palette */
  --bg-light: #ffffff;
  --text-light: #2b2b2b;
  --text-h1-light: #111111;
  --text-h-all-light: #333333;
  --even-rtable-light: #f4f4f4;
  --odd-rtable-light: #ffffff;
  --border-light: #dcdcdc;
  --thead-light: #eaeaea;
  --hover-light: #e6eef8;
  --link-light: #0056b3;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: light-dark(var(--bg-light), var(--bg-dark));
  color: light-dark(var(--text-light), var(--text-dark));
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation Area */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid light-dark(var(--border-light), var(--border-dark));
}

.header-top h1 {
  margin: 0;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  color: light-dark(var(--text-h1-light), var(--text-h1-dark));
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h2 {
  color: light-dark(var(--text-h-all-light), var(--text-h-all-dark));
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid light-dark(var(--border-light), var(--border-dark));
}

h3, h4, h5, h6 {
  color: light-dark(var(--text-h-all-light), var(--text-h-all-dark));
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* Standard Static Elements */
a {
  color: light-dark(var(--link-light), var(--link-dark));
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

ul, ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid light-dark(#999999, #555555);
  background-color: light-dark(var(--even-rtable-light), var(--even-rtable-dark));
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.15em 0.35em;
  border-radius: 3px;
  background-color: light-dark(#eeeeee, #242424);
  border: 1px solid light-dark(var(--border-light), var(--border-dark));
}

hr {
  border: 0;
  border-top: 1px solid light-dark(var(--border-light), var(--border-dark));
  margin: 2rem 0;
}

/* Classic Zebra-Striped Table */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  border: 1px solid light-dark(var(--border-light), var(--border-dark));
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid light-dark(var(--border-light), var(--border-dark));
}

thead tr {
  background-color: light-dark(var(--thead-light), var(--thead-dark));
  color: light-dark(var(--text-h1-light), var(--text-h1-dark));
}

th {
  font-weight: 600;
  border-bottom: 2px solid light-dark(#bdbdbd, #4a4a4a);
}

tbody tr:nth-child(odd) {
  background-color: light-dark(var(--odd-rtable-light), var(--odd-rtable-dark));
}

tbody tr:nth-child(even) {
  background-color: light-dark(var(--even-rtable-light), var(--even-rtable-dark));
}

tbody tr:hover {
  background-color: light-dark(var(--hover-light), var(--hover-dark));
}

/* Optional utility for right-aligned numeric columns */
th.num, td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
