/* Translator API article and reference: inline code, code samples and the "read this first" note.
   The rest comes from template-article.css. */
.article code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #f2f2f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}
.article pre {
  max-width: 100%;
  margin: 0 0 1.25em;
  padding: 16px 20px;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--ink);
  color: #f5f5f5;
  font-size: 0.875rem;
  line-height: 1.55;
}
.article pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
  white-space: pre;
}
.article pre:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
}
.article th code,
.article td code {
  white-space: nowrap;
}
.article .api-note {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}
.article .api-note p:last-child {
  margin-bottom: 0;
}
.article .api-endpoint {
  font-weight: 700;
}
.article table:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
}
/* Tables: the body's overflow-wrap: anywhere would squeeze a column down to single letters on a phone. Words wrap
   only between words here; a table wider than the screen scrolls sideways instead. */
.article table {
  margin: 0 0 1.25em;
  overflow-wrap: normal;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.article th {
  background: var(--soft);
  font-weight: 700;
  white-space: nowrap;
  vertical-align: bottom;
}
.article td {
  min-width: 5.5rem;
  vertical-align: top;
}
.article td:last-child {
  min-width: 12rem;
}
.article tbody tr:nth-child(even) td {
  background: #fbfbfb;
}
.article .api-langs td,
.article .api-langs td:last-child {
  min-width: 0;
}
@media (max-width: 639px) {
  .article th,
  .article td {
    padding: 8px 10px;
  }
}
/* Phones: each row of a reference table becomes a card, and every cell shows its column name (data-label) above
   the value. The short language table stays a table. */
@media (max-width: 639px) {
  .article .api-table {
    display: block;
    overflow: visible;
    border: 0;
  }
  .article .api-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .article .api-table tbody,
  .article .api-table tr,
  .article .api-table td {
    display: block;
  }
  .article .api-table tr {
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .article .api-table td,
  .article .api-table td:last-child,
  .article .api-table tbody tr:nth-child(even) td {
    min-width: 0;
    border: 0;
    background: none;
  }
  .article .api-table td + td {
    border-top: 1px solid #eeeeee;
  }
  .article .api-table td:first-child {
    background: var(--soft);
  }
  .article .api-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 700;
  }
  .article .api-table td code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
