/* Arti Nama — Pustaka Nama Bayi & Arti Nama.
   Mobile-first: dirancang untuk layar HP sempit dulu, baru diperlebar.
   Tema terang saja. Tanpa gerakan, tanpa transisi, halaman langsung terbuka
   saat tautan diklik seperti situs biasa. Tanpa tabel: semua daftar memakai
   kartu dan baris yang menumpuk, supaya tidak ada scroll horizontal di HP. */
:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #475569;
  --faint: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --soft: #eff6ff;
  --warn-bg: #fffbeb;
  --warn-line: #fcd34d;
  --warn-ink: #92400e;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --maxw: 920px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
::selection { background: #dbeafe; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header + navigasi */
.site-header { border-bottom: 1px solid var(--line); background: var(--card); }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 16px 8px; }
.brand {
  font-size: 21px; font-weight: 800; color: var(--ink);
  text-decoration: none; letter-spacing: -0.02em; line-height: 1.25;
  display: inline-block; min-height: 44px; padding-top: 8px;
}
.brand span { color: var(--brand); }
.brand:hover { color: var(--ink); }
.site-nav { margin-top: 2px; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2px 4px;
}
.site-nav a {
  display: inline-block; padding: 10px 11px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
  border-radius: 10px; border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--brand-dark); background: var(--soft); }
.site-nav a[aria-current="page"] {
  color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 800;
}

/* Layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 44px; }
main.narrow { max-width: 760px; }
h1 { font-size: 27px; line-height: 1.25; margin: 8px 0 8px; letter-spacing: -0.015em; overflow-wrap: break-word; }
h2 { font-size: 20px; line-height: 1.3; margin: 30px 0 8px; letter-spacing: -0.01em; overflow-wrap: break-word; }
h3 { font-size: 17px; margin: 20px 0 6px; }
p { margin: 8px 0; overflow-wrap: break-word; }
.lede { color: var(--muted); font-size: 17px; margin-top: 0; max-width: 62ch; }
.small { font-size: 14px; color: var(--muted); }
.prose { max-width: 68ch; }
.prose li { margin: 4px 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center;
}
.breadcrumb li { min-height: 24px; overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "\203A"; margin-right: 4px; color: var(--faint); }
.breadcrumb li:last-child { color: var(--ink); font-weight: 600; }

/* Strip statistik */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 6px; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  padding: 13px 14px; text-align: center; min-width: 0;
}
.stat b { display: block; font-size: 24px; letter-spacing: -0.02em; color: var(--brand-dark); }
.stat span { font-size: 13px; color: var(--muted); }

/* Kotak pencarian + filter */
.searchbox {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  padding: 16px; margin: 16px 0 8px;
}
.searchbox label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.searchbox input[type="search"], .searchbox select {
  width: 100%; min-height: 48px; padding: 11px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.searchbox input[type="search"] { margin-bottom: 12px; }
.filters { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
.filters .field { min-width: 0; }
.checkline { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 600; }
.checkline input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); }
.result-count { font-size: 14px; color: var(--muted); margin: 10px 2px 0; }
.empty-note {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 16px; margin: 12px 0; background: var(--card); color: var(--muted);
}

/* Kartu nama */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.name-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  padding: 14px 16px; min-width: 0;
}
.name-card h3 { margin: 0 0 4px; font-size: 18px; overflow-wrap: break-word; }
.name-card h3 a { color: var(--ink); text-decoration: none; }
.name-card h3 a:hover { color: var(--brand-dark); text-decoration: underline; }
.name-card .arti { margin: 0 0 8px; color: var(--ink); }
.name-card .meta { margin: 0; font-size: 13px; color: var(--muted); }
.name-card .alasan { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 999px; vertical-align: middle;
  background: var(--soft); color: var(--brand-dark); border: 1px solid #bfdbfe;
  margin-left: 6px; white-space: nowrap;
}

/* Halaman nama: arti + fakta */
.arti-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  padding: 16px; margin: 14px 0;
}
.arti-box .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 4px; }
.arti-box .arti { font-size: 19px; line-height: 1.5; margin: 0; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts > div { padding: 12px 16px; border-top: 1px solid var(--line); min-width: 0; }
.facts > div:first-child { border-top: 0; }
@media (min-width: 560px) {
  .facts > div:nth-child(2) { border-top: 0; }
  .facts > div:nth-child(2n) { border-left: 1px solid var(--line); }
}
.facts b { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.facts span { overflow-wrap: break-word; }
.note-box {
  border: 1px solid var(--warn-line); border-radius: var(--radius);
  background: var(--warn-bg); color: var(--warn-ink);
  padding: 14px 16px; margin: 14px 0;
}
.note-box p { margin: 4px 0; }
.gloss {
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 10px; background: var(--card);
  padding: 12px 16px; margin: 14px 0;
}
.gloss b { display: block; margin-bottom: 4px; }
.sources { font-size: 14px; color: var(--muted); }
.sources li { margin: 4px 0; overflow-wrap: break-word; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin: 26px 0 0; }
.pager a {
  display: inline-block; padding: 10px 14px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  text-decoration: none; font-weight: 600; color: var(--ink);
}
.pager a:hover { color: var(--brand-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block; padding: 8px 13px; min-height: 44px; line-height: 1.5;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px;
}
.chips a:hover { color: var(--brand-dark); border-color: var(--brand); }
.chips .n { color: var(--muted); font-weight: 400; }

/* Daftar Asmaul Husna: baris menumpuk, Arab rata kanan */
.husna { list-style: none; margin: 12px 0; padding: 0; }
.husna li {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  padding: 13px 16px; margin: 0 0 10px; min-width: 0;
}
.husna .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.husna .no { font-size: 13px; color: var(--faint); font-weight: 700; flex: none; }
.husna .latin { font-size: 18px; font-weight: 700; overflow-wrap: break-word; }
.husna .arab { font-size: 24px; line-height: 1.7; text-align: right; flex: none; }
.husna .arti { margin: 6px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 30px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.site-footer nav a { font-weight: 600; min-height: 44px; display: inline-block; padding-top: 10px; }
.site-footer p { margin: 6px 0; }
