.tools {
  padding-block: 28px 14px;
}

.tools h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: 0 14px;
}

.tools h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #60744c, #60744c00);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.feature-grid {
  grid-template-columns: minmax(0, 1fr);
}

.tool {
  --card-accent: #d1e39e;
  --card-surface: #20362b;
  --art-position: center;
  display: block;
  min-width: 0;
  border-radius: 13px;
}

.tool-spiredice {
  --card-accent: #f0b8a2;
  --card-surface: #36272b;
}

.tool-gestor {
  --card-accent: #d2fa86;
  --card-surface: #202b20;
  --art-position: center 59%;
}

.tool-oraculo {
  --card-accent: #e9ce93;
  --card-surface: #333123;
}

.tool-pitonisa {
  --card-accent: #bddaff;
  --card-surface: #202f42;
}

.tool-umbral {
  --card-accent: #a2e1d9;
  --card-surface: #1b3432;
}

.tool-vigia {
  --card-accent: #e4d2a3;
  --card-surface: #303529;
  --art-position: center 43%;
}

.tool-beyond {
  --card-accent: #dac7fb;
  --card-surface: #2b2942;
  --art-position: center 44%;
}

.tool-hexplore {
  --card-accent: #f0d69a;
  --card-surface: #2b3525;
  --art-position: center 56%;
}

.cover {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #607056;
  border-color: color-mix(in srgb, var(--card-accent) 33%, #263628);
  border-radius: inherit;
  background: var(--card-surface);
  background: linear-gradient(145deg, var(--card-surface), color-mix(in srgb, var(--card-surface) 78%, #101713));
  box-shadow: 0 3px 0 #0b1812d9, 0 7px 20px #08140d40;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.tool-art {
  position: relative;
  isolation: isolate;
  min-width: 0;
  height: clamp(80px, 24vw, 120px);
  overflow: hidden;
  border-bottom: 1px solid #bac9ad26;
  background-color: var(--card-surface);
}

.tool-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--art-position);
  transition: transform 260ms ease-out;
}

.tool-art::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(15deg, #0a1713a6, transparent 58%);
}

.oracle-mark, .tool-app-icon {
  position: absolute;
  z-index: 2;
  bottom: 8px;
  left: 9px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 35px;
  height: 35px;
  border: 1px solid currentColor;
  border-radius: 9px;
  color: var(--card-accent);
  background: #111d19ec;
  box-shadow: 0 2px 7px #080f0bd0;
}

.oracle-eye {
  display: block;
  width: 67%;
  height: 67%;
}

.tool-wordmark {
  position: absolute;
  z-index: 2;
  bottom: 9px;
  left: 10px;
  display: block;
  width: min(55%, 135px);
  max-height: 55%;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 2px 5px #0d0726);
}

.tool-details {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px;
  padding: 10px 10px 12px;
}

.tool-copy {
  align-self: start;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tool-copy h3 {
  margin: 0;
  color: #f6f2dc;
  font: 700 clamp(16px, 4.5vw, 22px)/1.13 "Barlow Semi Condensed", "Trebuchet MS", sans-serif;
}

.tool-copy p {
  margin: 5px 0 0;
  color: #e0e7d9;
  font: 500 13px/1.24 "Barlow Semi Condensed", "Trebuchet MS", sans-serif;
}

.game-edition {
  display: block;
  margin-top: 4px;
  color: #c1cdbd;
  font-size: 12px;
}

.tool-hexplore .game-edition {
  margin-top: 0;
  color: #e8dbc0;
}

.tool-arrow {
  position: relative;
  display: inline-grid;
  place-items: center;
  align-self: end;
  width: 29px;
  height: 29px;
  border: 1px solid #849b75;
  border-color: color-mix(in srgb, var(--card-accent) 52%, var(--card-surface));
  border-radius: 50%;
  color: var(--card-accent);
  background: #101b173b;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.tool-arrow::before, .tool-arrow::after {
  position: absolute;
  content: "";
}

.tool-arrow::before {
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translateX(-1px);
}

.tool-arrow::after {
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(1px) rotate(45deg);
}

@media (hover: hover) {
  .tool:hover .cover {
    transform: translateY(-3px);
    border-color: var(--card-accent);
    box-shadow: 0 5px 0 #0b1812d9, 0 11px 24px #08140d63;
  }

  .tool:hover .tool-artwork {
    transform: scale(1.05);
  }

  .tool:hover .tool-arrow {
    transform: translateX(2px);
    color: #172219;
    background: var(--card-accent);
  }
}

.tool:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 4px;
}

.tool:focus-visible .cover {
  border-color: var(--card-accent);
}

.tool:focus-visible .tool-arrow, .tool:active .tool-arrow {
  color: #172219;
  background: var(--card-accent);
}

.feature-grid .cover {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  min-height: 108px;
}

.feature-grid .tool-art {
  height: auto;
  border-right: 1px solid #bac9ad26;
  border-bottom: 0;
}

.feature-grid .tool-artwork {
  position: absolute;
  inset: 0;
}

.feature-grid .tool-details {
  align-items: center;
  padding: 13px 12px;
}

.feature-grid .tool-copy, .feature-grid .tool-arrow {
  align-self: center;
}

.feature-grid .tool-copy h3 {
  font-size: clamp(17px, 4.7vw, 26px);
}

.page > header .brand {
  border-radius: 8px;
}

.page > header .ddg-language select {
  min-height: 38px;
  padding-inline: 9px 5px;
  border-color: #718661;
  border-radius: 8px;
  color: #edf1da;
  background: linear-gradient(#2a4233, #1d3227);
  box-shadow: 0 2px 0 #0c1d14;
}

.skip {
  border-radius: 8px;
  font-weight: 700;
}

.community {
  margin-top: 27px;
}

.comment-toggle, #comment-form button[type="submit"], .clear-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #789369;
  border-radius: 8px;
  color: #edf2dc;
  background: linear-gradient(#304934, #253a2a);
  box-shadow: 0 2px 0 #0c1b12;
  font: 700 15px/1.2 "Barlow Semi Condensed", "Trebuchet MS", sans-serif;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.comment-toggle {
  gap: 11px;
}

.comment-toggle::after {
  width: 7px;
  height: 7px;
  content: "";
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: translateY(-2px) rotate(45deg);
}

details[open] .comment-toggle::after {
  transform: translateY(2px) rotate(225deg);
}

#comment-form button[type="submit"] {
  border-color: #e0eea1;
  color: #1a291a;
  background: linear-gradient(#d7e99f, #bed77c);
}

.comment-toggle:hover, .clear-rating:hover {
  border-color: #bbd695;
  background: #3a5440;
}

#comment-form button[type="submit"]:hover:not(:disabled) {
  background: #dfecae;
}

.clear-rating {
  min-height: 35px;
  padding: 6px 9px;
  font-size: 13px;
}

.clear-rating[hidden] {
  display: none;
}

.rating-options {
  gap: 4px;
}

.star-option {
  border: 1px solid #586f58;
  border-radius: 8px;
  background: #203529;
}

.star-option svg {
  width: 23px;
  height: 23px;
}

.star-option:is(:hover, .filled) {
  border-color: #b2c782;
  background: #30482d;
}

.star-option:focus-within {
  border-radius: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid #405b46;
  border-radius: 7px;
  color: #dbe6d2;
  background: #1c3125;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.footer-links a:hover {
  color: #f1f3d9;
  border-color: #8da677;
  background: #263e2d;
}

footer > p {
  margin: 10px 0 0;
}

@media (min-width: 650px) {
  .tools {
    padding-block: 36px 18px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-art {
    height: 118px;
  }

  .tool-details {
    gap: 10px;
    padding: 13px 14px 15px;
  }

  .tool-copy p {
    font-size: 15px;
  }

  .game-edition {
    font-size: 13px;
  }

  .tool-arrow {
    width: 36px;
    height: 36px;
  }

  .feature-grid .cover {
    min-height: 152px;
  }

  .feature-grid .tool-details {
    padding: 18px 22px;
  }

  .feature-grid .tool-wordmark, .feature-grid .tool-app-icon {
    bottom: 12px;
    left: 12px;
  }
}

@media (max-width: 359px) {
  .grid {
    gap: 8px;
  }

  .tool-details {
    padding-inline: 7px;
  }

  .tool-arrow {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover, .tool-artwork, .tool-arrow,
  .comment-toggle, #comment-form button[type="submit"], .clear-rating {
    transition: none;
  }

  .tool:hover .cover, .tool:hover .tool-artwork, .tool:hover .tool-arrow {
    transform: none;
  }
}
