/* wv40 :: documentation and rail layout
   The original site carried a persistent 200px left rail; it survives here as
   a 250px documentation rail that collapses above the article on small screens. */

.wv40-docshell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 40px 0 72px;
}

.wv40-rail {
  position: sticky;
  top: 98px;
  border: 1px solid var(--wv40-line-strong);
  border-radius: var(--wv40-radius-small);
  background: var(--wv40-paper);
  box-shadow: var(--wv40-shadow);
  overflow: hidden;
}

.wv40-rail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--wv40-blue);
  border-bottom: 1px solid var(--wv40-ink);
}

.wv40-rail__toggle {
  display: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  padding: 4px 8px;
  margin-right: 8px;
  cursor: pointer;
}

.wv40-rail__toggle:hover,
.wv40-rail__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.wv40-rail__title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--wv40-blue);
  padding: 10px 14px;
  margin: 0;
  border-bottom: 0;
}

.wv40-rail__group {
  padding: 12px 14px;
  border-bottom: 1px solid var(--wv40-line);
}

.wv40-rail__group:last-child {
  border-bottom: 0;
}

.wv40-rail__group h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wv40-terra);
  margin: 0 0 7px;
}

.wv40-rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.wv40-rail a {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--wv40-ink-soft);
  text-decoration: none;
  padding: 6px 8px;
  border-left: 3px solid transparent;
  border-radius: 0 2px 2px 0;
}

.wv40-rail a:hover {
  background: var(--wv40-wash);
  color: var(--wv40-blue);
  border-left-color: var(--wv40-sky);
}

.wv40-rail a[aria-current="page"] {
  background: var(--wv40-lavender);
  color: var(--wv40-blue);
  border-left-color: var(--wv40-blue);
}

.wv40-rail__note {
  font-size: 12px;
  color: var(--wv40-muted);
  margin: 0;
  line-height: 1.5;
}

.wv40-article {
  min-width: 0;
}

.wv40-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 12px;
  color: var(--wv40-muted);
  border-bottom: 1px solid var(--wv40-line);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.wv40-article__meta strong {
  color: var(--wv40-ink);
}

.wv40-toc {
  border: 1px solid var(--wv40-line);
  background: var(--wv40-wash);
  border-radius: 2px;
  padding: 16px 20px;
  margin: 0 0 30px;
}

.wv40-toc h2 {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--wv40-terra);
  margin: 0 0 8px;
  border: 0;
  padding: 0;
}

.wv40-toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 28px;
  font-size: 14px;
}

.wv40-toc li {
  margin: 5px 0;
}

.wv40-toc a {
  text-decoration: none;
  font-weight: 700;
}

.wv40-toc a:hover {
  text-decoration: underline;
}

.wv40-next {
  margin-top: 44px;
  border-top: 2px solid var(--wv40-sky-wash);
  padding-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wv40-next a {
  display: block;
  border: 1px solid var(--wv40-line-strong);
  border-radius: 2px;
  background: var(--wv40-paper);
  padding: 14px 16px;
  text-decoration: none;
  box-shadow: var(--wv40-shadow-tight);
  transition: transform 0.15s var(--wv40-ease);
}

.wv40-next a:hover {
  transform: translate(-1px, -1px);
  background: var(--wv40-wash);
}

.wv40-next span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wv40-terra);
  font-weight: 700;
  margin-bottom: 3px;
}

.wv40-next strong {
  font-size: 15px;
  color: var(--wv40-blue);
}

.wv40-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--wv40-line);
}

.wv40-step:last-child {
  border-bottom: 0;
}

.wv40-step__n {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wv40-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--wv40-ink);
  border-radius: 2px;
  box-shadow: var(--wv40-shadow-tight);
}

.wv40-step h3 {
  margin: 3px 0 5px;
  font-size: 16.5px;
}

.wv40-step p {
  margin: 0;
  font-size: 15px;
}

.wv40-staticlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.wv40-staticlist > li {
  border: 1px solid var(--wv40-line);
  border-left: 4px solid var(--wv40-sky);
  background: var(--wv40-paper);
  border-radius: 0 2px 2px 0;
  padding: 14px 18px;
}

.wv40-staticlist h3 {
  font-size: 16px;
  margin: 0 0 5px;
}

.wv40-staticlist p {
  margin: 0;
  font-size: 14.5px;
}

.wv40-staticlist .wv40-link {
  font-size: 14px;
}

.wv40-figure {
  margin: 24px 0;
  border: 1px solid var(--wv40-line-strong);
  background: var(--wv40-paper);
  border-radius: var(--wv40-radius-small);
  padding: 12px;
  box-shadow: var(--wv40-shadow);
}

.wv40-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--wv40-line);
}

.wv40-figure figcaption {
  font-size: 12.5px;
  color: var(--wv40-muted);
  margin-top: 9px;
}

.wv40-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.wv40-shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--wv40-ink);
  border-radius: 2px;
  box-shadow: var(--wv40-shadow-tight);
  background: #fff;
}

.wv40-tool {
  border: 1px solid var(--wv40-line-strong);
  border-radius: 2px;
  background: var(--wv40-paper);
  box-shadow: var(--wv40-shadow);
  padding: 22px 24px;
  margin: 26px 0;
}

.wv40-tool h2 {
  border: 0;
  padding: 0;
  margin: 0 0 6px;
  font-size: 20px;
}

.wv40-tool p {
  margin: 0 0 16px;
  font-size: 14.5px;
}

.wv40-field {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.wv40-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wv40-muted);
  margin-bottom: 5px;
}

.wv40-input {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--wv40-line-strong);
  border-radius: var(--wv40-radius);
  background: #fff;
  color: var(--wv40-ink);
  min-width: 200px;
}

.wv40-input:focus {
  border-color: var(--wv40-blue);
  outline: 3px solid rgba(126, 170, 255, 0.45);
  outline-offset: 1px;
}

.wv40-formnote {
  font-size: 13px;
  color: var(--wv40-muted);
  margin: 12px 0 0;
  min-height: 20px;
}

.wv40-formnote.is-warn {
  color: var(--wv40-terra);
  font-weight: 700;
}

/* changelog */

.wv40-log {
  display: grid;
  gap: 0;
  border-left: 3px solid var(--wv40-sky);
  margin: 24px 0 0;
  padding-left: 22px;
}

.wv40-log__rel {
  position: relative;
  padding: 0 0 26px;
}

.wv40-log__rel::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--wv40-paper);
  border: 3px solid var(--wv40-blue);
  border-radius: 50%;
}

.wv40-log__rel h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.wv40-log__date {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wv40-terra);
  display: block;
  margin-bottom: 8px;
}

.wv40-log__rel ul {
  margin: 0;
  padding-left: 18px;
}

.wv40-log__rel li {
  font-size: 14.5px;
  margin: 5px 0;
  color: var(--wv40-ink-soft);
}

/* forum board table */

.wv40-board {
  border: 1px solid var(--wv40-line-strong);
  border-radius: 2px;
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--wv40-shadow);
}

.wv40-board table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wv40-paper);
}

.wv40-board th {
  background: var(--wv40-blue);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 14px;
}

.wv40-board td {
  border-top: 1px solid var(--wv40-line);
  padding: 13px 14px;
  font-size: 14.5px;
  vertical-align: top;
}

.wv40-board tr:nth-child(even) td {
  background: var(--wv40-wash);
}

.wv40-board h3 {
  margin: 0 0 3px;
  font-size: 15.5px;
}

.wv40-board p {
  margin: 0;
  font-size: 13.5px;
  color: var(--wv40-muted);
}

.wv40-board__count {
  font-size: 14px;
  font-weight: 700;
  color: var(--wv40-blue);
  white-space: nowrap;
}

.wv40-board__last {
  font-size: 12.5px;
  color: var(--wv40-muted);
  white-space: nowrap;
}

.wv40-board__last strong {
  display: block;
  color: var(--wv40-ink);
}

/* photo journal */

.wv40-albums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.wv40-album {
  border: 1px solid var(--wv40-line-strong);
  border-radius: 2px;
  background: var(--wv40-paper);
  overflow: hidden;
  box-shadow: var(--wv40-shadow-tight);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s var(--wv40-ease), box-shadow 0.16s var(--wv40-ease);
}

.wv40-album:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0, 51, 153, 0.22);
}

.wv40-album img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--wv40-line);
  background: var(--wv40-lavender);
}

.wv40-album__blank {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
      135deg,
      rgba(0, 51, 153, 0.05) 0,
      rgba(0, 51, 153, 0.05) 8px,
      transparent 8px,
      transparent 16px
    ),
    var(--wv40-lavender);
  border-bottom: 1px solid var(--wv40-line);
}

.wv40-album__blank span {
  font-size: 16px;
  padding: 0 14px;
  text-align: center;
  line-height: 1.3;
  font-weight: 700;
  color: var(--wv40-blue);
  letter-spacing: -0.04em;
  opacity: 0.55;
}

.wv40-album__body {
  padding: 12px 14px 14px;
}

.wv40-album__body strong {
  color: var(--wv40-blue);
  font-size: 15px;
}

.wv40-album__body span {
  display: block;
  font-size: 13px;
  color: var(--wv40-muted);
  margin-top: 3px;
}

.wv40-album-group {
  margin-top: 34px;
}

.wv40-album-group h2 {
  font-size: 22px;
  border-bottom: 2px solid var(--wv40-sky-wash);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .wv40-rail__toggle {
    display: inline-block;
  }

  .wv40-rail__inner.is-closed {
    display: none;
  }

  .wv40-docshell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 56px;
  }

  .wv40-rail {
    position: static;
  }

  .wv40-rail__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wv40-rail__group {
    border-right: 1px solid var(--wv40-line);
  }

  .wv40-albums {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wv40-toc ol {
    columns: 1;
  }
}

@media (max-width: 620px) {
  .wv40-rail__inner {
    grid-template-columns: 1fr;
  }

  .wv40-rail__group {
    border-right: 0;
  }

  .wv40-albums {
    grid-template-columns: 1fr;
  }

  .wv40-next {
    grid-template-columns: 1fr;
  }

  .wv40-shots {
    grid-template-columns: 1fr;
  }

  .wv40-board {
    overflow-x: auto;
  }

  .wv40-board table {
    min-width: 560px;
  }

  .wv40-field {
    align-items: stretch;
  }

  .wv40-input {
    width: 100%;
  }
}

/* article level typography, since docs bodies are not all wrapped in .wv40-prose */
.wv40-article > h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wv40-sky-wash);
}

.wv40-article > h3 {
  font-size: 18px;
  margin: 26px 0 8px;
}

.wv40-article > h2:first-child {
  margin-top: 0;
}

/* reference shelf, compact two column list with the source line below the link */
.wv40-tool .wv40-staticlist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wv40-tool .wv40-staticlist > li {
  padding: 11px 14px;
}

.wv40-tool .wv40-staticlist a {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.wv40-tool .wv40-staticlist span {
  display: block;
  font-size: 12px;
  color: var(--wv40-muted);
  margin-top: 3px;
}

@media (max-width: 700px) {
  .wv40-tool .wv40-staticlist {
    grid-template-columns: 1fr;
  }
}
