.tool-guide {
  --tg-accent: var(--green);
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
}

.tool-guide :is(h2, h3, h4, p, dl, dd, figure, pre, ol) { margin: 0; }
.tool-guide p, .tool-guide dd { color: var(--text-dim); line-height: 1.7; }
.tool-guide h2 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.25; }
.tool-guide h3 { font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.35; }
.tool-guide h4 { font-size: 1rem; line-height: 1.45; }
.tool-guide p, .tool-guide dd, .tool-guide summary { font-size: .93rem; }
.tool-guide a { color: var(--tg-accent); }
.tool-guide a:focus-visible, .tool-guide summary:focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 3px; }
.tool-guide code { font-family: var(--font-mono); overflow-wrap: anywhere; }

.tg-header, .tg-section { padding: clamp(18px, 3vw, 28px); }
.tg-header { border-top: 3px solid var(--tg-accent); }
.tg-header p { max-width: 68ch; margin-top: 9px; }
.tg-example {
  display: grid;
  gap: 10px;
  margin: 0 clamp(12px, 3vw, 28px) clamp(16px, 3vw, 24px);
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg3);
}

.tg-section { border-top: 1px solid var(--border); }
.tg-section > h3 { margin-bottom: 12px; }
.tg-cases, .tg-metrics, .tg-image-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tg-cases > div, .tg-metrics > div { padding: 12px; border: 1px solid var(--border); border-radius: 7px; }
.tg-cases p { margin-top: 4px; }
.tg-metrics dt, .tg-image-pair figcaption { color: var(--text-dim); font-size: .82rem; }
.tg-metrics dd { color: var(--text); font-weight: 650; font-size: clamp(.94rem, 2.2vw, 1.25rem); }
.tg-image-pair img { display: block; width: 100%; height: auto; aspect-ratio: 888 / 620; border-radius: 7px; }
.tg-image-pair figcaption { display: flex; gap: 3px 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 5px; }
.tg-image-pair figcaption strong { color: var(--text); font-variant-numeric: tabular-nums; }
.tool-guide .tg-note { font-size: .82rem; }
.tool-guide .tg-print-sample { justify-self: center; width: min(100%, 380px); }
.tg-print-sample img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 5px; }
.tg-print-sample figcaption { color: var(--text-dim); font-size: .82rem; text-align: center; margin-top: 5px; }
.tool-guide .tg-poster-sample {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 140px);
  align-items: center;
  gap: 10px;
  max-width: 500px;
  padding: clamp(12px, 3vw, 22px);
  border: 1px solid #65836e;
  border-radius: 8px;
  background: #edf5ee;
  color: #163422;
}
.tg-poster-sample strong { font-size: clamp(1.35rem, 3.3vw, 2.25rem); }
.tool-guide .tg-poster-sample p { color: #365846; }
.tg-poster-sample img { display: block; width: 100%; height: auto; background: white; }
.tg-poster-sample figcaption { grid-column: 1 / -1; font-size: .8rem; }
.tg-code { padding: 12px; border-radius: 6px; background: var(--bg2); overflow: auto; }
.tg-board, .tg-strip { display: grid; gap: 4px; }
.tg-board { grid-template-columns: 29fr 19fr; }
.tg-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-board > div, .tg-strip > span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg2);
  text-align: center;
  color: var(--text);
  font-size: .84rem;
}
.tg-board > div > span { color: var(--text-dim); }
.tg-swatch { display: inline-block; vertical-align: -.1em; width: 1em; height: 1em; margin-right: .4em; border: 1px solid #9ca3af; border-radius: 3px; }

.tg-steps { display: grid; gap: 12px; padding: 0; list-style: none; counter-reset: tg-step; }
.tg-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; counter-increment: tg-step; }
.tg-steps li::before {
  content: counter(tg-step);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--tg-accent);
  font-weight: 650;
}
.tg-specs { border-top: 1px solid var(--border); }
.tg-specs > div { display: grid; grid-template-columns: minmax(106px, .28fr) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tg-specs dt { font-weight: 650; }
.tg-questions details { border-bottom: 1px solid var(--border); }
.tg-questions summary { padding: 11px 4px; cursor: pointer; font-weight: 600; line-height: 1.45; }
.tg-questions details > p { padding: 0 4px 12px 18px; }
.tg-further p { max-width: 72ch; }
.tg-further p + p { margin-top: 8px; }
.tg-further a { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 560px) {
  .tg-cases { grid-template-columns: minmax(0, 1fr); }
  .tg-specs > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .tg-questions summary { min-height: 44px; }
}
