/* Global layout */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Arial", "Arial", serif;
  background: #f3eee4;
  color: #2b2620;
}

.homepage,
.search-page,
.admin-page {
  min-height: 100vh;
}

/* Top bar */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f3e9;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-mark {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a4b3b;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.top-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #b7a58c;
  background: #fffaf0;
  color: #4a3c2c;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.top-button:hover {
  background: #f0e3cf;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Buttons */

.primary-button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  background: #4a3c2c;
  color: #fdf7ec;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.primary-button.small {
  padding: 8px 16px;
  font-size: 13px;
}

.primary-button:hover {
  background: #3a2f22;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.secondary-button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #b7a58c;
  background: #fffaf0;
  color: #4a3c2c;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.secondary-button.small {
  padding: 6px 14px;
}

.secondary-button:hover {
  background: #f0e3cf;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Homepage */

.home-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 24px;
}

.hero-panel {
  background: #f9f3e7;
  border-radius: 16px;
  padding: 32px 32px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.site-title {
  font-size: 32px;
  margin-bottom: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a3c2c;
}

.home-description,
.home-how {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Search page layout */

.search-container {
  max-width: 980px;
  margin: 40px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
}

.card-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Index card */

.index-card {
  position: relative;
  padding: 40px 32px 32px;
  border-radius: 12px;
  background-color: #fffdf5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.12);

  background-image:
    repeating-linear-gradient(
      to bottom,
      #fffdf5,
      #fffdf5 34px,
      #d7d1c5 35px
    );
}

.card-tab {
  position: absolute;
  top: -18px;
  left: 24px;
  padding: 6px 14px;
  border-radius: 8px 8px 0 0;
  background: #d7c7ac;
  color: #3b3023;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-lines {
  margin-top: 10px;
}

.card-line {
  font-size: 18px;
  line-height: 34px;
  margin: 0;
  padding-left: 6px;
  color: #2b2620;
}

/* Admin fields on card */

.admin-fields {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  font-size: 13px;
  color: #5a4b3b;
}

/* Next button */

.next-button {
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: #4a3c2c;
  color: #fdf7ec;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.next-button:hover {
  background: #3a2f22;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

/* Search bar */

.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-bar input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #c3b49b;
  background: #fffaf0;
  font-size: 14px;
}

/* Results */

.results {
  margin-top: 8px;
  font-size: 13px;
  color: #5a4b3b;
}

/* Admin page */

.admin-container {
  max-width: 720px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

.admin-title {
  font-size: 24px;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a3c2c;
}

.admin-panel {
  background: #f9f3e7;
  border-radius: 14px;
  padding: 24px 24px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.admin-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-panel input {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid #c3b49b;
  background: #fffaf0;
  font-size: 14px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.admin-status {
  font-size: 13px;
  color: #5a4b3b;
}

/* Placeholder fade */

input:not(.has-text)::placeholder,
textarea:not(.has-text)::placeholder {
  opacity: 1;
  transition: opacity 0.2s;
}

input.has-text::placeholder,
textarea.has-text::placeholder {
  opacity: 0;
}

/* Responsive */

@media (max-width: 900px) {
  .search-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-panel,
  .admin-panel {
    padding: 20px 18px 24px;
  }

  .site-title {
    font-size: 26px;
  }

  .index-card {
    padding: 32px 22px 24px;
  }

  .card-line {
  font-size: 18px;
  line-height: 35px; /* ⭐ MATCHES THE INDEX CARD LINE SPACING */
  margin: 0;
  padding-left: 6px;
  color: #2b2620;
  }

}
