:root {
  --ink: #1b2420;
  --muted: #3e4c45;
  --paper: #f3eee4;
  --sheet: #fbf8f3;
  --line: #ddd4c4;
  --green: #234036;
  --green-deep: #183028;
  --cream: #f3eee4;
  --clay: #6e3424;
  --clay-soft: #f4e6dc;
  --focus: #1a4f86;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img,
svg {
  display: block;
}

a {
  color: var(--clay);
  text-underline-offset: 0.16em;
}

a:visited {
  color: var(--clay);
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 0.8rem;
  top: 0.6rem;
  transform: translateY(-160%);
  background: #fff;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 40;
}

.skip:focus {
  transform: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--green);
  color: var(--cream);
}

.top-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

.brand:visited {
  color: var(--cream);
}

.stone {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  padding: 0.15rem 0;
}

.nav a:visited {
  color: var(--cream);
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: #e4c2b0;
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(243, 238, 228, 0.55);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.publisher-bar {
  margin: 0;
  background: var(--green-deep);
  color: #e6dfd2;
  text-align: center;
  font-size: 0.92rem;
  padding: 0.55rem 1.25rem;
}

.publisher-bar a,
.publisher-bar a:visited {
  color: var(--cream);
}

.home,
.solo {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4.2rem;
}

.frame {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4.2rem;
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 42rem);
  gap: 2.4rem;
  align-items: start;
  justify-content: center;
}

.kicker {
  margin: 0 0 0.55rem;
  color: var(--clay);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
}

h2 {
  margin: 2.3rem 0 0.7rem;
  font-size: 1.65rem;
}

h3 {
  margin: 1.35rem 0 0.35rem;
  font-size: 1.22rem;
}

.lead {
  font-size: 1.14rem;
  margin-top: 0;
}

p {
  margin: 0.75rem 0;
}

.role-list,
.chapter-index,
.order,
.side ol,
.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.role-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.role-list li,
.order li,
.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
}

.role-list li {
  padding: 0.9rem 1rem 1rem;
  border-top: 3px solid var(--green);
}

.role-list a {
  color: inherit;
  text-decoration: none;
}

.role-list strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 500;
}

.role-list li:hover strong {
  color: var(--clay);
}

.chapter-index {
  margin-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.chapter-index li {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  gap: 0.2rem 0.85rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.num {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--clay);
  line-height: 1.2;
}

.chapter-index h3 {
  margin: 0 0 0.25rem;
}

.chapter-index h3 a {
  color: var(--ink);
  text-decoration: none;
}

.chapter-index h3 a:visited {
  color: var(--ink);
}

.chapter-index h3 a:hover {
  color: var(--clay);
}

.order {
  display: grid;
  gap: 0.7rem;
  counter-reset: step;
}

.order li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  counter-increment: step;
}

.order li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--clay);
  line-height: 1.2;
}

.first {
  background: var(--clay-soft);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.side {
  position: sticky;
  top: 4.6rem;
  font-size: 0.92rem;
}

.side p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.28rem 0.45rem;
  border-left: 2px solid transparent;
}

.side a:visited {
  color: var(--ink);
}

.side a:hover,
.side a[aria-current="page"] {
  color: var(--clay);
  border-left-color: var(--clay);
  background: var(--clay-soft);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: grid;
  text-decoration: none;
  max-width: 46%;
}

.pager a span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pager a strong {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
}

.pager .next {
  text-align: right;
  margin-left: auto;
}

.site-footer {
  background: var(--green-deep);
  color: #e6dfd2;
  padding: 2.4rem 1.25rem 1.6rem;
}

.foot-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.8rem 2rem;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  color: var(--cream);
  font-size: 1.15rem;
}

.site-footer a,
.site-footer a:visited {
  color: var(--cream);
}

.foot-links {
  display: grid;
  gap: 0.28rem;
}

.foot-links a {
  text-decoration: none;
}

.foot-links a:hover {
  text-decoration: underline;
}

.foot-note {
  max-width: 72rem;
  margin: 1.4rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(243, 238, 228, 0.22);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .frame {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .side,
  .frame > article {
    min-width: 0;
    max-width: 100%;
  }

  .side {
    position: static;
    order: -1;
  }

  .side ol {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .side a {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--sheet);
    padding: 0.28rem 0.65rem;
  }

  .side a[aria-current="page"] {
    border-color: var(--clay);
  }

  .role-list,
  .foot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.85rem);
    left: -1.25rem;
    right: -1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    background: var(--green-deep);
    padding: 0.4rem 1.25rem 0.9rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.4rem 0;
  }

  .pager {
    flex-direction: column;
  }

  .pager a,
  .pager .next {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }
}
