/* Guides (SEO-PLAN.md): a plain head on paper-2, the long-form text in the legal pages' measure (legal.css .prose),
   the home page's own demos between the text (home.css). Loads after tokens, base, glass, moqi, effects, keyboard,
   home and legal. Ink on paper; the MOQI gradient only in the h1's .hl. */

.guide-head {
  padding-block: calc(76px + var(--space-xl)) var(--space-xl);
  background: var(--color-paper-2);
}

@media (min-width: 60rem) {
  .guide-head {
    padding-block: calc(84px + var(--space-2xl)) var(--space-2xl);
  }
}

.guide-head__title {
  max-width: 14em;
  min-width: 0;
  margin-top: var(--space-xs);
  font-size: var(--text-3xl);
  overflow-wrap: anywhere;
}

.guide-head__title:is(:lang(zh), :lang(ko)) {
  word-break: keep-all;
}

.guide-head__lead {
  max-width: 30em;
  margin-top: var(--space-md);
  color: var(--color-ink-2);
  font-size: var(--text-md);
}

.guide-head__lead:is(:lang(en), :lang(vi), :lang(th)) {
  max-width: 36em;
}

.guide-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-lg);
}

.guide-head__jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  white-space: nowrap;
}

/* The text between the demos: the legal pages' prose, a little roomier between parts. Chinese and Korean headings
   break at punctuation, not inside a word (as the home page's do). */
.guide-text .prose h2 {
  margin-top: var(--space-2xl);
  font-size: var(--text-2xl);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.guide-text .prose h2:is(:lang(zh), :lang(ko)) {
  word-break: keep-all;
}

.guide-text .prose > :first-child {
  margin-top: 0;
}

.guide-text .prose h3 {
  margin-top: var(--space-xl);
}

/* A worked example: what was typed or received, and what MOQI made of it; monochrome, hairline cards. */
.guide-eg {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  box-shadow: inset 0 0 0 1px var(--color-rule);
}

.section--paper .guide-eg {
  background: var(--color-paper-2);
}

.guide-eg__row {
  display: grid;
  grid-template-columns: minmax(0, 6.5em) minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: baseline;
}

.guide-eg__label {
  color: var(--color-caption);
  font-size: var(--text-sm);
  font-weight: 600;
}

.guide-eg__value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guide-eg__keys {
  font-family: var(--font-zhuyin, inherit);
  letter-spacing: 0.08em;
}

@media (max-width: 30rem) {
  .guide-eg__row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3xs);
  }
}

/* Read on: the other guides and home, as monochrome hairline chips under the FAQ. */
.guide-related {
  margin-top: var(--space-2xl);
}

.guide-related__title {
  color: var(--color-caption);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
}

.guide-related__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  padding: 0;
  list-style: none;
}

.guide-related__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: inset 0 0 0 1px var(--color-rule);
  color: var(--color-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease-out);
}

@media (hover: hover) {
  .guide-related__link:hover {
    box-shadow: inset 0 0 0 1px var(--color-ink-2);
  }
}

.guide-related__link:active {
  transform: translateY(1px);
  transition-duration: 80ms;
}

.guide-related__link:focus-visible,
.guide-head__jump:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.guide-eg__note {
  color: var(--color-caption);
  font-size: var(--text-sm);
}
