:root {
  --ink: #1a1a1a;
  --accent: #8b8989; /* Warm gray from logo */
  --paper: #f4f4f4;
  --link: #0070c9;
}

/* Fonts: No embedded fonts in PDF -> Inter (visual matching to clean sans-serif) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  line-height: 1.5;
  background-color: #fff;
  margin: 0;
  padding: 0;
}

#side-nav {
  position: fixed;
  width: 20vw;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid #eaeaea;
  padding: 1.5em;
  box-sizing: border-box;
}

#side-nav a {
  color: inherit;
  text-decoration: none;
}

#side-nav a:hover {
  color: var(--accent);
}

main {
  margin-left: 20vw;
  padding-bottom: 5em;
}

.flex-container {
  display: flex;
  padding-left: 2em;
}

.half-container {
  width: 100%;
  padding: 0 1em;
  columns: 2 30rem;
  column-gap: 3em;
}

.half-container.no-columns {
  column-count: 1 !important;
}

.half-container > header {
  column-span: all;
}

section + section {
  margin-top: 3em;
}

.flow > * + * {
  margin-bottom: 1em;
}

h1 {
  margin: 0;
}

h2 {
  color: var(--accent);
  text-transform: uppercase;
  padding-bottom: 0.25em;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1em;
}

h3 {
  margin-top: 1.5em;
  break-after: avoid;
}

p, li {
  break-inside: avoid;
}

.keep-together {
  break-inside: avoid;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  margin: 1em 0;
  border: 3px solid #000;
}

.table-heading {
  text-align: center;
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

.doc-table th, .doc-table td {
  border: 1px solid #000;
  padding: 0.4em 0.5em;
  vertical-align: middle;
}

.doc-table th {
  background: transparent;
  color: var(--ink);
  font-weight: bold;
  border-bottom: 3px solid #000;
}

.table-scroll {
  overflow-x: auto;
}

img {
  max-width: 100%;
  height: auto;
  margin-bottom: 0.75em;
}

.figure-center {
  display: flex;
  justify-content: center;
  margin: 2em 0;
}

/* the dot flourish closes the panel in print, so it sits under both columns */
.section-flourish {
  column-span: all;
}

/* 407/593: the three-dot row keeps its ratio to the four-dot row once a narrow
   column clamps both, so the dots still interleave */
.dots-narrow {
  max-width: 68.6%;
}

.masthead-title {
  text-align: left;
  color: var(--accent);
  font-size: 2rem;
  letter-spacing: 1px;
}

.masthead-subtitle {
  text-align: right;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.notes-line {
  border: 0;
  border-bottom: 1px solid #000;
  margin: 2em 0;
}

#toc-mobile {
  display: none;
}

#masthead {
  padding-top: 2em;
  padding-bottom: 2em;
}

@media (max-width: 900px) {
  .flex-container {
    flex-direction: column;
    padding-left: 0;
  }
  .half-container {
    width: 100%;
    padding: 0 1.5em;
    box-sizing: border-box;
  }
  nav {
    display: none;
  }
  main {
    margin: 0 auto;
  }
  #toc-mobile {
    display: block;
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #eaeaea;
    order: -1;
  }
}
@media (min-width: 901px) {
  #toc-mobile {
    display: none;
  }
}
