.dictionary-page {
  --dictionary-surface: #f3f0ea;
  --dictionary-card: #fbfaf7;
}

.dictionary-hero {
  min-height: 720px;
  padding: 150px 0 88px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.025), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(219, 43, 35, 0.2), transparent 29%),
    var(--ink);
  color: white;
}

.breadcrumbs--dark {
  margin-bottom: clamp(62px, 9vw, 118px);
  color: rgba(255, 255, 255, 0.56);
}

.breadcrumbs--dark a {
  color: rgba(255, 255, 255, 0.72);
}

.dictionary-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(48px, 9vw, 140px);
  align-items: end;
}

.dictionary-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(66px, 9vw, 142px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.84;
}

.dictionary-hero__intro > p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.5;
}

.dictionary-hero__intro dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 42px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dictionary-hero__intro dl div {
  padding: 24px 10px 0 0;
}

.dictionary-hero__intro dt {
  color: var(--red-bright);
  font-size: clamp(25px, 3vw, 42px);
  font-weight: 650;
  letter-spacing: -0.05em;
}

.dictionary-hero__intro dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.dictionary-tools {
  position: relative;
  z-index: 3;
  padding: clamp(72px, 8vw, 112px) 0 46px;
  background: var(--dictionary-surface);
  border-bottom: 1px solid var(--line);
}

.dictionary-tools__head {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.72fr);
  gap: clamp(42px, 8vw, 120px);
  align-items: end;
}

.dictionary-tools__head h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(38px, 5vw, 74px);
  font-weight: 520;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.dictionary-tools__head > p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.dictionary-search {
  margin-top: clamp(44px, 6vw, 76px);
}

.dictionary-search > label {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dictionary-search__field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 78px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: white;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.dictionary-search__field:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(179, 30, 24, 0.12);
}

.dictionary-search__field > span {
  margin-right: 17px;
  color: var(--red);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-2px) rotate(-16deg);
}

.dictionary-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(18px, 2vw, 25px);
}

.dictionary-search input::placeholder {
  color: rgba(17, 17, 17, 0.4);
}

.dictionary-search button,
.dictionary-empty button {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--red);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.dictionary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.dictionary-filters button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dictionary-filters button:hover,
.dictionary-filters button:focus-visible,
.dictionary-filters button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.dictionary-alphabet {
  display: grid;
  grid-template-columns: repeat(26, minmax(28px, 1fr));
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dictionary-alphabet a,
.dictionary-alphabet span {
  display: grid;
  min-height: 48px;
  place-items: center;
  border-right: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.dictionary-alphabet a:hover,
.dictionary-alphabet a:focus-visible {
  background: var(--red);
  color: white;
}

.dictionary-alphabet span {
  color: rgba(17, 17, 17, 0.22);
}

.dictionary-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dictionary-content {
  padding: 0 0 clamp(88px, 11vw, 160px);
  background: var(--dictionary-surface);
}

.dictionary-letter {
  scroll-margin-top: 96px;
  padding-top: clamp(70px, 9vw, 124px);
}

.dictionary-letter__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.dictionary-letter__head h2 {
  margin: 0;
  color: var(--red);
  font-size: clamp(70px, 9vw, 132px);
  font-weight: 520;
  letter-spacing: -0.075em;
  line-height: 0.7;
}

.dictionary-letter__head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.dictionary-entry {
  position: relative;
  min-height: 340px;
  scroll-margin-top: 100px;
  padding: clamp(26px, 3.6vw, 48px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--dictionary-card);
  transition: background 0.25s, box-shadow 0.25s;
}

.dictionary-entry:hover {
  z-index: 1;
  background: white;
  box-shadow: 0 18px 54px rgba(17, 17, 17, 0.08);
}

.dictionary-entry:target {
  outline: 3px solid var(--red);
  outline-offset: -3px;
  background: white;
}

.dictionary-entry__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.dictionary-entry__meta span {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dictionary-entry__meta a {
  color: rgba(17, 17, 17, 0.28);
  font-size: 16px;
  font-weight: 800;
}

.dictionary-entry__meta a:hover,
.dictionary-entry__meta a:focus-visible {
  color: var(--red);
}

.dictionary-entry h3 {
  margin: 0 0 22px;
  font-size: clamp(27px, 3vw, 43px);
  font-weight: 560;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.dictionary-entry > p {
  max-width: 700px;
  margin: 0;
  color: #3f3d39;
  font-size: 15px;
  line-height: 1.72;
}

.dictionary-entry .dictionary-entry__example {
  margin-top: 20px;
  padding-left: 17px;
  border-left: 2px solid var(--red);
  color: var(--muted);
  font-size: 13px;
}

.dictionary-entry__related {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.dictionary-entry__related i {
  color: var(--red);
  font-size: 18px;
  font-style: normal;
  transition: transform 0.2s;
}

.dictionary-entry__related:hover i {
  transform: translateX(4px);
}

.dictionary-empty {
  margin-top: 60px;
  padding: clamp(36px, 6vw, 72px);
  border: 2px solid var(--ink);
  background: white;
  text-align: center;
}

.dictionary-empty strong {
  display: block;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -0.05em;
}

.dictionary-empty p {
  margin: 14px 0 22px;
  color: var(--muted);
}

.dictionary-method {
  padding: clamp(82px, 10vw, 146px) 0;
  background: white;
}

.dictionary-method__grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(48px, 9vw, 140px);
}

.dictionary-method h2 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(40px, 5.5vw, 78px);
  font-weight: 520;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.dictionary-method__copy > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.76;
}

.dictionary-sources {
  display: grid;
  margin: 35px 0;
  border-top: 1px solid var(--line);
}

.dictionary-sources a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 750;
}

.dictionary-sources a span {
  color: var(--red);
}

.dictionary-method__copy .dictionary-reviewed {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.dictionary-reviewed a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dictionary-cta h2 {
  max-width: 900px;
}

[data-dictionary-entry][hidden],
[data-dictionary-group][hidden],
[data-dictionary-empty][hidden],
[data-dictionary-clear][hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .dictionary-hero__grid {
    grid-template-columns: 1fr;
  }

  .dictionary-hero__intro {
    max-width: 720px;
  }

  .dictionary-alphabet {
    grid-template-columns: repeat(13, minmax(30px, 1fr));
  }

  .dictionary-alphabet a:nth-child(13),
  .dictionary-alphabet span:nth-child(13) {
    border-right: 0;
  }
}

@media (max-width: 820px) {
  .dictionary-hero {
    min-height: auto;
    padding-top: 126px;
  }

  .breadcrumbs--dark {
    margin-bottom: 68px;
  }

  .dictionary-tools__head,
  .dictionary-method__grid {
    grid-template-columns: 1fr;
  }

  .dictionary-grid {
    grid-template-columns: 1fr;
  }

  .dictionary-entry {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .dictionary-hero h1 {
    font-size: clamp(53px, 16vw, 76px);
  }

  .dictionary-hero__intro dl {
    grid-template-columns: 1fr 1fr;
  }

  .dictionary-hero__intro dl div:last-child {
    display: none;
  }

  .dictionary-search__field {
    min-height: 66px;
    padding: 0 15px;
  }

  .dictionary-search__field > span {
    margin-right: 10px;
  }

  .dictionary-search input {
    font-size: 16px;
  }

  .dictionary-filters {
    flex-wrap: nowrap;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .dictionary-filters button {
    flex: 0 0 auto;
  }

  .dictionary-alphabet {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
  }

  .dictionary-alphabet a,
  .dictionary-alphabet span {
    border-bottom: 1px solid var(--line);
  }

  .dictionary-letter__head h2 {
    font-size: 76px;
  }

  .dictionary-entry {
    padding: 28px 23px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dictionary-entry,
  .dictionary-entry__related i {
    transition: none;
  }
}
