:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe2ee;
  --bg: #f7f9fc;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
}

.brand {
  color: var(--blue);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.home {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.search-panel {
  width: min(720px, 100%);
  text-align: center;
}

.search-panel .brand {
  display: block;
  margin-bottom: 26px;
  font-size: clamp(48px, 10vw, 82px);
}

.search-form {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--white);
  font-size: 17px;
  outline: none;
  box-shadow: 0 8px 24px rgba(25, 39, 68, 0.08);
}

.search-input:focus {
  border-color: var(--blue);
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
}

.button:hover {
  background: var(--blue-dark);
}

.button.secondary {
  background: #e8eefc;
  color: var(--blue-dark);
}

.suggestions {
  position: absolute;
  top: 58px;
  left: 0;
  right: 104px;
  z-index: 10;
  display: none;
  margin: 0;
  padding: 6px 0;
  text-align: left;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(25, 39, 68, 0.14);
  overflow: hidden;
}

.suggestions li {
  padding: 12px 16px;
  cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
  background: #edf4ff;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.result-search {
  max-width: 760px;
  margin-bottom: 22px;
}

.summary {
  margin: 18px 0 22px;
  color: var(--muted);
}

.result {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-url {
  display: block;
  margin-bottom: 4px;
  color: #16803a;
  font-size: 14px;
}

.result h2 {
  margin: 0 0 7px;
  font-size: 21px;
  font-weight: 500;
}

.result p {
  max-width: 760px;
  margin: 0;
  color: #445164;
  line-height: 1.55;
}

.card {
  max-width: 680px;
  margin: 24px auto;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.grid {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.message {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #eaf7ee;
  color: #176a34;
}

.error {
  background: #fff1f1;
  color: #a11d1d;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-form {
    flex-direction: column;
  }

  .suggestions {
    right: 0;
  }
}
