/* Aviatory — library: listings, reading pages, article blocks, comments. Loaded before base.css. */

.lib-body,
.lib-article {
  font-family: var(--font-sans);
}
/* Listing parts the filter shows on demand (filters.js); hidden without JS too. */
[data-toggle][hidden] {
  display: none !important;
}

/* ───────── Sticky search + topic filter ───────── */
.lib-filter-wrap {
  position: sticky;
  top: 65px;
  z-index: 30;
  background: rgba(10, 28, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lib-filter-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.lib-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.lib-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  display: flex;
}
.lib-search-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-bright);
  background: var(--inset);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 10px 12px 10px 34px;
  transition: border-color 0.16s;
}
.lib-search-input::placeholder {
  color: var(--text-dim);
}
.lib-search-input:focus {
  outline: none;
  border-color: var(--brand-ring);
}
.lib-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.lib-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition:
    color 0.16s,
    border-color 0.16s,
    background 0.16s;
}
.lib-tab:hover {
  color: var(--text-bright);
}
.lib-tab.is-active {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-2);
}
.lib-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--brand));
}
.lib-tab-count {
  font-size: 9.5px;
  color: var(--text-dim);
}

/* ───────── Body ───────── */
.lib-body {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 36px 96px;
}

/* ───────── Cards ───────── */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 18px;
}
.lib-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent, var(--brand));
  white-space: nowrap;
  transition: gap 0.16s;
}

/* ───────── Empty state + author strip ───────── */
.lib-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
}
.lib-empty-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}
/* ───────── Article / author page ───────── */
.lib-article {
  background: var(--bg);
  padding: 0 0 88px;
}
.lib-article-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 36px 0;
}
/* Topic badge in the blueprint header */
.lib-read-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.lib-read-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  padding: 4px 11px;
  border-radius: 4px;
  color: var(--accent, var(--brand));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

/* Meta strip under the header — same idiom as the project pages */
.lib-meta-strip {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.lib-meta-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}
.lib-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 28px 16px 0;
  margin-right: 28px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  flex-shrink: 0;
}
.lib-meta-item:last-child {
  border-right: 0;
  margin-right: 0;
}
.lib-meta-k {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--text-dimmer);
}
.lib-meta-v {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-bright);
}
/* The author's name links to the About page. */
a.lib-meta-v {
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 4px;
  transition:
    color 0.15s,
    text-decoration-color 0.15s;
}
a.lib-meta-v:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

/* ───────── Article layout: "On this page" beside the text (components/toc) ───────── */
/* The text keeps a reading measure; with a table of contents the list takes a column. */
.lib-article-main {
  min-width: 0;
  max-width: 760px;
}
.lib-article-inner.has-toc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border: 1px solid var(--line-2);
  background: rgba(7, 22, 36, 0.6);
}
.toc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: none;
  color: inherit;
  text-align: left;
  cursor: default;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-bright);
}
.toc-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-dimmer);
}
.toc-arrow {
  display: none;
  color: var(--text-dim);
  transition: transform 0.2s;
}
.toc-list {
  margin: 0;
  padding: 8px 0;
  list-style: none;
}
.toc-list a {
  display: flex;
  gap: 10px;
  padding: 7px 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
}
.toc-list a:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.03);
}
.toc-list a.is-active {
  color: var(--text-bright);
  border-left-color: var(--brand);
  background: rgba(190, 58, 52, 0.08);
}
.toc-num {
  flex: none;
  width: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.9;
  color: var(--text-dimmer);
}
.toc-list a.is-active .toc-num {
  color: var(--brand);
}
.toc-list li.is-sub a {
  padding-left: 44px;
  font-size: 12.5px;
}
.toc-list li.is-sub .toc-num {
  display: none;
}
.toc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line-2);
}
.toc-bar {
  flex: 1;
  height: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.toc-bar span {
  display: block;
  height: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
}
.toc-pct {
  width: 32px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: right;
  color: var(--text-dim);
}
/* Narrow screens: one column, the list is a box above the text that opens on demand. */
@media (max-width: 1100px) {
  .lib-article-inner.has-toc {
    display: block;
  }
  .lib-article-main {
    max-width: none;
  }
  .toc {
    position: static;
    max-height: none;
    margin-bottom: 32px;
  }
  .toc-head {
    border-bottom: 0;
    cursor: pointer;
  }
  .toc-arrow {
    display: block;
  }
  .toc.is-open .toc-head {
    border-bottom: 1px solid var(--line-2);
  }
  .toc.is-open .toc-arrow {
    transform: rotate(180deg);
  }
  .toc-progress {
    display: none;
  }
  /* Closed unless opened; without JS it simply stays open. */
  .js .toc:not(.is-open) .toc-list {
    display: none;
  }
}

/* Section heading — numbered rule above a full-size, readable heading */
.lib-chapter + .lib-chapter {
  margin-top: 8px;
}
.lib-chapter-head {
  margin: 48px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.lib-chapter:first-child .lib-chapter-head {
  margin-top: 0;
}
.lib-chapter-num {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-dimmer);
  margin-bottom: 12px;
}
.lib-chapter-num::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1px;
  background: var(--orange);
}
.lib-chapter-head .lib-h2 {
  margin: 0;
}
.lib-h2 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-bright);
  margin: 48px 0 16px;
  scroll-margin-top: 90px;
  text-wrap: balance;
}
.lib-p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.lib-list {
  margin: 0 0 24px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lib-list li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  text-wrap: pretty;
}
.lib-list li::marker {
  color: var(--brand);
}
.lib-code {
  position: relative;
  margin: 0 0 24px;
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.lib-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
}
.lib-code code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-bright);
  white-space: pre;
}
/* Language badge + copy button, shown in the corner of a code block */
.lib-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 18px;
  border-bottom: 1px solid var(--line);
}
.lib-code-lang {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.lib-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition:
    color 0.16s,
    border-color 0.16s;
}
.lib-code-copy:hover {
  color: var(--text-bright);
  border-color: var(--line-3);
}
.lib-code-copy.is-done {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
}
.lib-quote {
  margin: 0 0 24px;
  padding: 6px 0 6px 20px;
  border-left: 2px solid var(--brand);
  background: rgba(190, 58, 52, 0.05);
  font-size: 14.5px;
  line-height: 1.65;
  font-style: italic;
  color: var(--text-bright);
  text-wrap: pretty;
}
.lib-figure {
  margin: 0 0 24px;
}

.lib-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.lib-end {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
}
.lib-end-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 64px 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.lib-end-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 1px;
  background: var(--brand);
}
.lib-end-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin: 0;
}
.lib-back-row {
  margin-top: 40px;
}
/* Article sub-heading, lists */
.lib-h3 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin: 32px 0 12px;
  scroll-margin-top: 90px;
  text-wrap: balance;
}
.lib-list.is-ordered {
  list-style: decimal;
}
.lib-list.is-ordered li::marker {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.lib-list .lib-list {
  margin: 10px 0 0;
  gap: 8px;
}
.lib-quote {
  white-space: pre-line;
}
.lib-callout {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  background: var(--panel);
}
.lib-callout-label {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lib-callout-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-line;
}
.lib-callout-body > :last-child {
  margin-bottom: 0;
}

.lib-callout.is-note {
  border-left-color: var(--blue);
}
.lib-callout.is-note .lib-callout-label {
  color: var(--blue);
}
.lib-callout.is-warning {
  border-left-color: var(--orange);
}
.lib-callout.is-warning .lib-callout-label {
  color: var(--orange);
}
.lib-callout.is-important {
  border-left-color: var(--brand);
}
.lib-callout.is-important .lib-callout-label {
  color: var(--brand);
}
.lib-table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.lib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.6;
}
.lib-table th,
.lib-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lib-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--inset);
  white-space: nowrap;
}
.lib-table td {
  color: var(--text);
}
.lib-table tr:last-child td {
  border-bottom: 0;
}
.lib-hr {
  width: 64px;
  margin: 36px auto;
  border: 0;
  border-top: 1px solid var(--line-3);
}
.lib-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-mute);
  text-align: center;
}
/* A README's quote holds paragraphs; its task lists hold checkboxes. */
.lib-quote p {
  margin: 0 0 10px;
}
.lib-quote p:last-child {
  margin-bottom: 0;
}
.lib-list input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--brand);
}
.lib-inline-code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--inset);
  color: var(--text-bright);
  white-space: nowrap;
}
.lib-inline-img {
  max-width: 100%;
  vertical-align: middle;
  border-radius: 3px;
}
.lib-p s,
.lib-list s,
.lib-callout-body s {
  color: var(--text-mute);
}

@media (max-width: 720px) {
  .lib-h3 {
    font-size: 17px;
    margin: 26px 0 10px;
  }
  .lib-table th,
  .lib-table td {
    padding: 8px 11px;
  }
}
/* ───────── Responsive ───────── */
@media (max-width: 720px) {
  /* Wrapped onto three rows the bar is 180px tall: sticky, it would cover a fifth of the screen. */
  .lib-filter-wrap {
    position: static;
  }
  /* Touch targets below 44px get extra padding on phones only. */
  a.lib-meta-v {
    position: relative;
  }
  a.lib-meta-v::after {
    content: "";
    position: absolute;
    inset: -12px 0;
  }
  .lib-end-head .lib-card-cta {
    padding: 15px 0;
  }
  .lib-tab,
  .lib-article .doc-comment-submit {
    min-height: 44px;
  }
  .lib-tab {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .lib-filter-inner,
  .lib-body,
  .lib-article-inner,
  .lib-meta-strip-inner,
  .lib-end {
    padding-left: 20px;
    padding-right: 20px;
  }
  .lib-body {
    padding-top: 40px;
  }
  .lib-search {
    max-width: none;
  }
}
@media (max-width: 560px) {
  .lib-article-inner,
  .lib-end {
    padding-left: 18px;
    padding-right: 18px;
  }
  .lib-h2 {
    margin-top: 40px;
  }
}
/* ───────── Comments (components/comments): square, labelled, quiet ───────── */
.lib-article .doc-comments {
  margin-top: 64px;
}
.lib-article .doc-comments-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.lib-article .doc-comments-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-bright);
}
.lib-article .doc-comments-count {
  padding: 3px 7px;
  border: 1px solid var(--line-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-bright);
}
/* The form: a box with a brand rule on top, real labels over square fields. */
.lib-article .doc-comment-form {
  padding: 22px 24px 20px;
  border: 1px solid var(--line-2);
  border-top: 2px solid var(--brand);
  background: rgba(255, 255, 255, 0.025);
}
.lib-article .doc-comment-form-title {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-bright);
}
.lib-article .doc-comment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.lib-article .doc-comment-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.lib-article .doc-comment-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}
.lib-article .doc-comment-label span {
  margin-left: 6px;
  color: var(--text-dimmer);
}
.lib-article .doc-comment-input,
.lib-article .doc-comment-textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 14.5px;
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.lib-article .doc-comment-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
}
.lib-article .doc-comment-input:focus,
.lib-article .doc-comment-textarea:focus {
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.06);
}
.lib-article .doc-comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.lib-article .doc-comment-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.lib-article .doc-comment-error {
  display: block;
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--brand);
  background: rgba(190, 58, 52, 0.1);
  font-size: 13px;
  color: #e8a49e;
}
.lib-article .doc-comment-submit {
  padding: 11px 18px;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition:
    background 0.15s,
    opacity 0.15s;
}
.lib-article .doc-comment-submit:hover {
  background: #d0443d;
}
.lib-article .doc-comment-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.lib-article .doc-comments-empty {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
/* The thread: square monograms, a rule between comments, replies indented on a line. */
.lib-article .doc-comment-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.lib-article .doc-comment {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.lib-article .doc-comment-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-3);
  background: rgba(124, 186, 242, 0.06);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-bright);
}
.lib-article .doc-comment-avatar.is-author {
  border-color: var(--brand);
  background: rgba(190, 58, 52, 0.15);
  color: #f1b8b2;
}
.lib-article .doc-comment-body {
  min-width: 0;
}
.lib-article .doc-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lib-article .doc-comment-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
}
.lib-article .doc-comment-badge {
  padding: 2px 6px;
  border: 1px solid rgba(190, 58, 52, 0.5);
  background: rgba(190, 58, 52, 0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #e58a80;
}
.lib-article .doc-comment-date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.lib-article .doc-comment-text {
  margin: 6px 0 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.lib-article .doc-comment-replies {
  margin: 16px 0 0;
  padding: 0 0 0 16px;
  list-style: none;
  border-left: 1px solid var(--line-2);
}
.lib-article .doc-comment.is-reply {
  padding: 2px 0;
  border-bottom: 0;
}
@media (max-width: 640px) {
  .lib-article .doc-comment-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .lib-article .doc-comment-form {
    padding: 18px 16px;
  }
  .lib-article .doc-comment-form-foot {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 900px) {
  .lib-search-input,
  .lib-article .doc-comment-input,
  .lib-article .doc-comment-textarea {
    font-size: 16px;
  }
}

/* Phones: the meta strip (article pages) becomes a 2 × 2 grid instead of
   running off the screen sideways. */
@media (max-width: 560px) {
  .lib-meta-strip-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    overflow: visible;
  }
  .lib-meta-item {
    margin-right: 0;
    padding: 12px 0;
    border-right: 0;
    white-space: normal;
  }
}
