/* names.ai-ministries.com — library / reference aesthetic */

:root {
  --ink:        #1d2a35;
  --ink-soft:   #4a5a6a;
  --paper:      #fbf7ee;
  --paper-2:    #f3ecdb;
  --rule:       #d9cfb8;
  --accent:     #8a3c2e;     /* book-spine red */
  --accent-2:   #c0644d;
  --shade:      #e9e0c8;
  --good:       #2f6b3a;
  --warn:       #7a5a1a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Iowan Old Style', 'Georgia', 'Cambria', serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
kbd {
  background: var(--shade); padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, 'Consolas', monospace; font-size: 0.85em;
}

/* ----- top bar ----- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); }
.brand-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--paper);
  border-radius: 6px;
  font-family: 'Iowan Old Style', Georgia, serif;
  font-weight: 700; font-size: 20px;
}
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--paper); opacity: 0.85; font-size: 14px; }
.topbar nav a:hover { opacity: 1; text-decoration: underline; }

/* ----- main ----- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
section { margin-bottom: 56px; }
h1 {
  font-size: 38px; line-height: 1.15; margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 24px; margin: 0 0 12px;
  border-bottom: 1px solid var(--rule); padding-bottom: 6px;
}
h3 { font-size: 18px; margin: 18px 0 6px; }
.kick { color: var(--ink-soft); margin: 0 0 18px; }

/* ----- search ----- */
.hero { padding-top: 12px; }
.search-form {
  display: flex; gap: 8px;
  margin-top: 18px;
}
.search-form input {
  flex: 1;
  font: inherit; font-size: 20px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 6px;
}
.search-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(138, 60, 46, 0.15);
}
.search-form button {
  font: inherit; font-size: 16px;
  padding: 0 22px;
  background: var(--accent); color: var(--paper);
  border: 0; border-radius: 6px;
  cursor: pointer;
}
.search-form button:hover { background: var(--accent-2); }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

.results {
  list-style: none; padding: 0; margin: 14px 0 0;
  background: #fff; border: 1px solid var(--rule); border-radius: 6px;
  max-height: 360px; overflow: auto;
}
.results li {
  padding: 10px 14px; border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.results li:last-child { border-bottom: 0; }
.results li:hover { background: var(--paper-2); }
.result-name { font-weight: 700; }
.result-gender { font-size: 12px; color: var(--ink-soft); margin-left: 8px; }
.result-summary { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }

/* ----- name detail ----- */
.detail { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 28px; }
.detail .name-title {
  font-size: 44px; margin: 0 0 4px; letter-spacing: -0.01em;
}
.detail .name-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  color: var(--ink-soft); font-size: 14px; margin-bottom: 14px;
}
.gender-pill {
  display: inline-block;
  padding: 2px 8px; border-radius: 999px;
  background: var(--shade); color: var(--ink);
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.detail .summary { font-size: 18px; color: var(--ink); margin: 0 0 22px; }

.section-block { margin: 24px 0; }
.section-block h3 {
  font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 8px;
}
.fact {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.fact:last-child { border-bottom: 0; }
.fact .fact-main { display: flex; align-items: baseline; gap: 8px; }
.fact .lang { font-weight: 700; min-width: 100px; }
.fact .meaning { flex: 1; }
.fact .notes { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.cite {
  font-size: 12px; color: var(--ink-soft);
  margin-top: 4px;
}
.cite a { color: var(--ink-soft); text-decoration: underline; }
.confidence {
  display: inline-block;
  padding: 1px 6px; border-radius: 4px;
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  margin-left: 6px;
}
.confidence-attested      { background: #e2eee0; color: var(--good); }
.confidence-reconstructed { background: #fde9c5; color: var(--warn); }
.confidence-disputed      { background: #f6d8d2; color: var(--accent); }

.variants-grid {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.variant-card {
  border: 1px solid var(--rule); border-radius: 4px;
  padding: 6px 10px;
  background: var(--paper);
  font-size: 14px;
}
.variant-kind { color: var(--ink-soft); font-size: 11px; margin-left: 4px; text-transform: uppercase; }

/* ----- miss / submit ----- */
.miss {
  background: var(--paper-2); border: 1px dashed var(--rule); border-radius: 8px;
  padding: 22px;
}
.submit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.submit-form input {
  font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px;
  background: #fff;
}
.submit-form button {
  align-self: flex-start;
  font: inherit; padding: 8px 18px;
  background: var(--accent); color: var(--paper);
  border: 0; border-radius: 6px; cursor: pointer;
}
.submit-form button:hover { background: var(--accent-2); }
.status { font-size: 14px; margin: 0; }
.status.ok { color: var(--good); }
.status.err { color: var(--accent); }

/* ----- wanted list ----- */
.wanted-list { padding-left: 20px; }
.wanted-list li { margin: 4px 0; }
.wanted-list .hits { color: var(--ink-soft); font-size: 13px; margin-left: 8px; }

/* ----- sources ----- */
.sources-list { padding-left: 20px; }
.sources-list li { margin: 6px 0; }
.sources-list .lic { color: var(--ink-soft); font-size: 13px; margin-left: 6px; }

/* ----- about ----- */
.about ul { padding-left: 20px; }
.about li { margin: 6px 0; }

/* ----- footer ----- */
.footer {
  border-top: 1px solid var(--rule);
  text-align: center;
  padding: 24px 16px 40px;
  background: var(--paper-2);
}
.seal-link {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 700;
  opacity: 0.92; transition: opacity 0.15s;
}
.seal-link:hover { opacity: 1; text-decoration: none; }
.seal-link img { width: 180px; max-width: 80%; height: auto; }
.foot-meta { color: var(--ink-soft); font-size: 13px; margin-top: 10px; }

/* ----- responsive ----- */
@media (max-width: 600px) {
  .topbar { padding: 10px 16px; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: 13px; }
  main { padding: 24px 16px 60px; }
  h1 { font-size: 28px; }
  .detail .name-title { font-size: 32px; }
  .search-form { flex-direction: column; }
  .search-form button { padding: 14px; }
}
