:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #151515;
  background: #f7f7f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.container {
  width: min(900px, calc(100% - 40px));
  margin: 72px auto;
}

header {
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #666;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.intro {
  max-width: 680px;
  color: #565656;
  line-height: 1.6;
}

.search-form {
  padding: 24px;
  border: 1px solid #deded9;
  border-radius: 14px;
  background: #fff;
}

.search-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 650;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #cfcfc9;
  border-radius: 9px;
  outline: none;
}

input:focus {
  border-color: #151515;
}

button {
  padding: 13px 18px;
  border: 1px solid #151515;
  border-radius: 9px;
  background: #151515;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button.secondary {
  background: transparent;
  color: #151515;
}

.status {
  min-height: 24px;
  margin: 18px 0;
  color: #666;
}

.status.error {
  color: #9d1c1c;
}

.results-section {
  padding-top: 14px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.results-header h2 {
  margin-bottom: 0;
}

.results-list {
  margin: 0;
  padding-left: 28px;
}

.result {
  padding: 18px 0 20px;
  border-bottom: 1px solid #deded9;
}

.result-title {
  display: inline-block;
  margin-bottom: 6px;
  color: #151515;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
}

.result-title:hover {
  text-decoration: underline;
}

.result-url {
  margin-bottom: 7px;
  color: #4f6b4f;
  font-size: 0.88rem;
  word-break: break-all;
}

.result-description {
  margin-bottom: 0;
  color: #555;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .container {
    margin: 42px auto;
  }

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

  .results-header {
    align-items: stretch;
    flex-direction: column;
  }
}
