*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #243447;
  --muted: #5b6b7c;
  --white: #ffffff;
  --blue: #1e5ab4;
  --blue-deep: #163f7a;
  --soft: #eef3f9;
  --panel: #ffffff;
  --panel-hover: #f4f8fd;
  --line: rgba(36, 52, 71, 0.12);
  --bar: rgba(255, 255, 255, 0.88);
  --font: "Alan Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
  --ease: 0.2s ease;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 480px at 8% -12%, rgba(30, 90, 180, 0.12), transparent 58%),
    radial-gradient(900px 420px at 96% 108%, rgba(242, 163, 58, 0.1), transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, #e8eef6 48%, #f3f6fb 100%);
  background-attachment: fixed;
  line-height: 1.45;
}

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

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-bar-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  min-height: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.weather {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.page {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.search-section {
  max-width: 42rem;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 30;
  animation: rise 0.5s ease both;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 10px 28px -22px rgba(30, 50, 90, 0.45);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.search-box:focus-within {
  border-color: rgba(30, 90, 180, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 90, 180, 0.12), 0 10px 28px -22px rgba(30, 50, 90, 0.45);
}

.search-google {
  width: 1.15rem;
  height: 1.15rem;
}

.search-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
  min-width: 0;
}

.search-input::placeholder {
  color: #8a97a6;
}

.search-button {
  border: 0;
  border-radius: 0.45rem;
  padding: 0.7rem 1.05rem;
  font: inherit;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  cursor: pointer;
  transition: background var(--ease);
}

.search-button:hover,
.search-button:focus-visible {
  background: var(--blue-deep);
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 40;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 18px 40px -18px rgba(30, 50, 90, 0.35);
  overflow: hidden;
}

.suggestion-group {
  padding: 0.45rem 0.95rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.suggestion {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.95rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(36, 52, 71, 0.06);
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion:focus-visible,
.suggestion.is-active {
  background: var(--soft);
  outline: none;
}

.suggestion-name {
  font-weight: 700;
  color: var(--ink);
}

.suggestion-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  animation: rise 0.7s ease both;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.section-heading h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-summary {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.75rem;
  animation: rise 0.8s ease both;
}

.system-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.6rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.65rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px -22px rgba(30, 50, 90, 0.45);
  transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.system-card:hover,
.system-card:focus-visible {
  background: var(--panel-hover);
  border-color: rgba(30, 90, 180, 0.35);
  box-shadow: 0 14px 28px -20px rgba(30, 50, 90, 0.4);
  transform: translateY(-2px);
  outline: none;
}

.system-icon {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.45rem;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.system-icon img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}

.system-fallback {
  font-weight: 800;
  font-size: 1rem;
  color: var(--blue);
}

.system-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.system-name {
  font-weight: 750;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--ink);
}

.system-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.foot {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .page {
    padding-top: 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-section,
  .section-heading,
  .systems-grid {
    animation: none;
  }

  .system-card:hover,
  .system-card:focus-visible {
    transform: none;
  }
}
