/* ============================================================
   AllToolio — treść SEO przewodników narzędzi (tools/*)
   Mobile-first, tryb ciemny przez istniejące zmienne CSS.
   ============================================================ */

.tool-guide {
  padding: 1.5rem 0 0.5rem;
  max-width: 52rem;
  /* Worked examples quote hashes, IBANs and code that have no spaces; let them wrap on phones. */
  overflow-wrap: anywhere;
}

.tool-guide[hidden] {
  display: none;
}

.tool-guide > h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.85rem;
}

.tool-guide > h2:first-child,
.tool-guide > .ai-notice:first-child + h2 {
  margin-top: 0;
}

.tool-guide ol,
.tool-guide ul {
  margin: 0 0 0.75rem 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.tool-guide li {
  color: var(--text-muted);
  line-height: 1.6;
}

.tool-guide li::marker {
  color: var(--primary);
  font-weight: 700;
}

/* ---------- FAQ (details / summary) ---------- */
.tool-guide details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.tool-guide summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  outline: none;
}

.tool-guide summary::-webkit-details-marker {
  display: none;
}

.tool-guide summary::after {
  content: "+";
  color: var(--primary);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  flex: none;
}

.tool-guide details[open] summary::after {
  content: "–";
}

.tool-guide summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.tool-guide details > p {
  padding: 0 1rem 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Method and worked-example paragraphs (MIC-ADS1), styled like the rest of the guide text. */
.tool-guide > p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- Powiązane narzędzia (karty) ---------- */
.tool-guide .related-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.tool-guide .related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-guide .related-card::after {
  content: "→";
  color: var(--primary);
  font-weight: 800;
  flex: none;
}

.tool-guide .related-card:hover,
.tool-guide .related-card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.tool-guide .related-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .tool-guide .related-tools {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ---------- Other tools of the category (tools/build.js addCategorySiblings, MIC-SEO3) ---------- */
.tool-guide .cat-siblings-title a {
  color: inherit;
  text-decoration: none;
}

.tool-guide .cat-siblings-title a:hover,
.tool-guide .cat-siblings-title a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.tool-guide .cat-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tool-guide .cat-siblings a {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.tool-guide .cat-siblings a:hover,
.tool-guide .cat-siblings a:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

/* Common amounts in words (amount-in-words page, tools/build/amount-table.js) */
.tool-guide .amount-table-wrap {
  margin: 0.75rem 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tool-guide .amount-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tool-guide .amount-table th,
.tool-guide .amount-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

.tool-guide .amount-table th {
  background: var(--bg-alt);
  font-weight: 700;
}

.tool-guide .amount-table tr:last-child td {
  border-bottom: 0;
}

.tool-guide .amount-pick {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.tool-guide .amount-pick:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.tool-photo-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 1.25rem);
  margin: 1rem 0;
}

.tool-photo-comparison figure {
  margin: 0;
  min-width: 0;
}

.tool-photo-comparison img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.tool-photo-comparison .tool-photo-cutout {
  background: repeating-conic-gradient(#e2e5e9 0% 25%, #f7f8fa 0% 50%) 0 0 / 24px 24px;
}

.tool-photo-comparison figcaption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-photo-credit {
  font-size: 0.85rem;
}
