@media screen and (min-width: 1000px) {
  .writer--docs.writer--columns {
    --writer-column-width: 336px;
    --writer-column-gap: 64px;
  }

  .writer--resource .writer-column-content:has(> :is(.docs-stats-table, .spec-table-wrap)) {
    column-count: 1;
  }

  .writer--resource .writer-column-content:has(> :is(.docs-stats-table, .spec-table-wrap)) > :is(blockquote, p:not(.docs-stats-note)) {
    max-width: var(--writer-column-width);
  }
}

.writer .dotenv-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-block-end: 20px;
  break-inside: avoid-column;
}
.writer .dotenv-section,
.writer-guide-list > li[id] { scroll-margin-top: calc(var(--writer-header-height) + 1rem); }

.writer--resource .design-table-wrap { margin-bottom: 20px; }
.writer--resource .design-table {
  display: table;
  margin: 0;
  break-inside: auto;
}
.writer--resource .design-table tr { break-inside: avoid; }
.writer--resource .design-table :is(th, td) { overflow-wrap: anywhere; }

.writer--resource :is(.docs-stats-table, .spec-table-wrap) {
  column-span: all;
  overflow-x: auto;
}
.writer--resource .docs-stats-table .design-table { min-width: 38rem; }
.writer--resource .docs-stats-table img { vertical-align: middle; }
.writer--resource .docs-stats-note {
  column-span: all;
  color: var(--syntax);
  font-size: 12px;
  line-height: 20px;
}

.writer--resource .spec-table-wrap {
  max-height: 75dvh;
  margin-block-end: 20px;
  border: 1px solid var(--line);
}
.writer--resource .spec-table-wrap--full { max-height: none; }

.writer--resource .spec-table {
  display: table;
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--writer-mono);
  font-size: 12px;
}

.writer--resource .spec-table :is(th, td) {
  padding: 6px 8px;
  border-inline-end: 1px solid var(--line);
  background: var(--spec-row-background, var(--paper));
  text-align: center;
  white-space: nowrap;
}
.writer--resource .spec-table :is(th, td):last-child { border-inline-end: 0; }
.writer--resource .spec-table tbody tr:last-child > :is(th, td) { border-block-end: 0; }
.writer--resource .spec-table tbody tr:nth-child(odd) { --spec-row-background: light-dark(#f4f4f5, #141414); }
.writer--resource .spec-table thead th { position: sticky; top: 0; z-index: 2; }
.writer--resource .spec-table th:first-child { position: sticky; left: 0; z-index: 1; text-align: start; }
.writer--resource .spec-table thead th:first-child { z-index: 3; }
.writer--resource .spec-table :is(.spec-rate, .spec-mark) { font-weight: 600; }
.writer--resource .spec-table .is-pass { color: light-dark(#286438, #91cd99); }
.writer--resource .spec-table .is-strong { color: light-dark(#486523, #bdd98c); }
.writer--resource .spec-table .is-mid { color: var(--brand-ink); }
.writer--resource .spec-table .is-fail { color: light-dark(#9f292e, #ee9c9f); }

.writer--resource .spec-tip { position: relative; display: inline-block; cursor: help; }
.writer--resource .spec-tip-label {
  display: block;
  max-inline-size: clamp(8rem, 42vw, 15rem);
  overflow-wrap: anywhere;
  white-space: normal;
}
.writer--resource .spec-tip-panel {
  display: none;
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  z-index: 4;
  width: max-content;
  max-width: min(22rem, 55vw);
  background: var(--paper);
  text-align: start;
  pointer-events: none;
}
.writer--resource .spec-tip:hover { z-index: 4; }
.writer--resource .spec-tip:hover .spec-tip-panel { display: block; }
.writer--resource .spec-table td:nth-last-child(-n+4) .spec-tip-panel { inset-inline: auto 0; }
.writer--resource .spec-table tbody tr:nth-last-child(-n+4) .spec-tip-panel { inset-block: auto 100%; }
.writer--resource .spec-tip-panel pre {
  margin: 0;
  padding: 6px 8px;
  font: inherit;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.writer :is(.design-choice--code, .design-video, .docs-package-manager-example, .design-browser-wrapper, .design-secrets-artifact) {
  margin: 0 0 20px;
  break-inside: avoid-column;
}

.writer .design-choice--code .design-codeblock-wrap { margin-block-end: 0; }
.writer :is(.design-choice-options, .docs-package-manager-options, .docs-package-manager-toolbar) {
  display: flex;
  flex-wrap: wrap;
}
.writer :is(.design-choice-option, .docs-package-manager-options button) {
  padding: 4px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.writer :is(.design-choice-option, .docs-package-manager-options button)[aria-pressed="true"] { font-weight: 600; }
.writer .design-video-player { display: block; width: 100%; }

.writer .docs-package-manager-toolbar { align-items: center; gap: 8px; margin-bottom: 8px; }
.writer .docs-package-manager-filename { font-family: var(--writer-mono); }
.writer .docs-package-manager-example > .design-codeblock-wrap { margin-block-end: 0; }

.writer :is(a.design-browser, .design-secrets-artifact-card) {
  display: block;
  border: 1px solid var(--line);
  text-decoration: none;
}
.writer .design-browser-toolbar { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.writer .design-browser-address { text-decoration: underline; }
.writer .design-browser-content { padding: 16px; white-space: pre-wrap; font-family: var(--writer-mono); }

.writer .design-secrets-artifact-card { padding: 12px; }
.writer :is(.design-secrets-artifact-rows, .design-secret-pair) { display: grid; gap: 8px; }
.writer .design-secret-field {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  font: inherit;
  font-family: var(--writer-mono);
}
