:root {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--theme-page);
  color: var(--theme-text);
}

.wordlex-guide {
  margin: 0;
  line-height: 1.6;
}

.guide-wrap {
  width: min(45rem, calc(100% - 2rem));
  margin-inline: auto;
}

.guide-header {
  border-bottom: 1px solid var(--theme-line);
  background: var(--theme-surface);
}

.guide-header-inner,
.guide-brand,
.guide-languages,
.guide-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.guide-header-inner {
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-block: .75rem;
}

.guide-brand {
  gap: .6rem;
  color: var(--theme-text);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

.guide-languages {
  gap: .25rem;
}

.guide-languages a {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: .5rem;
  color: var(--theme-text);
  font-weight: 700;
  text-decoration: none;
}

.guide-languages a:is([aria-current], :hover) {
  background: var(--theme-raised);
}

.guide-languages [aria-current] {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.wordlex-guide main {
  padding-block: clamp(2rem, 7vw, 4.5rem);
}

.wordlex-guide h1,
.wordlex-guide h2 {
  font-family: Manrope, "DM Sans", system-ui, sans-serif;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.wordlex-guide h1 {
  margin: 0 0 .8rem;
  font-size: clamp(2rem, 6vw, 3.45rem);
  text-wrap: balance;
}

.wordlex-guide h2 {
  margin: 0 0 .85rem;
  font-size: clamp(1.25rem, 3.5vw, 1.7rem);
}

.guide-intro {
  margin: 0;
  max-width: 58ch;
  color: var(--theme-muted);
  font-size: clamp(1.06rem, 2.5vw, 1.22rem);
}

.guide-actions {
  gap: .6rem;
  margin-block: 1.35rem 2.6rem;
}

.guide-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .25rem .9rem;
  border: 1px solid var(--theme-line);
  border-radius: .6rem;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-weight: 650;
  text-decoration: none;
}

.guide-button-primary {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: var(--theme-surface);
}

.guide-button:hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.wordlex-guide a:focus-visible {
  outline: 3px solid var(--theme-focus);
  outline-offset: 3px;
}

.wordlex-guide section {
  border-top: 1px solid var(--theme-line);
  padding-block: 1.35rem;
}

.wordlex-guide section :is(p, ol) {
  margin-block: .75rem 0;
}

.wordlex-guide ol {
  padding-inline-start: 1.4rem;
}

.wordlex-guide li + li {
  margin-block-start: .45rem;
}

.guide-clues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .65rem;
  margin: 0 0 1rem;
}

.guide-clues > div {
  padding: .8rem;
  border: 1px solid var(--theme-line);
  border-radius: .65rem;
  background: var(--theme-surface);
}

.guide-clues dt {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
}

.guide-clues dd {
  margin: .45rem 0 0;
}

.guide-clues .legend-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: .32rem;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.guide-clues .legend-tile.excluded {
  background: var(--game-excluded, #a84640);
  color: var(--game-excluded-ink, #fff);
}
