html.dark-mode {
  color-scheme: dark;
  background: #0f172a;
}

html.dark-mode body {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

html.dark-mode body[class~="bg-paper"] {
  background-color: #0f172a !important;
}

html.dark-mode [class~="bg-paper"] {
  background-color: #1e293b !important;
}

html.dark-mode [class~="bg-surface"],
html.dark-mode [class*="bg-surface/"] {
  background-color: #17212f !important;
}

html.dark-mode [class~="bg-white"] {
  background-color: #1e293b !important;
}

html.dark-mode [class~="text-ink"] {
  color: #f8fafc !important;
}

html.dark-mode [class~="text-ink-soft"] {
  color: #aab7c8 !important;
}

html.dark-mode [class~="text-accent-dark"] {
  color: #5eead4 !important;
}

html.dark-mode [class~="border-line"],
html.dark-mode [class~="border-dashed"] {
  border-color: #334155 !important;
}

html.dark-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark-mode textarea,
html.dark-mode select {
  border-color: #475569;
  background-color: #1e293b;
  color: #f8fafc;
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder {
  color: #94a3b8;
}

html.dark-mode input[type="checkbox"],
html.dark-mode input[type="radio"],
html.dark-mode input[type="range"] {
  color-scheme: dark;
}

html.dark-mode [class~="bg-line"] {
  background-color: #334155 !important;
}

html.dark-mode [class~="hover:bg-paper"]:hover,
html.dark-mode [class~="focus:bg-surface"]:focus {
  background-color: #263449 !important;
}

html.dark-mode [class~="bg-paper/40"],
html.dark-mode [class~="bg-line/40"] {
  background-color: #1e293b !important;
}

html.dark-mode .nav-search-results,
html.dark-mode .nav-popover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

html.dark-mode .cursor-blink {
  color: #2dd4bf;
}

html.dark-mode img:not([src*="data:"]) {
  color: #aab7c8;
}

img[class*="hover:scale-105"],
img.tool-screenshot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

html.dark-mode ::selection {
  background: #0f766e;
  color: #f8fafc;
}

.tool-guide {
  max-width: 1152px;
  margin: 40px auto 0;
  padding: 28px;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  background: #fff;
  color: #14181c;
  box-shadow: 0 8px 24px rgb(20 24 28 / 5%);
}

.tool-guide h2,
.tool-guide h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.3;
}

.tool-guide h2 { font-size: 1.5rem; }
.tool-guide h3 { font-size: 1.125rem; }

.tool-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.tool-guide-grid p,
.tool-guide-grid li {
  color: #5b6570;
  font-size: .875rem;
  line-height: 1.75;
}

.tool-guide-grid p { margin: 8px 0 0; }
.tool-guide-grid ol,
.tool-guide-grid ul { margin: 8px 0 0; padding-left: 22px; }
.tool-guide-grid li { margin: 0 0 8px; padding-left: 3px; }

html.dark-mode .tool-guide {
  border-color: #334155;
  background: #17212f;
  color: #f8fafc;
  box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
}

html.dark-mode .tool-guide-grid p,
html.dark-mode .tool-guide-grid li { color: #aab7c8; }

@media (max-width: 700px) {
  .tool-guide { margin: 28px 16px 0; padding: 20px; }
  .tool-guide-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
