/* the accessibility profile page. The extension screenshot is always a dark page, whatever the site theme */
.profile-brand { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 0; }
.profile-brand p { margin: 0; color: var(--muted); max-width: 40rem; }
.profile-mark { flex: none; line-height: 0; }
.profile-mark-svg { display: block; width: 4rem; height: 4rem; }
.profile-text { max-width: 44rem; margin: 0 0 1.5rem; }

.profile-example { display: grid; gap: 1.5rem 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 60rem) { .profile-example { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.profile-example .frame .snippet { margin: 0; border: 0; border-radius: 0; }
.profile-example h3 { margin-top: 0; }

/* the table keeps its columns readable and scrolls in its region on a narrow screen */
.profile-table { min-width: 40rem; }
.profile-table th[scope="row"], .profile-table td code { white-space: nowrap; }
.starters { min-width: 32rem; max-width: 50rem; }
.profile-later { margin: 0 0 1rem; padding-left: 1.2rem; max-width: 46rem; }
.profile-later li { margin-bottom: 0.4rem; }

.learn-grid { display: grid; gap: 1.5rem 2rem; grid-template-columns: 1fr; align-items: start; }
.learn-grid .frame { background: #000000; }
.learn-grid img { display: block; width: 100%; height: auto; background: #111111; }
@media (min-width: 60rem) { .learn-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.learn-grid p { max-width: 40rem; }

/* the download links and the guide links are small text, so each gets a 44 pixel tall target */
.builds a, .doc-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.builds td { overflow-wrap: anywhere; }
.doc-links { margin: 0 0 1.5rem; padding-left: 1.2rem; max-width: 46rem; }

.snippet {
  margin: 0.75rem 0; padding: 0.9rem 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px;
  background: var(--band); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: 0.95rem; line-height: 1.45;
}
.band .snippet { background: var(--bg); }
.snippet:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (forced-colors: active) {
  .learn-grid img { forced-color-adjust: none; }
  .snippet { border-color: CanvasText; }
}
/* the screenshot sits on black, so the title bar keeps the page colours instead of inheriting dark text in light mode */
.learn-grid .frame .frame-bar { background: var(--bg); color: var(--text); }

/* the Copy button, as the documentation draws it: in the top right corner of its block, 44 pixels
   each way, beside the first line with long lines wrapping round it. It shows only once /docs-copy.js can work it */
.docs-code { position: relative; margin: 0.75rem 0; }
.docs-code .snippet { margin: 0; }
.code-copy {
  display: none; position: absolute; top: 0.4rem; right: 0.4rem; z-index: 1; align-items: center; gap: 0.4rem;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0.4rem 0.75rem; font: inherit; font-size: 0.9rem; font-weight: 700; line-height: 1.2;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.band .code-copy { background: var(--band); }
.js .code-copy { display: inline-flex; }
.js .docs-code > .snippet { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 3.55rem; }
.js .docs-code > .snippet code { white-space: inherit; overflow-wrap: inherit; }
/* a float the size of the button, so the first lines wrap around it and the rest use the full width */
.js .docs-code > .snippet::before { content: ""; float: right; width: 6.6rem; height: 2.5rem; }
.code-copy svg { width: 1.1rem; height: 1.1rem; flex: none; }
.code-copy:hover { border-color: var(--text); }
.code-copy[data-copied] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.profile-example .frame .docs-code { margin: 0; }
@media (forced-colors: active) { .code-copy { border-color: CanvasText; } }
@media print {
  .code-copy { display: none !important; }
  .js .docs-code > .snippet { min-height: 0; }
  .js .docs-code > .snippet::before { content: none; }
}
.starter-studio-heading { margin: 2.5rem 0 0.5rem; }
