:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f4fb;
  --text: #18212f;
  --muted: #5d6b82;
  --line: #d9e0ec;
  --accent: #316bff;
  --accent-soft: #eaf0ff;
  --max: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(246, 247, 251, 0.9);
  border-bottom: 1px solid rgba(217, 224, 236, 0.9);
}

.header-inner,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-inner {
  min-height: 64px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  color: var(--text);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav a {
  color: var(--muted);
}

nav a.active,
nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.language-switcher select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
}

main {
  padding: 40px 0 72px;
}

.redirect-page {
  padding-top: 72px;
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(24, 33, 47, 0.04);
}

.hero {
  padding: 48px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

h2 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 16px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 760px;
}

.hero-actions,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}

.button {
  background: var(--accent);
  color: white;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.02);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  padding: 28px;
}

.panel p:last-child,
.panel ul:last-child,
.panel ol:last-child {
  margin-bottom: 0;
}

.section {
  margin-top: 24px;
}

.section-header {
  margin-bottom: 18px;
}

ul, ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

li + li {
  margin-top: 10px;
}

.note {
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
}

.small {
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px 24px;
  }

  .panel {
    padding: 24px;
  }

  .header-inner,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.65; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 30; background: white; padding: 8px 12px; }
.skip-link:focus { top: 8px; }
.search-workbench { margin-top: 28px; }
.search-workbench h2 { font-size: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; min-width: 0; }
.field textarea, .field select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); background: var(--surface); font-weight: 400; }
.field textarea { resize: vertical; line-height: 1.5; }
.search-controls { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.search-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.search-status { margin: 12px 0 0; color: var(--muted); }
.search-status:empty { display: none; }
.search-preview { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.example-queries { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 12px; }
.example-queries button { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); min-height: 36px; }
.tool-privacy { margin-bottom: 8px; }
.search-workbench .small { font-size: 0.875rem; }
@media (max-width: 560px) {
  main { padding-top: 24px; }
  .hero { padding: 24px 18px; }
  .search-controls { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .search-controls .field:last-child { grid-column: 1 / -1; }
  .search-actions .button, .search-actions .button-secondary { flex: 1; }
  .search-preview { padding: 12px; }
  nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 560px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; min-height: 0; }
  .header-actions { display: contents; }
  .brand { grid-column: 1; grid-row: 1; }
  .language-switcher { grid-column: 2; grid-row: 1; font-size: 0.875rem; }
  nav { grid-column: 1 / -1; grid-row: 2; font-size: 0.875rem; }
}
