:root {
  --bg: #f5f7fb;
  --bg-soft: #edf2f8;
  --card: rgba(255, 255, 255, .92);
  --text: #172033;
  --muted: #6b7280;
  --line: #d9e1ea;
  --line-soft: #e7edf4;
  --accent: #2f6f91;
  --accent-dark: #245a77;
  --accent-soft: #e6f2f7;
  --shadow: 0 22px 60px rgba(31, 51, 78, .10);
  --shadow-strong: 0 28px 80px rgba(31, 51, 78, .18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(47, 111, 145, .13), transparent 30rem),
    radial-gradient(circle at 85% 85%, rgba(96, 165, 250, .10), transparent 32rem),
    linear-gradient(145deg, var(--bg), var(--bg-soft));
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.page {
  width: min(860px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vh, 70px) 0 26px;
}

.hero {
  margin: auto 0;
  text-align: center;
}

h1 {
  margin: 0 0 34px;
  font-size: clamp(2.45rem, 8vw, 5.1rem);
  line-height: .95;
  letter-spacing: -.07em;
  font-weight: 800;
}

.search-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(47, 111, 145, .22);
  border-radius: 34px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-row input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--line-soft);
  outline: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  font-size: 1.22rem;
  padding: 19px 21px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 24px rgba(31, 51, 78, .06);
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.search-row input:focus {
  background: #fff;
  border-color: rgba(47, 111, 145, .65);
  box-shadow: 0 0 0 5px rgba(47, 111, 145, .12), 0 10px 28px rgba(31, 51, 78, .08);
}

.search-row button {
  border: 0;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  padding: 0 30px;
  font-weight: 750;
  cursor: pointer;
  transition: background .14s ease, transform .14s ease;
}

.search-row button:hover {
  background: var(--accent-dark);
}

.search-row button:active {
  transform: translateY(1px);
}

.engines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
}

.engine {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}

.engine:hover {
  color: var(--text);
  border-color: #c8d5e2;
  transform: translateY(-1px);
}

.engine.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: rgba(47, 111, 145, .35);
}

.engine.affiliate {
  color: #5f6470;
}

.footer {
  margin-top: clamp(34px, 8vh, 72px);
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 12px;
}

.footer-links a {
  color: #4d5a68;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .footer-links {
    flex-wrap: nowrap;
  }
}

.meta-line,
.smallprint {
  margin: 7px auto 0;
  max-width: 760px;
  line-height: 1.55;
}

.meta-line {
  color: #7c8794;
}

.smallprint.muted {
  color: #87909c;
}

.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;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 22px, 860px);
  }

  .search-card {
    border-radius: 26px;
    padding: 11px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    min-height: 52px;
  }

  .search-row input {
    font-size: 1.08rem;
    padding: 16px 17px;
  }

  .engines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .engine {
    min-height: 42px;
    border-radius: 14px;
    font-size: .92rem;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2.35rem;
    letter-spacing: -.055em;
  }
}

