@font-face {
  font-family: DM Sans;
  src: url(../assets/dm-sans-400.ttf);
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: DM Sans;
  src: url(../assets/dm-sans-600.ttf);
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: DM Sans;
  src: url(../assets/dm-sans-700.ttf);
  font-weight: 700 900;
  font-display: swap;
}
:root {
  --ink: #272b20;
  --dim: #5b6052;
  --line: #c9cbb9;
  --accent: #52603c;
  --tint: #e0e3d0;
  --paper: #f1efe4;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  scroll-padding-top: 90px;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
p,
figure {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #927942;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 12px;
  top: -64px;
  z-index: 10;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
.top {
  background: #171a15;
  color: #eee9d8;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #404436;
}
.bar {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1440px;
  margin: auto;
  height: 65px;
  padding: 0 42px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 25px;
  height: 25px;
}
.brand strong {
  font-size: 21px;
  letter-spacing: -1px;
}
.brand span {
  border-left: 1px solid #555a49;
  margin-left: 5px;
  padding-left: 13px;
  color: #c5c8b9;
  font-size: 14px;
}
.launch {
  background: #d9cdab;
  border-radius: 5px;
  color: #20241b;
  font-size: 13px;
  text-decoration: none;
  padding: 8px 12px;
  font-weight: 600;
}
.launch span {
  margin-left: 4px;
}
#search-open {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #515644;
  border-radius: 5px;
  background: #24291f;
  color: #dbdfce;
  margin-left: auto;
  width: 220px;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
}
#search-open svg {
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}
kbd {
  margin-left: auto;
  background: #353a2d;
  border: 1px solid #5a604b;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 11px;
}
.shell {
  max-width: 1440px;
  display: grid;
  grid-template-columns: minmax(185px, 235px) minmax(0, 700px) minmax(
      145px,
      185px
    );
  justify-content: space-between;
  gap: clamp(28px, 4vw, 70px);
  margin: auto;
  padding: 0 42px;
}
.sidebar,
.outline {
  position: sticky;
  top: 65px;
  align-self: start;
  max-height: calc(100vh - 65px);
  overflow-y: auto;
  padding: 42px 0 24px;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding-right: 20px;
  min-height: calc(100vh - 65px);
}
#topics > div + div {
  margin-top: 25px;
}
#topics small,
.outline strong {
  display: block;
  font-weight: 700;
  letter-spacing: 0.015em;
  font-size: 12px;
  margin: 0 0 8px;
}
#topics small {
  padding-left: 10px;
}
#topics a,
#outline a {
  display: block;
  font-size: 14px;
  color: var(--dim);
  text-decoration: none;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 4px;
}
#topics a:hover,
#topics a[aria-current] {
  background: var(--tint);
  color: var(--accent);
}
#topics a[aria-current] {
  font-weight: 600;
}
#outline a {
  border-left: 2px solid var(--line);
  border-radius: 0;
  font-size: 13px;
  padding: 5px 11px;
}
#outline .current,
#outline a:hover {
  color: var(--accent);
  border-color: #8d986f;
}
#menu {
  display: none;
}
main {
  min-width: 0;
  padding: 43px 0 80px;
}
#crumb {
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--dim);
  margin-bottom: 19px;
}
h1 {
  font-size: clamp(36px, 3.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
h2 {
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.24;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--dim);
  margin: 15px 0 32px;
}
article section {
  margin: 31px 0;
}
section p,
section ul,
section ol {
  font-size: 16px;
  line-height: 1.72;
  margin: 12px 0;
}
section > a {
  font-size: 14px;
  font-weight: 600;
}
section li + li {
  margin-top: 8px;
}
section ul,
section ol {
  padding-left: 22px;
}
code {
  background: var(--tint);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
strong,
b {
  font-weight: 600;
}
.example {
  border: 1px solid #515441;
  border-radius: 8px;
  background: #23281e;
  color: #f5f0de;
  margin: 18px 0;
  padding: 20px 24px;
}
.example figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.example figcaption strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}
.example figcaption span,
.example > a {
  font-size: 12px;
  color: #cfceba;
}
.mix,
.legs {
  display: flex;
  gap: 4px;
}
.mix {
  height: 7px;
  margin: 17px 0 12px;
}
.mix i,
.legs span {
  flex: 1;
  min-width: 0;
}
.mix i {
  background: #c2ac7c;
}
.mix i:nth-child(2) {
  background: #859781;
}
.mix i:last-child {
  background: #b68870;
}
.legs span {
  font-size: 12px;
  color: #dfdfcf;
}
.legs b {
  display: block;
  color: white;
  font-size: 18px;
  margin-top: 3px;
}
.example > a {
  display: inline-block;
  margin-top: 18px;
  color: #e1d4b2;
}
.paths a {
  display: block;
  padding: 14px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.paths strong,
.paths span {
  display: block;
}
.paths span {
  font-size: 14px;
  color: var(--dim);
  margin-top: 3px;
}
.paths a:hover strong {
  color: var(--accent);
}
#pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 42px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}
#pager a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#pager small,
#matches small {
  display: block;
  color: var(--dim);
  font-size: 11px;
  margin-bottom: 4px;
}
#pager .next {
  grid-column: 2;
  text-align: right;
}
#pager a:hover,
#matches a:hover,
#matches a:focus {
  background: var(--tint);
}
dialog {
  width: min(540px, calc(100% - 24px));
  max-height: 75vh;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 80px #181c1444;
}
dialog::backdrop {
  background: #161b1280;
}
dialog h2 {
  font-size: 21px;
}
.find {
  display: flex;
  gap: 8px;
  margin: 16px 0 8px;
}
.find input {
  min-width: 0;
  flex: 1;
}
.find input,
.find button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  background: white;
}
.find button {
  font-size: 13px;
}
#matches {
  max-height: 46vh;
  overflow: auto;
}
#matches a {
  display: block;
  text-decoration: none;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
#matches p {
  font-size: 14px;
  padding: 12px;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 195px minmax(0, 690px);
    gap: 36px;
  }
  .outline {
    display: none;
  }
}
@media (max-width: 740px) {
  :root {
    scroll-padding-top: 74px;
  }
  .bar {
    height: 55px;
    padding: 0 16px;
    gap: 9px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand span {
    font-size: 13px;
  }
  .shell {
    display: block;
    padding: 0 19px;
  }
  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
    max-height: none;
    padding: 0;
  }
  #menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: none;
    padding: 13px 0;
    color: var(--dim);
    font-size: 13px;
    text-align: left;
  }
  #topics {
    display: none;
    padding-bottom: 18px;
  }
  #topics.open {
    display: block;
  }
  main {
    padding: 25px 0 48px;
  }
  .lead {
    font-size: 18px;
  }
  .example {
    padding: 16px;
  }
  #search-open {
    width: auto;
  }
  #search-open kbd {
    display: none;
  }
}
@media (max-width: 480px) {
  #search-open span {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .brand img {
    width: 21px;
  }
  .launch {
    font-size: 12px;
    padding: 8px;
  }
  .brand span {
    padding-left: 8px;
    margin-left: 2px;
  }
  #pager {
    gap: 6px;
  }
  #pager a {
    font-size: 13px;
  }
}

/* A parchment reading surface and an engraved allocation plate. */
:root {
  --display: "Instrument Serif", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
h1,
h2,
.brand strong,
.example figcaption strong {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
}
h2 {
  font-size: clamp(29px, 2.5vw, 39px);
}
.brand strong {
  font-size: 31px;
}
.brand img {
  width: 29px;
  height: 29px;
}
.brand span,
#topics small,
.outline strong,
#crumb {
  font-family: var(--mono);
}
#topics small,
.outline strong,
#crumb {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#topics a {
  border-left: 2px solid transparent;
  border-radius: 0;
}
#topics a[aria-current] {
  border-left-color: var(--accent);
}
article .lead {
  max-width: 49ch;
}
.example {
  padding: clamp(18px, 2.5vw, 34px);
  border-radius: 2px;
  background:
    linear-gradient(90deg, #1e251bf5, #1e241be3 60%, #1e231bb5),
    url(../assets/horizon/landscape.webp) 85% 40% / cover;
}
.example figcaption strong {
  font-size: 34px;
}
.example figcaption span,
.legs span {
  font-family: var(--mono);
  font-size: 11px;
}
.launch,
#search-open,
#pager a,
dialog {
  border-radius: 2px;
}
.study-link {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  margin: -12px 0 8px;
}
@media (max-width: 480px) {
  .brand strong {
    font-size: 26px;
  }
  .brand img {
    width: 25px;
    height: 25px;
  }
}
@view-transition {
  navigation: auto;
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-new(root) {
    animation: reading-enter 0.27s ease-out both;
  }
  @keyframes reading-enter {
    from {
      opacity: 0.25;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
