/* The help center (support.html) and the reading pages (credits, privacy, terms): the website's pages in everything but
   their content. The header and footer are the website's (chrome.css), the base and buttons forms.css, the tokens
   /brand.css; this file draws the page between them as the website draws its FAQ and articles. */
.help,
.doc {
  width: min(var(--page-max), 100% - var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) 0 var(--space-11);
}
.help-kicker {
  margin: 0 0 var(--space-4);
  font: 500 12px / var(--lh-snug) var(--brand-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.help h1,
.doc h1 {
  max-width: 15ch;
  margin: 0;
  font: 900 var(--display-1) / 1.02 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
.doc h1 {
  max-width: 18ch;
  font-size: var(--display-2);
}
:is(.help, .doc) a:not(.button) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
:is(.help, .doc) a:not(.button):hover {
  text-decoration-color: var(--accent);
}

/* The opening: the title, the search under it and a line of popular answers, centred as help centres open. */
.help-hero {
  padding-top: var(--space-6);
  text-align: center;
}
.help .help-hero h1 {
  max-width: none;
  margin-inline: auto;
}
.help-search {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 720px;
  height: 60px;
  margin: var(--space-7) auto 0;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--layer-1);
  box-shadow: 0 0 0 1px var(--hair);
  text-align: left;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
/* Focused, the field rises onto white and its ring deepens into a double one, with no outline. */
.help-search:focus-within {
  background: var(--white);
  box-shadow: var(--ring-focus);
}
.help-search svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.help-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
}
.help-search input::placeholder {
  color: var(--muted);
}
.help-popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--space-4);
  margin: var(--space-3) 0 0;
  font: 500 12px / var(--lh-snug) var(--brand-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.help .help-popular a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.help .help-popular a:hover {
  color: var(--accent-text);
}
.help-popular span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.help-results {
  min-height: 20px;
  margin: var(--space-3) 0 0;
  font-size: 13px;
  color: var(--muted);
}
.help.searching .help-popular,
.help:not(.searching) .help-results {
  display: none;
}

/* Topics: six tiles a tone darker than the page, each name in the printed capitals over a short line, its count of
   answers in the mono. */
.help-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-10);
}
.help .help-topics a {
  position: relative;
  display: grid;
  gap: var(--space-1);
  padding: 20px 24px 24px;
  border-radius: var(--radius-md);
  background: var(--layer-1);
  text-decoration: none;
  transition: background-color 0.15s;
}
.help .help-topics a:hover {
  background: var(--layer-2);
}
.help-topics strong {
  padding-right: 96px;
  font: 800 22px / 1.05 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
}
.help-topics span {
  font-size: 14px;
  color: var(--muted);
}
.help-topics em {
  position: absolute;
  top: 24px;
  right: 24px;
  font: 500 12px / 1 var(--brand-mono);
  font-style: normal;
  color: var(--muted);
}

/* At a glance: the facts on a panel a tone darker than the page. */
.help-facts {
  margin-top: var(--space-9);
  padding: 24px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--layer-1);
}
.help-facts h2 {
  margin: 0;
  font: 500 12px / 1 var(--brand-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.help-facts dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6) var(--space-7);
  margin: var(--space-5) 0 0;
}
.help-facts dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.help-facts dd {
  margin: var(--space-1) 0 0;
  font-size: 15px;
  line-height: var(--lh-ui);
  font-variant-numeric: tabular-nums;
}
.help.searching :is(.help-topics, .help-facts) {
  display: none;
}

/* Questions: each topic's name in the printed capitals on the left, its questions on the right, as the FAQ has them;
   space, not a rule, sets the topics apart. */
.help-section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  column-gap: var(--space-9);
  margin-top: var(--space-10);
  scroll-margin-top: 24px;
}
.help-section > h2 {
  grid-column: 1;
  grid-row: 1 / span 40;
  align-self: start;
  position: sticky;
  top: 24px;
  margin: 0;
  font: 800 28px / 1.05 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
.help-section > :not(h2) {
  grid-column: 2;
}
.help-section details {
  border-bottom: 1px solid var(--hair-strong);
  scroll-margin-top: 24px;
}
.help-section details:first-of-type summary {
  padding-top: 0;
}
.help-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 20px 0;
  font: 400 18px / var(--lh-snug) var(--sans);
  list-style: none;
  cursor: pointer;
  transition: color 0.15s;
}
.help-section summary::-webkit-details-marker {
  display: none;
}
.help-section summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat;
  transition: transform 0.3s var(--ease);
}
.help-section details[open] summary::after {
  transform: rotate(45deg);
}
.help-section summary:hover {
  color: var(--accent-text);
}
/* Opening glides: the answer's height runs 0fr to 1fr; its space below is its last paragraph's margin, inside the clip. */
.help-section details::details-content {
  display: grid;
  grid-template-rows: 0fr;
  transition:
    grid-template-rows 0.3s var(--ease),
    content-visibility 0.3s allow-discrete;
}
.help-section details[open]::details-content {
  grid-template-rows: 1fr;
}
@media (prefers-reduced-motion: reduce) {
  .help-section details::details-content {
    transition: none;
  }
}
.help-section details > div {
  min-height: 0;
  overflow: hidden;
  padding-right: var(--space-9);
}
.help-section details > div > :last-child {
  margin-bottom: var(--space-6);
}
.help-section details p {
  max-width: 40em;
  margin: 0;
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--muted);
}
.help-section details p + p {
  margin-top: var(--space-3);
}
.help-section em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}
.help-section strong {
  font-weight: 600;
  color: var(--ink);
}
:is(.help, .doc) code {
  padding: 1px 8px;
  border-radius: var(--radius-xs);
  background: var(--paper-deep);
  font: 13px var(--brand-mono);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.help-note {
  margin: 0 0 var(--space-3);
  font-size: 14px;
  color: var(--muted);
}
.keys {
  margin: 0;
  border-top: 1px solid var(--hair-strong);
}
.keys div {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-4);
  padding: 12px 0;
  border-bottom: 1px solid var(--hair-strong);
  font-size: 15px;
}
.keys dt {
  color: var(--muted);
}
.keys dd {
  margin: 0;
}
kbd {
  display: inline-block;
  min-width: 24px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--page-paper);
  font: 500 12px / var(--lh-ui) var(--brand-mono);
  text-align: center;
  color: var(--ink);
}
.help-empty {
  margin: var(--space-8) 0 0;
  padding: 24px 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  font-size: 15px;
  color: var(--muted);
}

/* Contact: the last section on a panel a tone darker, the one way out an ink button. */
.help-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6) var(--space-9);
  margin-top: var(--space-10);
  padding: 28px 32px 32px;
  border-radius: var(--radius-lg);
  background: var(--layer-1);
}
.help-contact > div {
  flex: 1 1 420px;
}
.help-contact h2 {
  margin: 0;
  font: 800 28px / 1.05 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
}
.help-contact p {
  max-width: 40em;
  margin: var(--space-3) 0 0;
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--muted);
}
.help-contact .fine {
  margin: var(--space-2) 0 0;
  font-size: 13px;
}
.help-contact .button {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 15px;
}

/* Reading pages: the title, the date in the mono, then the text in one column, as the website's articles. */
.doc .prose {
  max-width: 640px;
}
.doc .updated {
  margin: var(--space-6) 0 var(--space-9);
  font: 500 12px / var(--lh-ui) var(--brand-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc h2 {
  margin: var(--space-9) 0 var(--space-3);
  padding-top: 20px;
  border-top: 1px solid var(--hair-strong);
  font: 800 24px / 1.1 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
  scroll-margin-top: 24px;
}
.doc p,
.doc li {
  font-size: 17px;
  line-height: var(--lh-body);
  color: var(--ink-soft);
}
.doc p {
  margin: 0 0 var(--space-4);
}
.doc ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}
.doc li + li {
  margin-top: var(--space-2);
}
.doc li::marker {
  color: var(--soft);
}
.doc .button {
  margin: var(--space-2) 0 var(--space-1);
}
/* credits.html opens with the facts at a glance, on a panel set off from the paragraph above it. */
.doc .help-facts {
  margin: var(--space-6) 0;
}
.doc .help-facts dl {
  margin-top: 0;
}

@media (max-width: 960px) {
  .help-section {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-section > h2 {
    grid-row: auto;
    position: static;
    margin-bottom: var(--space-4);
  }
  .help-section > :not(h2) {
    grid-column: 1;
  }
}
@media (max-width: 720px) {
  .help-topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .help-topics strong {
    padding-right: 0;
  }
  .help-topics em {
    position: static;
    margin-top: var(--space-2);
  }
  .help-facts dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .help-facts {
    padding: 20px 20px 24px;
  }
  .help-contact {
    padding: 24px 20px;
  }
  .keys div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
  .help-section details > div {
    padding-right: 0;
  }
}
@media (max-width: 480px) {
  .help-topics,
  .help-facts dl {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-contact .button {
    width: 100%;
    white-space: normal;
  }
}
/* Chinese: the sans in place of the printed capitals, with the taller lines Chinese reading wants. */
:root:is(:lang(zh), :lang(ja), :lang(ko)) :is(.help h1, .doc h1, .help-section > h2, .help-contact h2, .doc h2) {
  font-family: var(--sans);
  font-weight: 600;
  line-height: var(--lh-heading);
  text-transform: none;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) :is(.help h1, .doc h1) {
  max-width: 12em;
  font-size: var(--display-2);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) :is(.help-kicker, .help-popular, .help-facts h2, .doc .updated) {
  letter-spacing: 0;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .help-topics strong {
  font: 600 20px / var(--lh-heading) var(--sans);
  text-transform: none;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .help-topics em {
  font-family: var(--sans);
}
/* Running text keeps a lone word off its last line. */
:is(.help-section details p, .help-contact p, .help-facts dd, .doc p, .doc li) {
  text-wrap: pretty;
}

/* Dark theme: as on the website's own pages (styles.css), type is drawn without the extra stem weight and, outside
   the Han, kana and hangul editions, steps down 40 (owner, 2026-10-25). */
[data-theme="dark"] :is(.help, .doc) {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root[data-theme="dark"]:not(:lang(zh), :lang(ja), :lang(ko)) :is(.help, .doc, .help-section summary) {
  font-weight: 360;
}
:root[data-theme="dark"]:not(:lang(zh), :lang(ja), :lang(ko))
  :is(
    .help-kicker,
    .help-popular,
    .help-facts h2,
    .help-facts dt,
    .help-topics em,
    .help-section em,
    .doc .updated,
    .help-contact .button,
    kbd
  ) {
  font-weight: 460;
}
:root[data-theme="dark"]:not(:lang(zh), :lang(ja), :lang(ko)) :is(.help, .doc) strong {
  font-weight: 560;
}
:root[data-theme="dark"]:not(:lang(zh), :lang(ja), :lang(ko))
  :is(.help-section > h2, .help-contact h2, .doc h2, .help-topics strong) {
  font-weight: 760;
}
:root[data-theme="dark"]:not(:lang(zh), :lang(ja), :lang(ko)) :is(.help h1, .doc h1) {
  font-weight: 860;
}
