.shell {
  display: grid;
  grid-template-columns: var(--spine-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* The spine: the one bold element of the design */
.spine {
  position: sticky; top: 0; height: 100vh;
  background: var(--olive-800);
  color: var(--beige-100);
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0 var(--space-3);
  /* stitched binding edge */
  box-shadow: inset -6px 0 0 var(--olive-900);
}
.spine::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 14px;
  border-right: 1px dashed color-mix(in srgb, var(--olive-300) 55%, transparent);
}
.spine__title {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.12em;
  color: var(--beige-100);
  text-decoration: none;
}
.spine__title:hover { color: var(--olive-300); }
.spine__nav {
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  font-family: var(--font-ui); font-size: var(--step--1);
}
.spine__nav a, .spine__nav button {
  color: var(--beige-200); text-decoration: none;
  background: none; border: 0; cursor: pointer; padding: 0.2rem 0.4rem;
}
.spine__nav a[aria-current="page"] { color: var(--olive-300); text-decoration: underline; text-underline-offset: 0.35em; }
.spine__nav a:hover, .spine__nav button:hover { color: var(--olive-300); }

.page {
  padding: var(--space-5) clamp(1.25rem, 6vw, 6rem) var(--space-5);
  max-width: 64rem;
  outline: none;
}
.page:focus { outline: none; }

@media (max-width: 760px) {
  .shell { display: block; }
  .spine {
    position: sticky; height: auto; z-index: 5;
    flex-direction: row; padding: 0.6rem 1.1rem;
    box-shadow: inset 0 -5px 0 var(--olive-900);
  }
  .spine::after { display: none; }
  .spine__title { writing-mode: horizontal-tb; font-size: 1.5rem; letter-spacing: 0.04em; }
  .spine__nav { flex-direction: row; gap: 0.5rem; }
  .page { padding-top: var(--space-4); }
}
