:root {
  --bg: #1B2E5F;
  --text: #ffffff;
  --bar-text: #202124;
  --bar-placeholder: #6b7280;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: #1B2E5F;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.page-shell.has-results {
  justify-content: flex-start;
  padding-top: 72px;
  padding-bottom: 48px;
}

.page-shell--results {
  justify-content: flex-start;
  gap: 14px;
  padding-top: 40px;
  padding-bottom: 48px;
}

.hero-logo {
  width: clamp(320px, 38vw, 430px);
  height: auto;
  margin-top: -34px;
  margin-bottom: 8px;
}

.hero-logo--results {
  width: clamp(180px, 20vw, 240px);
  margin: 0;
}

.home-link {
  display: inline-flex;
  justify-content: center;
}

.search-form {
  width: min(560px, calc(100vw - 72px));
}

.search-form--results {
  margin-bottom: 6px;
}

.search-bar {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(10, 20, 40, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.search-bar:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(10, 20, 40, 0.22);
}

.search-bar.blocked {
  border-color: #ef4444;
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.24);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: #9aa0a6;
}

.search-bar input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bar-text);
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: var(--bar-placeholder);
}

.results-shell {
  width: min(720px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.results-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  line-height: 1.5;
}

.results-list {
  display: grid;
  gap: 12px;
}

.result-card {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(10, 20, 40, 0.14);
}

.result-card:hover,
.result-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(10, 20, 40, 0.18);
}

.result-url {
  display: block;
  color: #1B2E5F;
  font-size: 0.84rem;
  word-break: break-all;
}

.result-title {
  display: block;
  margin-top: 5px;
  font-size: 1rem;
  font-weight: 600;
}

.result-snippet {
  display: block;
  margin-top: 8px;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.55;
}

.fallback-link {
  color: #ffffff;
  font-size: 0.94rem;
  text-decoration: underline;
}

.sr-only {
  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-shell {
    padding: 20px;
    gap: 8px;
  }

  .page-shell.has-results {
    padding-top: 44px;
    padding-bottom: 28px;
  }

  .page-shell--results {
    gap: 12px;
    padding-top: 28px;
  }

  .hero-logo {
    width: clamp(240px, 58vw, 300px);
    margin-top: -18px;
    margin-bottom: 6px;
  }

  .hero-logo--results {
    width: clamp(150px, 36vw, 190px);
    margin: 0;
  }

  .search-form {
    width: min(320px, calc(100vw - 48px));
  }

  .search-bar {
    min-height: 52px;
    gap: 12px;
    padding: 0 16px;
  }

  .results-shell {
    width: min(360px, calc(100vw - 32px));
  }
}
