.layout {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr);
  gap: clamp(20px, 4vw, 65px);
  margin: 2rem 0 5rem;
}
.layout nav {
  display: flex;
  flex-direction: column;
  align-self: start;
  border-top: 2px solid var(--ink);
}
.layout nav a {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.layout nav a[aria-current] {
  color: var(--accent);
}
.layout small {
  display: block;
  font-size: 0.88rem;
  font-weight: 400;
}
.layout section {
  max-width: 760px;
  margin-bottom: 2.5rem;
}
.layout h2 {
  font:
    600 clamp(2rem, 5vw, 3.5rem)/1 Plex,
    Arial;
  margin: 0.4rem 0 1rem;
  letter-spacing: -0.05em;
}
.layout h3 {
  font:
    600 1.25rem Plex,
    Arial;
}
.layout section > a {
  text-decoration: underline;
}
.layout form {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--soft);
  padding: 1rem;
  border: 1px solid var(--line);
}
.layout label {
  display: grid;
  gap: 0.3rem;
}
.layout input,
.layout select {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.45rem;
  max-width: 100%;
}
.layout fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.layout fieldset label {
  display: inline-flex;
  align-items: center;
  margin-right: 0.8rem;
}
.layout .btn {
  background: var(--ink);
  color: var(--paper);
}
.layout output {
  display: block;
  background: #26392e;
  color: #fffde9;
  padding: 0.9rem 1rem;
  font-family: monospace;
}
.layout pre {
  background: var(--soft);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  overflow: auto;
  line-height: 1.6;
}
.mast .theme {
  margin-left: auto;
}
.layout [hidden] {
  display: none;
}
@media (max-width: 700px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .layout nav a {
    flex: 1;
  }
  .layout nav small {
    display: none;
  }
  .mast .wrap {
    gap: 12px;
  }
  .mast .logo {
    font-size: 24px;
  }
  .layout form {
    align-items: stretch;
    flex-direction: column;
  }
  .layout pre {
    font-size: 0.85rem;
  }
}
.patternmodel {
  display: block;
  width: 100%;
  height: clamp(115px, 14vw, 165px);
  object-fit: contain;
  border: 1px solid var(--line);
  background: #edf0e9;
  background-image: radial-gradient(#bdc7c3 0.85px, transparent 1px);
  background-size: 12px 12px;
}
.layout h2 {
  font:
    500 clamp(2rem, 3.2vw, 3rem)/1.1 Georgia,
    serif;
  letter-spacing: -0.035em;
}
.layout section > p {
  font:
    18px/1.65 Georgia,
    serif;
  max-width: 68ch;
}
.layout nav a {
  padding: 13px 12px;
}
.layout nav a[aria-current] {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  background: var(--soft);
}
.layout output {
  background: #192b40;
}
.navlinks {
  display: flex;
  gap: 18px;
  font-size: 14px;
}
.layout pre {
  font-size: 14px;
}
.layout textarea,
.layout input,
.layout select {
  min-height: 38px;
}
.layout input[type="checkbox"] {
  min-height: 0;
}
.layout form button {
  min-height: 42px;
}
.patternmodel + h3 {
  margin-top: 1.2em;
}
.layout nav {
  position: sticky;
  top: 10px;
}
.layout .ey {
  color: var(--accent);
}
@media (max-width: 700px) {
  .layout nav {
    position: static;
  }
  .mast .navlinks {
    order: 3;
    flex: 1 0 100%;
    justify-content: space-between;
  }
  .mast .wrap {
    flex-wrap: wrap;
  }
  .layout nav a {
    min-height: 42px;
  }
  .layout form {
    align-items: start;
  }
  .layout .patternmodel {
    height: auto;
  }
  .layout section > p {
    font-size: 17px;
  }
}
