/* Help center pages. Colors and type come from @johntran/ui tokens.css,
   which the build copies next to the built site.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background-empty, #fff);
  color: var(--foreground-primary, #1a1919);
  font: var(--text-m, 400 1rem/1.5 Inter, "IBM Plex Sans Thai", Arial, sans-serif);
  line-break: var(--text-line-break, auto);
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-emphasized, #d2cecb);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, #1a1919);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--background-empty, #fff);
  border: 1px solid var(--border-emphasized, #d2cecb);
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--background-empty, #fff);
  border-bottom: 1px solid var(--border-default, #e9e5e2);
}

.masthead__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

.brand__name {
  font-weight: var(--font-weight-bold, 700);
  letter-spacing: -0.01em;
}

.brand__section {
  color: var(--foreground-hushed, #6a6664);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 0;
}

.masthead__lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0 8px;
  white-space: nowrap;
}

.masthead__search {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
}

.masthead__search:hover {
  text-decoration: underline;
}

.masthead__signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-emphasized, #d2cecb);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.masthead__signin:hover {
  background: var(--background-lightest, #fcfbfa);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

.article {
  min-width: 0;
  max-width: 720px;
}

.article:focus,
.home:focus,
.listing:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.crumbs ol {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 8px;
}

/* Standalone links get a 44px touch height without growing the text. */
.crumbs a,
.card__title a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.article__title {
  margin: 0 0 12px;
  font: var(--text-heading-l, 400 2rem/1.2 sans-serif);
  letter-spacing: var(--letter-spacing-heading, -0.01em);
}

.notice {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--background-lightest, #fcfbfa);
  border: 1px solid var(--border-default, #e9e5e2);
}

.article__for {
  margin: 0 0 32px;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.prose h2 {
  margin: 40px 0 12px;
  font: var(--text-heading-s, 400 1.375rem/1.3 sans-serif);
  font-weight: var(--font-weight-sans-medium, 500);
  scroll-margin-top: 72px;
}

.prose h3 {
  margin: 28px 0 8px;
  font: var(--text-heading-xs, 400 1.125rem/1.3 sans-serif);
  scroll-margin-top: 72px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose li + li {
  margin-top: 6px;
}

.prose code {
  font-family: var(--font-family-stack-monospace, ui-monospace, monospace);
  font-size: 0.9em;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--background-light, #e9e5e2);
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 16px;
}

.prose th,
.prose td {
  border: 1px solid var(--border-default, #e9e5e2);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.toc__label {
  margin: 0 0 8px;
  font-weight: var(--font-weight-bold, 700);
  font-size: 0.875rem;
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.toc__list a {
  display: block;
  padding: 6px 0;
  color: var(--foreground-hushed, #6a6664);
  text-decoration: none;
}

.toc__list a:hover {
  color: var(--foreground-primary, #1a1919);
}

.toc--side {
  display: none;
}

.toc--folded {
  margin: 0 0 32px;
  border: 1px solid var(--border-default, #e9e5e2);
  border-radius: 8px;
  padding: 0 16px;
}

.toc--folded summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  cursor: pointer;
  list-style: none;
}

.toc--folded summary::-webkit-details-marker {
  display: none;
}

.toc--folded summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.toc--folded[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.toc--folded[open] nav {
  padding-bottom: 12px;
}

.stuck {
  margin-top: 48px;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--background-lightest, #fcfbfa);
  border: 1px solid var(--border-default, #e9e5e2);
}

.stuck p {
  margin: 0;
}

.stuck .stuck__title {
  font-weight: var(--font-weight-bold, 700);
  margin-bottom: 4px;
}

.note {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--background-lighter, #f4f2f0);
}

.note p {
  margin: 0;
}

.note .note__title {
  font-weight: var(--font-weight-bold, 700);
}

.hero {
  padding: 16px 0 32px;
}

.hero__title {
  margin: 0 0 24px;
  font: var(--text-heading-xl, 400 2.5rem/1.15 sans-serif);
  letter-spacing: var(--letter-spacing-heading, -0.01em);
}

.roles {
  margin: 0 0 24px;
}

.roles__label {
  margin: 0 0 8px;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.roles__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-emphasized, #d2cecb);
  border-radius: 999px;
  background: var(--background-empty, #fff);
  color: var(--foreground-primary, #1a1919);
  font: inherit;
  cursor: pointer;
}

.chip:hover {
  background: var(--background-hover, #f4f2f0);
}

.chip[aria-pressed="true"] {
  background: var(--primary-button, #1a1919);
  border-color: var(--primary-button, #1a1919);
  color: var(--primary-fg-button, #fff);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
  border: 1px solid var(--border-default, #e9e5e2);
  border-radius: 12px;
  background: var(--background-empty, #fff);
}

.card__title {
  margin: 0;
  font: var(--text-heading-s, 400 1.375rem/1.3 sans-serif);
}

.card__title a {
  text-decoration: none;
}

.card__title a:hover {
  text-decoration: underline;
}

.card__line,
.listing__line {
  margin: 0 0 12px;
  color: var(--foreground-hushed, #6a6664);
}

.card__links,
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card__links a {
  display: inline-block;
  padding: 10px 0;
}

.listing {
  min-width: 0;
  max-width: 720px;
}

.listing__line {
  margin-bottom: 32px;
}

.entries {
  border-top: 1px solid var(--border-default, #e9e5e2);
}

.entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-default, #e9e5e2);
}

.entry__title {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: var(--font-weight-sans-medium, 500);
}

.entry__for {
  margin: 0;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.search {
  margin: 0 0 40px;
}

.hero .search {
  margin-bottom: 0;
}

.search__label {
  display: block;
  margin: 0 0 8px;
  font-weight: var(--font-weight-sans-medium, 500);
}

.search__row {
  display: flex;
  gap: 8px;
}

.search__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  font: inherit;
  color: inherit;
  background: var(--background-empty, #fff);
  border: 1px solid var(--border-emphasized, #d2cecb);
  border-radius: 8px;
}

.search__input:focus-visible {
  outline-offset: 0;
  border-radius: 8px;
}

.search__button {
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: var(--font-weight-sans-medium, 500);
  color: var(--background-empty, #fff);
  background: var(--foreground-primary, #1a1919);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.search__hint {
  margin: 8px 0 0;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.search__status {
  margin: 24px 0 0;
  font-weight: var(--font-weight-sans-medium, 500);
}

/* Collapsed, not display: none, so screen readers announce its first update. */
.search__status:empty {
  margin: 0;
}

/* The hint is about pressing "/", which touch screens have no key for. */
@media (hover: none) and (pointer: coarse) {
  .search__hint {
    display: none;
  }
}

.all-articles {
  margin-top: 32px;
}

.all-articles__title {
  margin: 0 0 8px;
  font: var(--text-heading-xs, 400 1.125rem/1.3 sans-serif);
  font-weight: var(--font-weight-sans-medium, 500);
}

.results {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.results__item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-default, #e9e5e2);
}

.results__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: var(--font-weight-sans-medium, 500);
}

.results__category {
  margin: 0;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.results__summary {
  margin: 4px 0 0;
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.contact__way h2 {
  margin: 40px 0 12px;
  font: var(--text-heading-s, 400 1.375rem/1.3 sans-serif);
  font-weight: var(--font-weight-sans-medium, 500);
}

.contact__way p {
  margin: 0 0 16px;
}

.contact__after {
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

/* The lime accent is unreadable as text, so it is only ever a fill under its paired foreground. */
.action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent-button, #e4f222);
  color: var(--accent-fg-button, #1a1919);
  font-weight: var(--font-weight-sans-medium, 500);
  text-decoration: none;
}

.action:hover {
  text-decoration: underline;
}

.contact .note {
  margin-top: 40px;
}

.foot {
  border-top: 1px solid var(--border-default, #e9e5e2);
  color: var(--foreground-hushed, #6a6664);
  font: var(--text-s, 400 0.875rem/1.4 sans-serif);
}

.foot p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

@media (max-width: 599px) {
  .article__title,
  .hero__title {
    font: var(--text-heading-m, 400 1.75rem/1.25 sans-serif);
  }

  .card {
    padding: 20px 16px;
  }

  .brand__section {
    display: none;
  }

  .masthead__signin {
    padding: 0 12px;
  }
}

@media (min-width: 960px) {
  .page {
    grid-template-columns: minmax(0, 720px) 220px;
    justify-content: space-between;
    padding-top: 48px;
  }

  .home {
    grid-column: 1 / -1;
  }

  .toc--side {
    display: block;
    position: sticky;
    top: 88px;
    align-self: start;
  }

  .toc--folded {
    display: none;
  }
}
