/* Tool page layout (two columns: text + visual sidebar). Used only by tool pages that link it. Added 2026-10-08. */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.tool-layout .article {
  max-width: 44rem;
  min-width: 0;
}

.tool-layout .article th,
.tool-layout .article td {
  overflow-wrap: normal;
  white-space: nowrap;
}

.tool-layout .article td.wrap-cell {
  white-space: normal;
}

.tool-sidebar {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.tool-sidebar .tool-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  margin: 0 0 0.9rem;
}

.tool-sidebar .tool-logo {
  display: block;
  width: 150px;
  height: auto;
}

.tool-sidebar .tool-icon {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.tool-sidebar .tool-facts {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.tool-sidebar .tool-facts p {
  margin: 0.15rem 0;
}

.tool-sidebar figure {
  margin: 0 0 1rem;
}

.tool-sidebar figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-sidebar figcaption {
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

@media (min-width: 900px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 2.2rem;
    align-items: start;
  }

  .tool-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .tool-layout .article th,
  .tool-layout .article td {
    white-space: normal;
  }
}
