/* ---------- Base ---------- */

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #23262b;
  --color-text-muted: #5b6069;
  --color-heading: #1b2a4a;
  --color-accent: #004982;
  --color-border: #e1ddd4;
  --color-link: #004982;
  --color-link-hover: #032742;
  --max-width: 1200px;
  --toc-width: 280px;
}
ecf5fc

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: sans-serif, 'Helvetica Neue', Arial;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-link);
  text-decoration:none;
}

a:hover {
  color: var(--color-link-hover);
}

h1, h2, h3, h4 {
  font-family: sans-serif, 'Helvetica Neue', Arial;
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 600;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--color-surface);
  /*border-bottom: 1px solid var(--color-border);*/
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
}

.draft-tag {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.65rem;
  /*background: var(--color-accent);*/
  background: darkred;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 3px;
}

.site-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.intro {
  max-width: 70ch;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- Layout ---------- */

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-width);
  gap: 3rem;
}

.content {
  min-width: 0;
  background: var(--color-surface);
  /*border: 1px solid var(--color-border);
  border-radius: 10px;*/
 padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
 padding-left:0;
 padding-top:0;
}

/* ---------- Table of contents ---------- */

.toc {
  grid-column: 2;
  grid-row: 1;
}

.toc-inner {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--color-surface);
 /* border: 1px solid var(--color-border);
  border-radius: 10px;*/
  border-left: 1px solid var(--color-border);
  padding: 1.25rem 1.4rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
   text-transform: none; 
  color: var(--color-text-muted);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc > .toc-inner > ul {
  border-top: 1px solid var(--color-border);
  padding-top: 0.6rem;
}

.toc ul ul {
  padding-left: 0.9rem;
  margin-top: 0.15rem;
}

.toc li {
  margin: 0.15rem 0;
}

.toc a {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  margin-left: -0.6rem;
}

.toc > .toc-inner > ul > li > a {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-heading);
}

.toc a:hover {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
}

/* ---------- Content typography ---------- */

.content h2 {
  font-size: 1.55rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.6rem;
}

section + section {
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.content h3 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.9rem;
}

.content h4,
.content p.subhead {
  font-size: 1.02rem;
  margin: 1.6rem 0 0.6rem;
  color: var(--color-accent);
  font-family: "Helvetica Neue", Arial, sans-serif;
  /* text-transform: uppercase; */
  letter-spacing: 0.04em;
  font-weight: 700;
 /* font-size: 0.85rem;*/
}

.content h2:first-child,
.content h3:first-child,
.content h4:first-child {
  margin-top: 0;
}

.content p {
  margin: 0 0 1rem;
}

.content p.caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: -0.5rem;
}

.content ul,
.content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.content ul {
  list-style-type: disc;
}

.content ol.roman {
  list-style-type: lower-roman;
}

.content li {
  margin-bottom: 0.55rem;
}

.content li:last-child {
  margin-bottom: 0;
}

/* ---------- Example callout boxes ---------- */

.example-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
}

.example-box p {
  margin: 0 0 0.5rem;
}

.example-box p:last-child {
  margin-bottom: 0;
}

.example-heading {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

thead th {
  background: var(--color-bg);
  font-weight: 700;
  color: var(--color-heading);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  /* background: rgba(122, 31, 43, 0.03); */
  background: rgb(245, 252, 252, 0.5);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem 3rem;
  }

  .toc {
    grid-column: 1;
    grid-row: 1;
  }

  .content {
    grid-row: 2;
  }

  .toc-inner {
    position: static;
    max-height: none;
  }

  .toc-inner ul ul {
    display: none;
  }

  .toc-inner > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }

  .toc-inner > ul > li {
    margin: 0;
  }

  .header-inner {
    padding: 2rem 1.25rem 1.5rem;
  }

  .content {
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .content h2 {
    font-size: 1.3rem;
  }
}
td.credit_spec {
	color:red;
}
