* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.5;
}

/* Form controls don't inherit font-family from the UA stylesheet by default
   and fall back to the browser's own control font instead of the page's. */
input, select, textarea, button {
  font-family: inherit;
}

/* Visible on every interactive element, keyboard-triggered only so mouse
   clicks don't get a ring. Do not remove without replacing it. */
:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reserved ad space: fixed min-height from first render so a slot filling
   in later never shifts the page (CLS). No ad network wired up yet. */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  margin: 2rem auto;
  max-width: 728px;
  border: 1px dashed #d4d4d4;
  border-radius: 8px;
  background: #fafafa;
  color: #595959;
  font-size: 0.8rem;
}

/* --- Shared page shell: reused by every tool page and the home page --- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}

.tool-header {
  max-width: 560px;
  margin: 1.25rem auto 1rem;
  text-align: center;
}

.tool-header h1 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

.tool-subtitle {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.4;
}

.noscript-banner {
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}
