:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #d8dee8;
  --soft: #f6f8fb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --rose: #ec4899;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --shadow: 0 18px 44px rgba(22, 31, 49, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(245, 158, 11, 0.045) 1px, transparent 1px),
    #ffffff;
  background-size: 54px 54px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.language-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.language-switcher a {
  min-width: 34px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a.active {
  outline: 0;
  color: var(--ink);
  background: #eef4ff;
}

.gateway {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 18px 48px;
}

.search-stage {
  position: relative;
  width: min(860px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
}

.logo-wrap {
  width: 440px;
  margin-right: auto;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.search-box {
  width: min(780px, 100%);
  min-height: 50px;
  display: flex;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 226px) 74px;
  align-items: center;
  gap: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 32px rgba(17, 24, 39, 0.08);
}

.search-box:focus-within {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.13);
}

#searchInput {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
}

#searchInput::placeholder {
  color: #8a94a6;
}

.country-trigger {
  min-width: 220px;
  height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #c3d3f7;
  border-radius: 4px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--soft);
}

.country-trigger:hover,
.country-trigger:focus-visible {
  border-color: rgba(37, 99, 235, 0.32);
  outline: 0;
}

.country-flag {
  width: 28px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 2px;
  background-color: #eef2f7;
  background-image: var(--flag-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.13);
}

.country-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-2px) rotate(45deg);
}

.search-submit {
  height: 48px;
  border: 0;
  border-radius: 4px;
  padding: 0 18px;
  color: #fff;
  background: #8a5bf4;
  font-weight: 750;
  width: min-content;
    min-width: 110px;
}

.search-submit:hover,
.search-submit:focus-visible {
  background: var(--blue-dark);
  outline: 0;
}

.country-popover {
  z-index: 10;
  width: min(640px, calc(100vw - 32px));
  max-height: min(430px, calc(100vh - 190px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.country-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #eef1f6;
}

.country-filter {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline: 0;
}

.country-filter:focus {
  border-color: var(--blue);
}

.country-close {
  width: 38px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.country-list {
  max-height: 336px;
  overflow: auto;
  padding: 6px;
}

.country-option {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.country-option:hover,
.country-option:focus-visible,
.country-option.active {
  outline: 0;
  background: #eef4ff;
}

.country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.country-hint {
  min-height: 26px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.country-hint a {
  color: #346fd2;
  font-weight: 750;
  text-decoration: none;
}

.country-hint a:hover {
  text-decoration: underline;
}

.quick-countries {
  width: min(680px, 100%);
  min-height: 42px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-country {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 10px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 721px) {
  .search-box {
    position: absolute;
    top: 50px;
    right: -25px;
  }
}

.quick-country .country-flag {
  width: 24px;
  height: 17px;
}

.quick-country:hover,
.quick-country:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  outline: 0;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .gateway {
    align-items: start;
    padding-top: 46px;
  }

  .search-stage {
    gap: 16px;
  }

  .logo-wrap {
    width: min(520px, 98vw);
  }

  .search-box {
    position: static;
    grid-template-columns: minmax(0, 1fr) 76px;
    grid-template-areas:
      "input input"
      "country go";
    border-radius: 24px;
    padding: 8px;
  }

  #searchInput {
    grid-area: input;
    height: 46px;
  }

  .country-trigger {
    grid-area: country;
  }

  .search-submit {
    grid-area: go;
  }

}
