/* Download, Releases and Changelog: what each page adds to the shared base in chrome.css
   (the title band, the 760px column, buttons and both colour worlds' tokens live there). */

/* ---------------------------------------------------------------- download */
.dl-panel { display: grid; gap: 16px; }
/* reserve the cards' height so the GitHub answer never shifts the page (CLS) */
.dl-panel { min-height: 182px; align-content: start; }
@media (max-width: 640px) { .dl-panel { min-height: 380px; } }
.dl-state { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.dl-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dl-card {
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  padding: 20px;
  background: var(--card);
}
.dl-card--primary { border-color: var(--ink); box-shadow: 0 12px 30px rgba(11, 20, 54, 0.1); }
.dl-card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: -0.01em; }
.dl-note--unknown { grid-column: 1 / -1; }

/* .btn/.btn-primary/.btn-secondary are the one shared spec in chrome.css */

.dl-meta { font-size: 13px; font-weight: 500; color: var(--ink-faint); margin: 10px 0 0; }
.dl-meta .ver { font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.dl-meta a { color: var(--ink-soft); }
.dl-note { font-size: 13px; color: var(--ink-faint); margin: 8px 0 0; }

.before-list code { background: var(--paper-line); padding: 1px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 12.5px; }
.before-list, .steps-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.steps-list code { background: var(--paper-line); padding: 1px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 12.5px; }

@media (max-width: 640px) {
  .dl-buttons { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- releases */
/* one 760px column, the same left edge as the hero text above it */
.rel-body { width: min(100% - 2 * var(--gutter), 760px); margin: 0 auto; padding: 44px 0 64px; }
.rel-state { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.rel-state .btn { margin-top: 14px; }

#relList { display: grid; gap: 18px; }
.rel-card { border: 1px solid var(--paper-line); border-radius: 14px; padding: 22px 24px; background: var(--card); }
.rel-card--latest { border-color: var(--ink); box-shadow: 0 12px 30px rgba(11, 20, 54, 0.1); }
.rel-card__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rel-card__head h2 { font-size: 16px; margin: 0; letter-spacing: -0.01em; font-weight: 650; }
.rel-card__head h2 .version { font-family: var(--font-mono); font-weight: 600; }
.rel-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--paper-line);
  color: var(--ink);
  border: 1px solid var(--paper-line);
}
.rel-tag--muted { background: var(--paper-line); color: var(--ink); border-color: var(--paper-line); }
/* neutral ink, not green: green means "resolved" on the home page */
.rel-tag--latest { background: var(--paper-line); color: var(--ink); border-color: var(--ink-faint); }
.rel-date { font-size: 13px; color: var(--ink-faint); margin: 8px 0 16px; }
.rel-primary-cta { margin: 0 0 16px; }
.rel-primary-cta .btn { margin-right: 10px; }
.rel-one-line { font-size: 13.5px; color: var(--ink-faint); font-style: italic; margin: 0 0 14px; }

.rel-assets { display: grid; gap: 8px; margin-bottom: 14px; }
.rel-asset { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.rel-asset__name { color: var(--ink-soft); min-width: 15ch; }
.rel-asset a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; }
.rel-asset a:hover, .rel-asset a:focus-visible { border-bottom-color: currentColor; }
.rel-asset__sha { font-size: 12.5px; color: var(--ink-faint) !important; }
.rel-asset__missing { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }

.rel-notes { font-size: 13px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.rel-notes:hover, .rel-notes:focus-visible { color: var(--ink); border-bottom-color: currentColor; }

/* .btn/.btn-primary are the one shared spec in chrome.css */

@media (max-width: 480px) {
  .rel-asset { flex-wrap: wrap; }
  .rel-asset__name { min-width: 100%; }
}

/* --------------------------------------------------------------- changelog */
/* one 760px column, the same left edge as the hero text: the version index
   runs along the top as a row of links instead of a side column */
.changelog-layout {
  width: min(100% - 2 * var(--gutter), 760px);
  margin: 0 auto;
  padding: 40px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* ---------------------------------------------------------- index nav */

.changelog-index {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}
.changelog-index a {
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  padding: 5px 12px;
}
.changelog-index a:hover,
.changelog-index a:focus-visible {
  color: var(--ink);
  background: var(--paper-line);
}

/* ------------------------------------------------------------- article */

.changelog h1 {
  font-size: clamp(24px, 3.2vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.changelog section {
  padding: 32px 0;
  border-top: 1px solid var(--paper-line);
}
.changelog section:first-of-type { border-top: none; padding-top: 8px; }

.changelog h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}
/* mono for the version number only, not the whole heading */
.changelog h2 .version { font-family: var(--font-mono); font-weight: 600; }
.changelog h2 time {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 14px;
}
.changelog h2 .anchor {
  font-weight: 400;
  color: var(--ink-faint);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.changelog h2:hover .anchor,
.changelog h2 .anchor:focus-visible { opacity: 1; }

.changelog section[data-latest='true'] h2::after {
  content: 'Latest';
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--paper-line);
  color: var(--ink);
  border: 1px solid var(--ink-faint);
}

.changelog section#unreleased {
  opacity: 0.92;
}
/* the pill duplicated the heading's own words, "In source, not yet
   published": removed rather than kept in sync. */

.changelog h3 {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-soft);
  margin: 22px 0 10px;
}
.changelog section > h3:first-of-type,
.changelog section > p:first-of-type + h3 { margin-top: 16px; }

.changelog p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 14px; max-width: 68ch; }
.changelog p strong { color: var(--ink); font-weight: 650; }

.changelog ul { margin: 0 0 22px; padding-left: 20px; display: grid; gap: 9px; }
.changelog li { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.changelog li ul { margin-top: 8px; }

.changelog code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--paper-line);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
}

.changelog a { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.changelog a:hover, .changelog a:focus-visible { border-bottom-color: currentColor; }

/* the list arrives from GitHub after the page: hold its room so the footer does not jump */
.rel-body { min-height: 70vh; }
/* the generated article opens with its own h1; the title band already says the page's name */
.changelog > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------- privacy and terms */
/* Rendered at deploy from docs/legal/*.md into legal.template.html. No title band: the document's
   own heading opens the page, under a header that is solid from the top. */
.ce-page--plain .ce-header { background: var(--header-ground); border-bottom-color: var(--cobalt-line); }
.legal-layout { width: min(100% - 2 * var(--gutter), 760px); margin: 0 auto; padding: calc(var(--header-h) + 48px) 0 72px; }
.legal { font-size: 16px; line-height: 1.65; color: var(--ink); overflow-wrap: break-word; }
.legal h1 { font-family: var(--font-head); font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 20px; text-wrap: balance; }
.legal h2 { font-family: var(--font-head); font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin: 40px 0 12px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.legal hr { border: 0; border-top: 1px solid var(--paper-line); margin: 32px 0; }
.legal code { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-line); padding: 1px 5px; border-radius: 4px; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; line-height: 1.5; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--paper-line); min-width: 9ch; }
.legal th { font-weight: 650; background: var(--paper-line); }
.legal-summary { margin: 24px 0; padding: 18px 20px 6px; background: var(--card); border: 1px solid var(--paper-line); border-left: 4px solid var(--cover); border-radius: var(--r-md); }

/* --------------------------------------------------------------------- faq */
/* One question to a line, each a native <details>: it opens without script, reads in a screen reader as a
   disclosure, and the text stays in the page for a reader that never opens it. */
.faq-topics { padding: 28px 0 8px; }
.faq-topics + .faq-jobs { border-top: 0; }
.faq-group { padding: 36px 0; }
.faq-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 500; }
.faq-index a { display: inline-block; color: var(--ink-soft); text-decoration: none !important; border: 1px solid var(--paper-line); border-radius: var(--r-pill); padding: 5px 12px; }
.faq-index a:hover, .faq-index a:focus-visible { color: var(--ink); background: var(--paper-line); }
.faq-group { scroll-margin-top: var(--header-h); }
.faq-list { border-top: 1px solid var(--paper-line); }
.faq-item { border-bottom: 1px solid var(--paper-line); scroll-margin-top: calc(var(--header-h) + 8px); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 2px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.faq-item summary:hover { color: var(--link); }
.faq-answer { padding: 0 2px 22px; font-size: 15px; line-height: 1.65; color: var(--ink); max-width: 66ch; }
.faq-answer strong { font-weight: 650; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-answer ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 7px; }
.faq-answer code { font-family: var(--font-mono); font-size: 12.5px; background: var(--paper-line); padding: 1px 5px; border-radius: 4px; color: var(--ink); }
.faq-next { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
@media (max-width: 640px) { .faq-item summary { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* the topic band: the pills, and the button that opens every answer once the script has run */
.faq-topics { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.faq-openall { font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: transparent; border: 1px solid var(--ink-faint); border-radius: var(--r-pill); padding: 5px 14px; cursor: pointer; }
.faq-openall:hover, .faq-openall:focus-visible { background: var(--paper-line); }
.faq-openall[hidden] { display: none; }
.faq-foot { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); max-width: 66ch; }
.page-hero time { white-space: nowrap; }

/* the jobs table above the questions: two columns, so it reads the same on a phone */
.faq-jobs { padding-bottom: 12px; }
.faq-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.faq-table thead th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.faq-table thead th:last-child, .faq-table td { width: 1%; white-space: nowrap; text-align: right; }
.faq-table tbody th { text-align: left; font-weight: 500; color: var(--ink); line-height: 1.4; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--paper-line); }
.ce-page .faq-table tbody th a { color: var(--ink); text-decoration: none; }
.ce-page .faq-table tbody th a:hover, .ce-page .faq-table tbody th a:focus-visible { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.faq-table td { padding: 12px 0; border-bottom: 1px solid var(--paper-line); }
.faq-table small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.faq-verdict { display: inline-block; min-width: 4.5em; text-align: center; font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: var(--r-pill); border: 1px solid var(--ink); }
.faq-verdict--yes { background: var(--ink); color: var(--paper); }
.faq-verdict--partly { background: transparent; color: var(--ink); }
.faq-verdict--no { background: transparent; color: var(--ink-soft); border-color: var(--ink-faint); border-style: dashed; }
.faq-verdict--notyet { background: transparent; color: var(--ink-soft); border-color: var(--ink-faint); border-style: dotted; font-style: italic; }

.faq-before ol { margin: 0; padding: 0; list-style: none; counter-reset: before; display: grid; gap: 10px; }
.faq-before li { counter-increment: before; position: relative; padding: 12px 16px 12px 52px; background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--r-md); font-size: 15px; line-height: 1.5; color: var(--ink); }
.faq-before li::before { content: counter(before); position: absolute; left: 16px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; line-height: 24px; text-align: center; }
