@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/spectral-400.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/spectral-400i.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/spectral-600.woff2") format("woff2");
}

:root {
  --cover: #143049;
  --cover-ink: #f3f6f8;
  --paper: #e7edf1;
  --ink: #1c2833;
  --muted: #3a4a58;
  --seal: #7d2e2e;
  --line: #c5d0d8;
  --sheet: #f7f9fa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Spectral", "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.55;
  text-wrap: pretty;
}

body.frame {
  display: block;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 3;
  background: var(--sheet);
  color: var(--cover);
  padding: 0.45rem 0.7rem;
}

.skip:focus {
  top: 0.75rem;
}

.spine {
  background: var(--cover);
  color: var(--cover-ink);
  padding: 1.4rem 1.25rem 1.6rem;
}

.spine-kicker,
.spine-note,
.spine-foot {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.spine-title {
  display: block;
  margin: 0.35rem 0 0.45rem;
  color: var(--cover-ink);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.spine-note {
  margin-bottom: 0.4rem;
}

.spine-foot {
  margin-top: 1.6rem;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-button {
  display: inline-block;
  margin: 0.9rem 0 0.2rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--cover-ink);
  color: var(--cover-ink);
  cursor: pointer;
}

.when-open {
  display: none;
}

.nav-toggle:checked + .nav-button .when-closed {
  display: none;
}

.nav-toggle:checked + .nav-button .when-open {
  display: inline;
}

.nav-toggle:focus-visible + .nav-button,
.nav-button:focus-visible {
  outline: 3px solid var(--cover-ink);
  outline-offset: 3px;
}

.nav-links {
  display: none;
  margin-top: 0.8rem;
}

.nav-toggle:checked ~ .nav-links {
  display: block;
}

.nav-links a {
  display: block;
  margin: 0 0 0.15rem;
  padding: 0.28rem 0 0.28rem 0.75rem;
  border-left: 3px solid transparent;
  color: var(--cover-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.nav-links a[aria-current="page"] {
  border-left-color: var(--cover-ink);
  font-weight: 600;
}

.nav-links a:focus-visible,
.spine-title:focus-visible {
  outline: 3px solid var(--cover-ink);
  outline-offset: 3px;
}

main {
  padding: 1.6rem 1.2rem 3.5rem;
  background: var(--sheet);
}

article {
  max-width: 52rem;
}

article > :not(.table-wrap) {
  max-width: 38rem;
}

.draft-note {
  margin: 0 0 1.6rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--seal);
  color: var(--muted);
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.15rem, 4vw, 3.15rem);
}

.home h1 {
  font-size: clamp(2.8rem, 8vw, 5.1rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

h2 {
  margin: 2.3rem 0 0.65rem;
  font-size: 1.45rem;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.15rem;
}

p,
ul,
ol,
.table-wrap,
blockquote,
.letter,
.estimate {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.2rem;
}

li {
  margin: 0 0 0.4rem;
}

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

a {
  color: inherit;
}

main a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

main a:focus-visible {
  outline: 3px solid var(--cover);
  outline-offset: 2px;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.45;
}

ol.paras {
  list-style: none;
  padding: 0;
  counter-reset: para;
}

ol.paras > li {
  position: relative;
  margin: 0 0 1.15rem;
  padding-left: 2.3rem;
  counter-increment: para;
}

ol.paras > li::before {
  content: counter(para);
  position: absolute;
  left: 0;
  top: 0.05rem;
  color: var(--muted);
  font-weight: 600;
}

blockquote {
  margin: 1.2rem 0;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--seal);
}

blockquote p {
  font-style: italic;
}

blockquote footer {
  color: var(--muted);
  font-style: normal;
  font-size: 1rem;
}

.estimate,
.letter {
  padding-left: 1rem;
}

.estimate {
  border-left: 3px solid var(--seal);
}

.letter {
  border-left: 3px solid var(--cover);
}

.mark-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--seal);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.4;
}

caption {
  display: block;
  width: 100%;
  max-width: 38rem;
  text-align: left;
  font-weight: 600;
  margin: 0 0 0.45rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 600;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 0 0.25rem;
}

.bar-track {
  display: block;
  height: 0.7rem;
  margin: 0 0 0.2rem;
  outline: 1px solid var(--line);
  background: transparent;
}

.bar-fill {
  display: block;
  height: 100%;
  background: var(--cover);
}

.pct-54 { width: 54%; }
.pct-35 { width: 35%; }
.pct-209 { width: 20.9%; }
.pct-568 { width: 56.8%; }

.source {
  color: var(--muted);
  font-size: 1rem;
}

.colophon {
  max-width: 38rem;
  margin-top: 2.6rem;
  color: var(--muted);
  font-size: 1rem;
}

.colophon p {
  margin: 0 0 0.45rem;
}

::selection {
  background: #d5e0e8;
  color: var(--ink);
}

@media (min-width: 860px) {
  body.frame {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    min-height: 100vh;
  }

  .spine {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    padding: 1.8rem 1.35rem 2rem;
  }

  .nav-toggle,
  .nav-button {
    display: none;
  }

  .nav-links {
    display: block;
    margin-top: 1.3rem;
  }

  main {
    padding: 2.8rem 3.2rem 4.5rem;
  }
}

@media (max-width: 859px) {
  .spine-foot {
    display: none;
  }
}

@media (max-width: 720px) {
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: auto;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table-wrap tr {
    padding: 0.75rem 0 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td {
    border-bottom: 0;
    padding: 0.2rem 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
  }
}

@media print {
  body.frame {
    display: block;
    background: #fff;
    color: #000;
  }

  .skip,
  .spine,
  .draft-note,
  .nav-button,
  .nav-toggle {
    display: none;
  }

  main {
    padding: 0;
    background: #fff;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
