.dictionary {
  max-width: 40rem;
}

.dictionary__search {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.dictionary__search label {
  font-weight: 700;
}

.dictionary__search input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 1.0625rem;
}

.dictionary__letters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
}

.dictionary__letters a[hidden],
.dictionary__group[hidden],
[data-dict-word][hidden],
[data-dict-empty][hidden] {
  display: none !important;
}

.dictionary__letters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.dictionary__group {
  margin: 0 0 var(--space-5);
}

.dictionary__group h2 {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

.dictionary__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dictionary__item {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
}

.dictionary__word {
  display: inline-block;
  margin-bottom: var(--space-2);
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.dictionary__item p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.dictionary__empty {
  margin: 0;
}

.dict-entry {
  max-width: 40rem;
  margin: 0 auto var(--space-6);
}

.dict-entry__crumbs {
  margin: 0 0 var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.dict-entry__crumbs a {
  color: var(--color-accent);
  text-decoration: none;
}

.dict-entry__header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
}

.dict-entry__stress {
  margin: var(--space-2) 0 0;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
}

.dict-entry__definition {
  margin: var(--space-5) 0;
  font-size: 1.2rem;
  line-height: 1.65;
}

.dict-entry__example,
.dict-entry__imagine,
.dict-entry__related,
.dict-entry__mentions {
  margin: 0 0 var(--space-5);
}

.dict-entry h2 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
}

.dict-entry__example {
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-accent);
}

.dict-entry__example p,
.dict-entry__imagine p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.dict-entry__imagine {
  padding: var(--space-4);
  border-radius: var(--radius-2);
  background: var(--tile-read);
}

.dict-entry__related ul,
.dict-entry__mentions ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dict-entry__related li,
.dict-entry__mentions li {
  margin: 0 0 var(--space-2);
}

.dict-entry__related a,
.dict-entry__mentions a {
  color: var(--color-accent);
  font-weight: 700;
}
