:root {
  --navy: #1d3f63;
  --gold: #c59632;
  --ink: #171b20;
  --muted: #56606b;
  --line: #cbd0d5;
  --row: #f4f5f6;
  --cream: #fcf5e9;
}

* { box-sizing: border-box; }

html {
  background: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.2pt;
  line-height: 1.42;
}

body {
  max-width: none;
  margin: 0;
  color: var(--ink);
  background: white;
}

h1, h2, h3, h4 {
  color: var(--navy);
  font-family: Arial, Helvetica, sans-serif;
  break-after: avoid-page;
  page-break-after: avoid;
}

h1 {
  margin: 0 0 0.18in;
  padding: 0 0 0.11in;
  border-bottom: 3px solid var(--gold);
  font-size: 25pt;
  line-height: 1.12;
}

h1.part {
  margin-top: 0;
  break-before: page;
  page-break-before: always;
}

h2 {
  margin: 0.28in 0 0.11in;
  padding-bottom: 0.05in;
  border-bottom: 1px solid var(--line);
  font-size: 17pt;
  line-height: 1.18;
}

h2.subtitle {
  margin: 0 0 0.17in;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 15pt;
  font-weight: 500;
}

h3 {
  margin: 0.22in 0 0.07in;
  font-size: 13pt;
  line-height: 1.2;
}

h4 {
  margin: 0.16in 0 0.05in;
  font-size: 10.5pt;
}

p { margin: 0 0 0.10in; }

ul, ol {
  margin: 0.06in 0 0.13in;
  padding-left: 0.28in;
}

li { margin: 0 0 0.035in; }

a { color: var(--navy); }

blockquote {
  margin: 0.20in 0 0.24in;
  padding: 0.16in 0.20in;
  border-left: 4px solid var(--gold);
  color: var(--ink);
  background: var(--cream);
  break-inside: avoid-page;
  page-break-inside: avoid;
}

blockquote p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  margin: 0.10in 0 0.18in;
  border-collapse: collapse;
  font-size: 8.2pt;
}

thead { display: table-header-group; }
tr {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

th, td {
  padding: 0.055in 0.07in;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  color: white;
  background: var(--navy);
  font-weight: 700;
}

tbody tr:nth-child(even) { background: var(--row); }

code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0.10in 0 0.16in;
  padding: 0.10in 0.12in;
  border: 1px solid var(--line);
  background: #f8f9fa;
  white-space: pre-wrap;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

hr {
  margin: 0.22in 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.fictional-notice {
  margin: 0 0 0.18in;
  padding: 0.09in 0.12in;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: #eef3f7;
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  break-inside: avoid-page;
}

.page-break {
  break-before: page;
  page-break-before: always;
}

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

.small-note {
  color: var(--muted);
  font-size: 8.5pt;
}

.col-third { width: 33%; }
.col-quarter { width: 25%; }
.col-fifth { width: 18%; }
.align-right { text-align: right; }

@page {
  size: Letter;
  margin: 0.68in 0.66in 0.65in;
}

@media screen {
  html { background: #e5e7e9; }
  body {
    width: min(8.5in, calc(100% - 40px));
    margin: 20px auto;
    padding: 0.68in 0.66in;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.13);
  }
}

@media screen and (max-width: 650px) {
  body {
    width: 100%;
    margin: 0;
    padding: 20px 16px 32px;
    box-shadow: none;
  }

  h1 { font-size: 20pt; }
  h2 { font-size: 15pt; }
  h2.subtitle { font-size: 12.5pt; }

  table {
    display: block;
    overflow-x: auto;
    font-size: 8pt;
  }
}
