:root {
  --wp-bg: #070707;
  --wp-panel: #0d0d0d;
  --wp-panel-soft: #121212;
  --wp-line: rgba(255, 255, 255, 0.11);
  --wp-line-strong: rgba(255, 255, 255, 0.2);
  --wp-ink: #f3f0e9;
  --wp-muted: #918f89;
  --wp-accent: #e33a20;
  --wp-accent-soft: rgba(227, 58, 32, 0.12);
  --wp-sidebar-width: 304px;
  --wp-utility-height: 44px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--wp-bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 0%, rgba(111, 24, 13, 0.12), transparent 30rem),
    var(--wp-bg);
  color: var(--wp-ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #ff5c3d;
  outline-offset: 3px;
}

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

.wp-skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 12px;
  padding: 9px 13px;
  border: 1px solid var(--wp-accent);
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

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

.wp-utility {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--wp-utility-height);
  padding: 0 18px;
  border-bottom: 1px solid var(--wp-line);
  background: rgba(7, 7, 7, 0.94);
  backdrop-filter: blur(16px);
}

.wp-utility-mark {
  color: #c5c2bb;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wp-utility-actions {
  display: flex;
  align-items: center;
  height: 100%;
}

.wp-utility-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 15px;
  border-left: 1px solid var(--wp-line);
  color: #b8b5ae;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease;
}

.wp-utility-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.wp-download {
  color: #ff6548;
}

.wp-shell {
  min-height: 100vh;
  padding-top: var(--wp-utility-height);
}

.wp-sidebar {
  position: fixed;
  z-index: 500;
  top: var(--wp-utility-height);
  bottom: 0;
  left: 0;
  width: var(--wp-sidebar-width);
  overflow-y: auto;
  border-right: 1px solid var(--wp-line);
  background:
    linear-gradient(180deg, rgba(227, 58, 32, 0.035), transparent 15rem),
    var(--wp-panel);
  scrollbar-color: #302f2d transparent;
  scrollbar-width: thin;
}

.wp-brand {
  display: block;
  padding: 30px 30px 27px;
  border-bottom: 1px solid var(--wp-line);
  text-decoration: none;
}

.wp-brand img {
  display: block;
  width: min(174px, 100%);
  height: auto;
  object-fit: contain;
}

.wp-brand-copy {
  display: block;
  margin-top: 14px;
  color: #817f79;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.55;
  text-transform: uppercase;
}

.wp-nav {
  padding: 26px 0 48px;
}

.wp-nav-group + .wp-nav-group {
  margin-top: 30px;
}

.wp-nav-label {
  margin: 0 30px 10px;
  color: #5f5e5a;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wp-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 9px;
  min-height: 43px;
  padding: 12px 28px 11px 29px;
  color: #a6a39d;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.wp-nav-link::before {
  content: attr(data-page);
  padding-top: 1px;
  color: #55534f;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.wp-nav-link::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: transparent;
}

.wp-nav-link:hover {
  background: rgba(255, 255, 255, 0.025);
  color: #e7e3dc;
}

.wp-nav-link[aria-current="page"] {
  background: linear-gradient(90deg, var(--wp-accent-soft), transparent);
  color: #fff;
}

.wp-nav-link[aria-current="page"]::before {
  color: #ff6042;
}

.wp-nav-link[aria-current="page"]::after {
  background: var(--wp-accent);
}

.wp-mobile-bar {
  display: none;
}

.wp-menu-backdrop {
  display: none;
}

.wp-main {
  min-width: 0;
  min-height: calc(100vh - var(--wp-utility-height));
  margin-left: var(--wp-sidebar-width);
  padding: 50px clamp(28px, 5vw, 78px) 68px;
}

.wp-content {
  width: min(100%, 1050px);
  margin: 0 auto;
}

.wp-section {
  scroll-margin-top: calc(var(--wp-utility-height) + 24px);
}

.wp-pdf-page {
  position: relative;
  display: grid;
  gap: clamp(12px, 1.8vw, 20px);
  overflow: visible;
  border: 0;
  background: transparent;
}

.wp-pdf-page img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1448 / 2048;
  background: #090a0d;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.5);
}

.wp-chapter-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.wp-chapter-link {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border: 1px solid var(--wp-line);
  background: rgba(255, 255, 255, 0.015);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.wp-chapter-link:last-child {
  text-align: right;
}

.wp-chapter-link:hover {
  border-color: rgba(227, 58, 32, 0.7);
  background: var(--wp-accent-soft);
}

.wp-chapter-link-label {
  color: #66645f;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.wp-chapter-link-title {
  margin-top: 7px;
  color: #e6e2db;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
}

.wp-footer {
  padding: 34px 10px 0;
  color: #56544f;
  font-size: 0.61rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  :root {
    --wp-sidebar-width: 270px;
  }

  .wp-main {
    padding-right: 28px;
    padding-left: 28px;
  }

  .wp-nav-link {
    padding-right: 22px;
    padding-left: 24px;
  }
}

@media (max-width: 760px) {
  :root {
    --wp-sidebar-width: min(88vw, 320px);
  }

  body.wp-menu-open {
    overflow: hidden;
  }

  .wp-utility {
    padding: 0 10px 0 14px;
  }

  .wp-utility-mark {
    max-width: 44vw;
    overflow: hidden;
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wp-utility-link {
    padding: 0 10px;
    font-size: 0.58rem;
  }

  .wp-utility-link:first-child {
    display: none;
  }

  .wp-sidebar {
    z-index: 800;
    width: var(--wp-sidebar-width);
    box-shadow: 30px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  .wp-menu-open .wp-sidebar {
    transform: translateX(0);
  }

  .wp-menu-backdrop {
    position: fixed;
    z-index: 700;
    inset: var(--wp-utility-height) 0 0;
    display: block;
    visibility: hidden;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
    opacity: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .wp-menu-open .wp-menu-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .wp-mobile-bar {
    position: fixed;
    z-index: 650;
    top: var(--wp-utility-height);
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    height: 54px;
    border-bottom: 1px solid var(--wp-line);
    background: rgba(12, 12, 12, 0.96);
    backdrop-filter: blur(14px);
  }

  .wp-menu-toggle {
    align-self: stretch;
    padding: 0 16px;
    border: 0;
    border-right: 1px solid var(--wp-line);
    border-radius: 0;
    background: transparent;
    color: #ff6446;
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .wp-mobile-current {
    overflow: hidden;
    padding: 0 15px;
    color: #d3d0c9;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wp-main {
    margin-left: 0;
    padding: 76px 10px 42px;
  }

  .wp-pdf-page img {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.48);
  }

  .wp-chapter-nav {
    gap: 8px;
    margin-top: 12px;
  }

  .wp-chapter-link {
    min-height: 68px;
    padding: 12px;
  }

  .wp-chapter-link-label {
    font-size: 0.5rem;
  }

  .wp-chapter-link-title {
    font-size: 0.65rem;
  }

  .wp-footer {
    padding-top: 26px;
    font-size: 0.54rem;
  }
}

@media (max-width: 420px) {
  .wp-download {
    padding-right: 7px;
    padding-left: 7px;
  }

  .wp-main {
    padding-right: 6px;
    padding-left: 6px;
  }

  .wp-chapter-link-title {
    font-size: 0.6rem;
  }
}

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

@media print {
  .wp-utility,
  .wp-sidebar,
  .wp-mobile-bar,
  .wp-chapter-nav,
  .wp-footer {
    display: none !important;
  }

  .wp-shell {
    padding: 0;
  }

  .wp-main {
    margin: 0;
    padding: 0;
  }

  .wp-pdf-page {
    border: 0;
    box-shadow: none;
  }

  .wp-pdf-page img {
    box-shadow: none;
  }
}
