* {
  box-sizing: border-box;
}

html {
  background: #07111c;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #07111c;
  color: #f4f7fa;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

main {
  width: min(
    950px,
    calc(100% - 28px)
  );

  margin: 0 auto;
  padding: 48px 0 80px;
}

.brand {
  margin: 0 0 18px;
  color: #32c4ba;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

h1 {
  margin: 0;

  font-size:
    clamp(3rem, 9vw, 5rem);

  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.subtitle {
  margin: 18px 0 0;
  color: #a7b9c8;

  font-size:
    clamp(1rem, 3vw, 1.2rem);

  line-height: 1.5;
}

.search-panel {
  margin-top: 44px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 750;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 0 20px;

  border:
    1px solid #2a4257;

  border-radius: 16px;
  background: #0e1c29;

  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.search-box:focus-within {
  border-color: #32c4ba;
  background: #102130;
}

.search-icon {
  flex: 0 0 auto;
  color: #7ba4c6;
  font-size: 1.6rem;
}

input {
  width: 100%;
  min-width: 0;
  padding: 19px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 550;
}

input::placeholder {
  color: #728798;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #6f8799;
  font-size: 0.79rem;
}

.examples button {
  border: 0;
  padding: 0;
  background: none;
  color: #a9c3d6;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.examples button:hover {
  color: #32c4ba;
}

.results-section {
  margin-top: 54px;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
}

#result-count {
  color: #70889a;
  font-size: 0.8rem;
}

#results {
  display: grid;
  gap: 12px;
}

.result-card {
  display: block;
  padding: 22px;

  border:
    1px solid #1d3549;

  border-radius: 17px;
  background: #0c1926;
  color: inherit;
  text-decoration: none;

  transition:
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.result-card:hover {
  border-color: #37637a;
  background: #102131;
  transform: translateY(-1px);
}

.best-match {
  margin-bottom: 14px;
  color: #32c4ba;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.result-card h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.4;
}

.module-id {
  margin: 5px 0 0;
  color: #728b9e;
  font-size: 0.71rem;
}

.arrow {
  flex: 0 0 auto;
  color: #32c4ba;
  font-size: 1.8rem;
  line-height: 1;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.topics span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #13283a;
  color: #9ebbd0;
  font-size: 0.69rem;
}

.empty,
.loading {
  padding: 30px 22px;

  border:
    1px dashed #294258;

  border-radius: 16px;
  color: #9eb0bf;
}

.empty strong {
  color: #e6edf2;
}

.empty p {
  margin: 8px 0 0;
  line-height: 1.55;
}

@media (max-width: 600px) {
  main {
    width: calc(100% - 24px);
    padding-top: 34px;
  }

  .search-panel {
    margin-top: 34px;
  }

  .search-box {
    min-height: 64px;
    padding: 0 16px;
  }

  .results-section {
    margin-top: 42px;
  }

  .result-card {
    padding: 18px;
  }
}
