:root {
  --blue: #2b42de;
  --blue-dark: #1f32b3;
  --ink: #17181c;
  --muted: #686b73;
  --line: #d9dbe1;
  --canvas: #f5f5f3;
  --paper: #ffffff;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent);
  outline-offset: 3px;
}

.book-page:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--blue);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 31px;
  height: auto;
  margin-right: 19px;
}

.brand-title {
  padding-right: 20px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-season {
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-button,
.print-button,
.chapter-button,
.close-contents {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 11px 14px;
  color: var(--blue-dark);
  font-weight: 600;
}

.print-button,
.chapter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--blue);
  border-radius: 3px;
  color: var(--blue-dark);
  background: white;
  font-size: 0.88rem;
  font-weight: 650;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.print-button:hover,
.chapter-button:hover:not(:disabled) {
  color: white;
  background: var(--blue);
}

.print-button svg,
.chapter-button svg,
.close-contents svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.book-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}

.contents {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  padding: 46px 26px 30px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbfbfa;
}

.contents-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 22px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.close-contents {
  display: none;
  padding: 8px;
}

#chapter-nav {
  display: grid;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 12px;
  border-radius: 3px;
  color: #45474e;
  font-size: 0.84rem;
  line-height: 1.35;
  text-decoration: none;
}

.nav-link::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  background: transparent;
  content: "";
}

.nav-link:hover {
  color: var(--blue-dark);
  background: #f4f5fb;
}

.nav-link[aria-current="page"] {
  color: var(--blue-dark);
  background: #f0f2ff;
  font-weight: 650;
}

.nav-link[aria-current="page"]::before {
  background: var(--blue);
}

.nav-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav-link[aria-current="page"] .nav-number {
  color: var(--blue);
}

.effective-date {
  margin: 28px 12px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.reader {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: 34px clamp(22px, 4vw, 74px) 28px;
}

.book-page {
  width: min(100%, 816px);
  min-height: 1056px;
  padding: clamp(58px, 7vw, 84px) clamp(48px, 8vw, 88px) 72px;
  border: 1px solid #e3e3e0;
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 2px 5px rgb(23 24 28 / 8%), 0 18px 50px rgb(23 24 28 / 7%);
}

.page-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 42px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--blue);
}

.page-number {
  padding-top: 5px;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.page-kicker {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.book-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.05rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.section + .section {
  margin-top: 39px;
  padding-top: 32px;
  border-top: 1px solid #e5e5e2;
}

.section h2 {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1.35;
  text-transform: uppercase;
}

.book-page p,
.book-page li {
  font-family: var(--serif);
  font-size: 1.01rem;
  line-height: 1.72;
}

.book-page p {
  margin: 0 0 1.12em;
}

.book-page .lead {
  font-size: 1.16rem;
}

.book-page .subheading {
  margin: 24px 0 8px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.steps,
.note {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--blue);
}

.steps-title {
  margin: 0 0 9px;
  color: var(--blue-dark);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 800;
}

.steps ol,
.checklist {
  margin: 0;
  padding-left: 1.3rem;
}

.steps li + li,
.checklist li + li {
  margin-top: 8px;
}

.note p {
  margin: 0;
  font-size: 0.96rem;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 29px;
}

.checklist li::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 12px;
  height: 12px;
  border: 1px solid #9799a1;
  content: "";
}

.signature-block {
  margin-top: 37px;
}

.signature-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
}

.signature-role {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
}

.signature-lines {
  display: grid;
  gap: 36px;
  margin-top: 76px;
}

.signature-line {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: end;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 650;
}

.signature-rule {
  height: 1.5rem;
  border-bottom: 1px solid var(--ink);
}

.welcome-page .page-header {
  margin-bottom: 58px;
}

.welcome-page::before {
  display: block;
  width: 54px;
  height: 79px;
  margin: 0 0 48px;
  background: url("assets/premier-monogram.png") center / contain no-repeat;
  content: "";
}

.welcome-page .page-header .page-number {
  display: none;
}

.welcome-page .page-header {
  grid-template-columns: 1fr;
}

.page-controls {
  display: grid;
  width: min(100%, 816px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.chapter-button:first-child {
  justify-self: start;
}

.chapter-button:last-child {
  justify-self: end;
}

.chapter-button:disabled {
  border-color: #cfd0d5;
  color: #96989f;
  cursor: not-allowed;
}

.page-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.print-book {
  display: none;
}

noscript {
  display: block;
  padding: 20px;
  color: #7a1c1c;
  background: #fff4f4;
  text-align: center;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 66px;
    padding: 0 18px;
  }

  .brand img {
    width: 26px;
    margin-right: 12px;
  }

  .brand-title {
    padding-right: 0;
  }

  .brand-season {
    display: none;
  }

  .text-button {
    display: inline-flex;
  }

  .print-button {
    padding-inline: 12px;
  }

  .print-button svg {
    display: none;
  }

  .book-shell {
    display: block;
    min-height: calc(100vh - 66px);
  }

  .nav-scrim {
    position: fixed;
    z-index: 28;
    inset: 66px 0 0;
    background: rgb(23 24 28 / 28%);
  }

  .contents {
    position: fixed;
    z-index: 30;
    top: 66px;
    bottom: 0;
    left: 0;
    width: min(88vw, 340px);
    height: auto;
    padding: 28px 20px;
    box-shadow: 18px 0 40px rgb(23 24 28 / 10%);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .contents.is-open {
    transform: translateX(0);
  }

  .close-contents {
    display: inline-flex;
  }

  .reader {
    padding: 20px 14px 22px;
  }

  .book-page {
    min-height: 0;
    padding: 46px clamp(24px, 8vw, 62px) 58px;
  }
}

@media (max-width: 540px) {
  .site-header {
    gap: 8px;
  }

  .brand-title {
    max-width: 86px;
    font-size: 0.86rem;
    line-height: 1.05;
  }

  .header-actions {
    gap: 2px;
  }

  .text-button,
  .print-button {
    padding-inline: 9px;
    font-size: 0.77rem;
  }

  .print-button {
    border: 0;
  }

  .book-page {
    padding: 38px 24px 48px;
  }

  .page-header {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 32px;
  }

  .book-page h1 {
    font-size: 2rem;
  }

  .book-page p,
  .book-page li {
    font-size: 0.98rem;
    line-height: 1.67;
  }

  .steps,
  .note {
    padding-left: 16px;
  }

  .page-controls {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .chapter-button {
    width: 44px;
    padding: 0;
  }

  .chapter-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@page {
  size: Letter;
  margin: 0.65in 0.72in 0.62in;
}

@media print {
  :root {
    --blue: #263ba9;
    --blue-dark: #263ba9;
  }

  html,
  body {
    width: auto;
    margin: 0;
    background: white;
  }

  .site-header,
  .book-shell,
  .skip-link,
  noscript {
    display: none !important;
  }

  .print-book {
    display: block;
  }

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

  .print-chapter:first-child {
    break-before: auto;
    page-break-before: auto;
  }

  .print-cover {
    display: flex;
    min-height: 8.7in;
    flex-direction: column;
    justify-content: space-between;
    break-after: page;
    page-break-after: always;
  }

  .print-cover img {
    width: 0.65in;
    height: auto;
  }

  .print-cover h1 {
    max-width: 5.6in;
    margin: 2.2in 0 0;
    font-family: var(--serif);
    font-size: 38pt;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.02;
  }

  .print-cover .season {
    margin-top: 18pt;
    color: var(--blue-dark);
    font-family: var(--sans);
    font-size: 14pt;
    font-weight: 700;
  }

  .print-cover .cover-footer {
    padding-top: 14pt;
    border-top: 1pt solid var(--blue);
    font-family: var(--sans);
    font-size: 8.5pt;
  }

  .print-toc {
    break-after: page;
    page-break-after: always;
  }

  .print-toc h2,
  .print-chapter h1 {
    margin: 0 0 24pt;
    padding-bottom: 12pt;
    border-bottom: 0.75pt solid var(--blue);
    font-family: var(--serif);
    font-size: 27pt;
    font-weight: 500;
    letter-spacing: -0.02em;
  }

  .print-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 0.5in;
  }

  .print-toc li {
    display: flex;
    gap: 10pt;
    margin: 0 0 11pt;
    break-inside: avoid;
    font-family: var(--sans);
    font-size: 10pt;
  }

  .print-index {
    color: var(--blue-dark);
    font-variant-numeric: tabular-nums;
  }

  .print-chapter .page-kicker {
    margin-bottom: 6pt;
    font-size: 7.5pt;
  }

  .print-chapter h1 {
    margin-bottom: 22pt;
  }

  .print-chapter h2 {
    margin: 24pt 0 8pt;
    break-after: avoid;
    page-break-after: avoid;
    font-family: var(--sans);
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .print-chapter p,
  .print-chapter li {
    font-family: var(--serif);
    font-size: 10.3pt;
    line-height: 1.48;
  }

  .print-chapter p {
    margin: 0 0 9pt;
    orphans: 3;
    widows: 3;
  }

  .print-chapter .lead {
    font-size: 11.5pt;
  }

  .print-chapter .subheading {
    margin: 15pt 0 6pt;
    break-after: avoid;
    font-family: var(--sans);
    font-size: 9pt;
    font-weight: 800;
  }

  .print-chapter .steps,
  .print-chapter .note {
    margin: 14pt 0;
    padding: 2pt 0 2pt 14pt;
    break-inside: avoid;
    border-left: 1.25pt solid var(--blue);
  }

  .print-chapter .steps-title {
    font-size: 9pt;
  }

  .print-chapter .checklist {
    margin: 0;
  }

  .print-chapter .checklist li {
    padding-left: 20pt;
  }

  .print-chapter .checklist li::before {
    top: 5pt;
    width: 8pt;
    height: 8pt;
  }

  .print-chapter .signature-lines {
    margin-top: 48pt;
  }

  .print-page-footer {
    margin-top: 28pt;
    padding-top: 7pt;
    border-top: 0.5pt solid #c8c8c8;
    color: #666;
    font-family: var(--sans);
    font-size: 7.5pt;
  }
}
