:root {
  color-scheme: light dark;
  --bg: #f5f2ea;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #fffdf8;
  --text: #17201d;
  --muted: #65706b;
  --line: rgba(23, 32, 29, 0.13);
  --accent: #0f766e;
  --accent-strong: #0a5d57;
  --accent-soft: #dff3ed;
  --shadow: 0 24px 70px rgba(48, 54, 46, 0.12);
  --radius-lg: 28px;
  --radius-md: 16px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(244, 192, 117, 0.27), transparent 27rem),
    radial-gradient(circle at 88% 82%, rgba(15, 118, 110, 0.16), transparent 30rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.38;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 34px;
}

.hero {
  max-width: 720px;
  margin: 0 0 34px;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  font-size: 0.94rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid var(--text);
  border-radius: 50%;
}

.brand-mark::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 9px;
  height: 2px;
  content: "";
  background: var(--text);
  border-radius: 3px;
  transform: rotate(45deg);
}

.eyebrow {
  margin: 56px 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 670px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.intro {
  max-width: 590px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}

.search-panel {
  padding: clamp(22px, 5vw, 42px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.query-wrap {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.query-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.query-wrap svg,
.search-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#query {
  width: 100%;
  min-height: 50px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

#query::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

kbd,
code {
  padding: 2px 6px;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
}

.engines {
  min-width: 0;
  margin: 30px 0 0;
  padding: 0;
  border: 0;
}

.engines legend {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.engine-option {
  position: relative;
}

.engine-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.engine-option label {
  display: flex;
  min-height: 72px;
  padding: 11px 8px;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-strong) 54%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.engine-option label:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  transform: translateY(-2px);
}

.engine-option input:focus-visible + label {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.engine-option input:checked + label {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.engine-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.engine-name {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.search-button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 19px;
  gap: 22px;
  align-items: center;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.21);
  cursor: pointer;
  font-weight: 740;
  transition: background 150ms ease, transform 150ms ease;
}

.search-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.search-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 3px;
}

footer {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

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

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 600px);
    padding-top: 28px;
  }

  .eyebrow {
    margin-top: 44px;
  }

  .engine-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .actions,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .search-button {
    justify-content: space-between;
  }

  .shortcut-note {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111917;
    --surface: rgba(27, 39, 35, 0.78);
    --surface-strong: #17231f;
    --text: #eef5f1;
    --muted: #a3b0aa;
    --line: rgba(229, 244, 236, 0.13);
    --accent: #55c8b4;
    --accent-strong: #74d8c6;
    --accent-soft: #173f38;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  }

  body {
    background:
      radial-gradient(circle at 15% 12%, rgba(153, 95, 47, 0.21), transparent 27rem),
      radial-gradient(circle at 88% 82%, rgba(57, 176, 156, 0.13), transparent 30rem),
      var(--bg);
  }

  .search-panel {
    border-color: rgba(255, 255, 255, 0.08);
  }

  .search-button {
    color: #082a24;
  }
}

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