:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --bg-gradient: radial-gradient(circle at top, #1e293b 0%, #0b0f19 100%);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.14);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.10);
  --red: #f87171;
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.10);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --input-bg: rgba(0, 0, 0, 0.25);
  --h1-from: #ffffff;
  --link: #93c5fd;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-gradient: radial-gradient(circle at top, #ffffff 0%, #eaeff6 100%);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: rgba(15, 23, 42, 0.10);
  --text: #0f172a;
  --muted: #556070;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: rgba(37, 99, 235, 0.10);
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.08);
  --red: #dc2626;
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, 0.08);
  --input-bg: #ffffff;
  --h1-from: #0f172a;
  --link: #1d4ed8;
}


* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  padding: 0 16px 64px;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
}

header.hero {
  text-align: center;
  margin: 74px 0 20px;
}

header.hero img {
  width: 60px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 8px 20px rgba(59, 130, 246, 0.3));
}

header.hero h1 {
  font-size: 1.95rem;
  font-weight: 800;
  margin: 0 0 8px;
  text-wrap: balance;
  background: linear-gradient(135deg, var(--h1-from) 20%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header.hero p {
  color: var(--muted);
  margin: 0 auto;
  font-size: 0.98rem;
  max-width: 60ch;
}

.tool-header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 16px auto 20px;
}
.tool-header-nav a {
  padding: 6px 8px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tool-header-nav a:hover,
.tool-header-nav a:focus-visible,
.tool-header-nav a[aria-current="page"] {
  border-bottom-color: var(--blue);
  color: var(--link);
}
@media (max-width: 480px) {
  .tool-header-nav { gap: 1px 4px; }
  .tool-header-nav a { padding: 5px 6px; font-size: .81rem; }
}

.tool-feedback-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--link);
  font-size: .85rem;
}
