.tool-hero-heading {
  margin-block-end: clamp(1.6rem, 3vw, 2.5rem);
}

.tool-hero-heading > .breadcrumbs {
  margin-block-end: .95rem;
}

.tool-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(1.2rem, 3.4vw, 3rem);
  min-height: 15rem;
  padding: clamp(1.55rem, 4.25vw, 3.75rem);
  border: 2px solid var(--ink);
  border-radius: 1.15rem;
  background: var(--navy);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}

.tool-hero h1 {
  max-inline-size: 12ch;
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 4.85rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.tool-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 6rem;
}

.tool-hero-art::before {
  position: absolute;
  z-index: -1;
  inset: -4.5rem -4rem;
  content: "";
  background-image: linear-gradient(#fff4d238 1px, transparent 1px), linear-gradient(90deg, #fff4d238 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: radial-gradient(ellipse, #000 25%, transparent 72%);
  transform: rotate(-12deg);
}

.tool-hero--scrabble-helper .tool-hero-tile-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.3rem, .8vw, .75rem);
  width: min(100%, 21rem);
  transform: rotate(-8deg);
}

.tool-hero-tile {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: .6rem;
  box-shadow: 3px 4px 0 #070736;
  background: var(--yellow);
  color: var(--navy);
  font-size: clamp(1.4rem, 3.25vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
}

.tool-hero-tile small {
  position: absolute;
  inset-inline-end: .35rem;
  inset-block-end: .25rem;
  font-size: clamp(.5rem, .95vw, .75rem);
  font-weight: 800;
}

.tool-hero--scrabble-helper .tool-hero-tile:nth-child(2) { background: var(--paper); transform: translateY(-.2rem); }
.tool-hero--scrabble-helper .tool-hero-tile:nth-child(3) { background: var(--lime); transform: translateY(.22rem); }
.tool-hero--scrabble-helper .tool-hero-tile:nth-child(4) { border-style: dashed; background: var(--bluewash); }

@media (max-width: 640px) {
  .tool-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    min-height: 0;
  }

  .tool-hero h1 { max-inline-size: none; font-size: clamp(2rem, 7.1vw, 2.8rem); text-wrap: wrap; }
  .tool-hero-art { justify-items: start; min-height: 3.75rem; }
  .tool-hero-art::before { inset: -2rem -3rem; }
  .tool-hero--scrabble-helper .tool-hero-tile-row { width: min(100%, 11rem); transform: rotate(-4deg); }
  .tool-hero-tile { border-radius: .4rem; }
}

.tool-hero-tiles,
.tool-hero-lines {
  display: grid;
  justify-items: start;
  gap: .48rem;
}

.tool-hero-tiles {
  --tile-size: clamp(1.7rem, 4vw, 3.8rem);
}

.tool-hero-tile-row {
  display: flex;
  gap: clamp(.22rem, .6vw, .48rem);
}

.tool-hero-tile {
  width: var(--tile-size);
  font-size: clamp(.88rem, 2.4vw, 1.95rem);
}

.tool-hero--scrabble-helper .tool-hero-tiles { width: 100%; justify-items: center; }
.tool-hero--scrabble-helper .tool-hero-tile { width: auto; font-size: clamp(1.4rem, 3.25vw, 2.75rem); }
.tool-hero .tone-gold { background: var(--yellow); }
.tool-hero .tone-cream { background: var(--paper); }
.tool-hero .tone-blue { background: var(--bluewash); }
.tool-hero .tone-lime { background: var(--lime); }
.tool-hero .tone-slate { background: #36366b; color: var(--white); border-color: #ffffff42; }
.tool-hero .tone-blank { border-style: dashed; background: var(--bluewash); }
.tool-hero .tone-empty { visibility: hidden; }

.tool-hero--word-finder .tool-hero-tiles { transform: rotate(-6deg); }
.tool-hero--word-finder .tone-blank { transform: translateY(-.3rem); }
.tool-hero--word-unscrambler .tool-hero-tile-row:last-child { margin-inline-start: calc(var(--tile-size) / 2); }
.tool-hero--anagram-finder .tool-hero-tiles { transform: rotate(-5deg); }
.tool-hero--anagram-finder .tool-hero-tile-row:last-child { margin-inline-start: .65rem; }
.tool-hero--palindrome-isogram .tool-hero-tiles { justify-items: center; }

.tool-hero--crossword-helper .tool-hero-tiles,
.tool-hero--word-ladder-solver .tool-hero-tiles {
  --tile-size: clamp(1.22rem, 2.8vw, 2.25rem);
  gap: .2rem;
}

.tool-hero--crossword-helper .tool-hero-tile-row,
.tool-hero--word-ladder-solver .tool-hero-tile-row { gap: .2rem; }

.tool-hero--crossword-helper .tool-hero-tile,
.tool-hero--word-ladder-solver .tool-hero-tile { border-radius: .26rem; font-size: .95rem; box-shadow: 1px 2px 0 #070736; }

.tool-hero--word-ladder-solver .tool-hero-tile-row:nth-child(n+2) { margin-inline-start: .55rem; }
.tool-hero--word-ladder-solver .tool-hero-tiles { border-inline-start: 2px dashed #ffffff65; padding-inline-start: .55rem; }
.tool-hero--cryptogram-solver .tool-hero-tile-row + .tool-hero-tile-row { border-top: 1px dashed #ffffff7a; padding-top: .55rem; }

.tool-hero-quordle {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: .48rem;
  transform: rotate(4deg);
}

.tool-hero-mini-board {
  display: grid;
  grid-template-columns: repeat(5, clamp(.55rem, 1.2vw, 1.1rem));
  gap: .18rem;
  padding: .35rem;
  border: 1px solid #ffffff67;
  border-radius: .36rem;
  background: #08084d;
}

.tool-hero-mini-board span { aspect-ratio: 1; border-radius: .1rem; }

.tool-hero-hive {
  display: grid;
  grid-template-columns: repeat(6, clamp(.58rem, 1.4vw, 1.25rem));
  grid-template-rows: repeat(3, clamp(1.5rem, 3.25vw, 3rem));
  gap: .18rem;
}

.tool-hero-hive span {
  grid-column: span 2;
  display: grid;
  place-items: center;
  background: var(--paper);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color: var(--navy);
  font-size: clamp(.8rem, 2vw, 1.6rem);
  font-weight: 800;
}

.tool-hero-hive span:first-child { grid-area: 2 / 3 / 3 / 5; background: var(--yellow); }
.tool-hero-hive span:nth-child(2) { grid-area: 1 / 2 / 2 / 4; }
.tool-hero-hive span:nth-child(3) { grid-area: 1 / 4 / 2 / 6; }
.tool-hero-hive span:nth-child(4) { grid-area: 2 / 1 / 3 / 3; }
.tool-hero-hive span:nth-child(5) { grid-area: 2 / 5 / 3 / 7; }
.tool-hero-hive span:nth-child(6) { grid-area: 3 / 2 / 4 / 4; }
.tool-hero-hive span:nth-child(7) { grid-area: 3 / 4 / 4 / 6; }

.tool-hero-box {
  display: grid;
  grid-template: ". top ." auto "left center right" 1fr ". bottom ." auto / auto 1fr auto;
  gap: .25rem;
  align-items: center;
  justify-items: center;
  color: var(--navy);
  font-size: clamp(.7rem, 1.25vw, 1rem);
  font-weight: 800;
}

.tool-hero-box span { padding: .15rem .35rem; border-radius: .25rem; letter-spacing: .12em; }
.tool-hero-box span:nth-child(1) { grid-area: top; background: var(--yellow); }
.tool-hero-box span:nth-child(2) { grid-area: right; background: var(--lime); writing-mode: vertical-rl; }
.tool-hero-box span:nth-child(3) { grid-area: bottom; background: #e6dfff; }
.tool-hero-box span:nth-child(4) { grid-area: left; background: #ffd9be; writing-mode: vertical-rl; }
.tool-hero-box-center { grid-area: center; width: clamp(3rem, 6vw, 5.4rem); aspect-ratio: 1; border: 2px dashed #fff4d299; border-radius: .35rem; background: #fff4d220; }

.tool-hero-lines > div { display: flex; flex-wrap: wrap; gap: .28rem; }
.tool-hero-lines span {
  padding: .23rem .48rem;
  border-radius: .32rem;
  background: var(--paper);
  color: var(--navy);
  font-size: clamp(.7rem, 1.65vw, 1.25rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .04em;
}
.tool-hero-word-list { justify-items: end; }
.tool-hero-word-list > div { flex-wrap: nowrap; }
.tool-hero--rhyme-finder .tool-hero-word-list { transform: rotate(-5deg); }
.tool-hero-regex span { font-family: monospace; }
.tool-hero-syllables { display: grid; justify-items: center; gap: .55rem; }
.tool-hero-beats { display: flex; align-items: center; justify-content: center; gap: .22rem; height: 2.2rem; }
.tool-hero-beats i { width: .23rem; height: .7rem; border-radius: .2rem; background: var(--lime); }
.tool-hero-beats i:nth-child(2n) { height: 1.45rem; background: var(--yellow); }
.tool-hero-beats i:nth-child(3n) { height: 2.1rem; }
.tool-hero-beats i:nth-child(5n) { height: .45rem; }

@media (max-width: 640px) {
  .tool-hero-tiles { --tile-size: 2rem; }
  .tool-hero--scrabble-helper .tool-hero-tiles { justify-items: start; }
  .tool-hero--scrabble-helper .tool-hero-tile-row { width: min(48vw, 11rem); }
}
