:root {
  --blue: #213f91;
  --blue-dark: #193374;
  --sky: #61c5ef;
  --ink: #202a43;
  --muted: #8b8b8b;
  --line: #e9edf4;
  --bg: #f6f9fd;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Ubuntu, Arial, Helvetica, sans-serif;
}

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

.site-header {
  padding: 3px 24px 0;
}

.topbar {
  width: min(1420px, calc(100vw - 48px));
  min-height: 68px;
  margin: 0 auto;
  padding: 12px 34px;
  display: flex;
  align-items: center;
  gap: 38px;
  color: #fff;
  background: var(--blue);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 10px rgba(25, 51, 116, .32);
}

.header-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.header-logo img {
  width: 160px;
  height: auto;
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  line-height: 1;
}

.brand-mark {
  width: 30px;
  height: 38px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(0 100%, 82% 0, 82% 100%, 52% 100%, 52% 35%, 18% 100%);
}

.brand-light {
  font-size: 44px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 12px;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.demo-button {
  padding: 13px 22px;
  color: #12336e;
  background: var(--sky);
  border-radius: 15px;
  font-size: 16px;
  font-weight: 800;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  gap: 2px;
}

.lang-button {
  min-width: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.lang-button.active {
  color: #12336e;
  background: #fff;
}

main {
  width: min(1420px, calc(100vw - 48px));
  margin: 0 auto;
}

.hero {
  min-height: 440px;
  padding: 82px 0 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow,
.muted {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #1d326e;
  font-size: clamp(48px, 7vw, 92px);
  line-height: .95;
  letter-spacing: 0;
}

.lead {
  max-width: 780px;
  margin: 24px auto 0;
  color: #596174;
  font-size: 22px;
  line-height: 1.45;
}

.search-panel {
  width: min(980px, 100%);
  margin-top: 44px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 62px rgba(33, 63, 145, .14);
  text-align: left;
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 62px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  overflow: hidden;
}

.search-row input {
  width: 100%;
  min-width: 0;
  padding: 22px 22px;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 24px;
}

.search-row button {
  border: 0;
  color: var(--blue);
  background: #eef6ff;
  font-size: 30px;
  cursor: pointer;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.quick-tags button {
  padding: 12px 16px;
  border: 1px solid #d6deeb;
  color: #394867;
  background: #f7f9fc;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.results-wrap {
  padding: 18px 0 80px;
}

.results-head {
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.results-head h2 {
  margin: 0;
  color: #3d3d3d;
  font-size: 36px;
  letter-spacing: 0;
}

.source-note {
  color: var(--muted);
  font-size: 16px;
}

.empty-state {
  margin: 28px 0;
  padding: 34px;
  color: #7a8191;
  background: var(--bg);
  border: 1px dashed #d2dbe9;
  border-radius: 8px;
  font-size: 18px;
}

.results {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.result-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.code {
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
}

.result-card h3 {
  margin: 0 0 8px;
  color: #343434;
  font-size: 20px;
  line-height: 1.3;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.meta span {
  padding: 5px 8px;
  background: #f3f5f8;
  border-radius: 6px;
}

.copy-button {
  padding: 13px 18px;
  border: 0;
  color: #12336e;
  background: var(--sky);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.site-footer {
  padding: 40px 48px 24px;
  color: #8c8c8c;
  background: #fff;
  border-right: 10px solid var(--sky);
}

.footer-grid {
  width: min(1420px, 100%);
  min-height: 420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.1fr 1.2fr;
  gap: 64px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
}

.footer-logo img {
  width: 320px;
  height: auto;
  display: block;
  filter: brightness(0);
  opacity: .46;
}

.footer-brand p,
.footer-grid p {
  margin: 8px 0 26px;
  font-size: 18px;
  line-height: 1.45;
}

.socials {
  display: flex;
  gap: 10px;
  margin: 36px 0 24px;
}

.socials a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #8c8c8c;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.ai-link {
  color: #4c68bc;
}

.footer-grid h3 {
  margin: 0 0 22px;
  color: #555;
  font-size: 26px;
  line-height: 1.2;
}

.footer-grid a {
  display: block;
  margin-bottom: 18px;
  font-size: 19px;
  line-height: 1.35;
}

.footer-bottom {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  color: #999;
  font-size: 16px;
}

.to-top {
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

mark {
  color: inherit;
  background: #dff3ff;
  border-radius: 4px;
}

@media (max-width: 1050px) {
  .topbar {
    flex-wrap: wrap;
    gap: 18px 28px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 0;
  }

  .topbar,
  main {
    width: 100%;
  }

  .topbar {
    padding: 16px;
    border-radius: 0 0 18px 18px;
  }

  .brand-light {
    font-size: 34px;
  }

  .header-logo img {
    width: 132px;
  }

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

  main {
    padding: 0 16px;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .lead {
    font-size: 18px;
  }

  .search-panel {
    padding: 18px;
  }

  .search-panel label {
    font-size: 18px;
  }

  .search-row {
    grid-template-columns: 1fr 50px;
  }

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

  .results-head {
    display: block;
  }

  .source-note {
    margin-top: 12px;
  }

  .result-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .copy-button {
    width: 100%;
  }

  .site-footer {
    padding: 34px 20px 24px;
  }

  .footer-grid {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-logo img {
    width: 250px;
  }
}
