/* Muslim Husband — design system (aniconic, halal, modern) */
:root {
  --emerald-900: #064E3B;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --amber: #B45309;
  --stone-50:  #FAFAF9;
  --stone-100: #F5F5F4;
  --stone-200: #E7E5E4;
  --stone-300: #D6D3D1;
  --stone-500: #78716C;
  --stone-700: #44403C;
  --stone-900: #1C1917;

  --bg: var(--stone-50);
  --surface: #ffffff;
  --surface-2: var(--stone-100);
  --text: var(--stone-900);
  --muted: var(--stone-500);
  --border: var(--stone-200);
  --accent: var(--emerald-700);
  --accent-ink: var(--emerald-900);
  --hadith-bg: #F1F7F4;
  --hadith-border: #CFE6DC;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --maxw: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--stone-900);
    --surface: #26211e;
    --surface-2: #2f2926;
    --text: #ece9e6;
    --muted: #a8a29e;
    --border: #3a3330;
    --accent: #34d399;
    --accent-ink: #6ee7b7;
    --hadith-bg: #14241d;
    --hadith-border: #1f3a2e;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--accent-ink); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 18px; font-size: 0.95rem; }
.nav-links a { color: var(--muted); }

.hero { padding: 44px 0 12px; text-align: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; color: var(--accent-ink); }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; }

.search { margin: 22px auto; max-width: 560px; }
.search input {
  width: 100%; padding: 13px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1rem;
}
.search input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.pillar { margin: 38px 0 10px; }
.pillar h2 {
  font-family: var(--serif); font-size: 1.1rem; color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.tile {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); border-color: var(--accent); }
.tile h3 { font-family: var(--serif); margin: 0 0 6px; font-size: 1.15rem; color: var(--text); }
.tile p { margin: 0 0 14px; color: var(--muted); font-size: 0.93rem; }
.tile .meta { display: flex; gap: 14px; font-size: 0.8rem; color: var(--muted); }
.tile .meta b { color: var(--accent); font-weight: 600; }

.crumbs { font-size: 0.85rem; color: var(--muted); padding: 20px 0 4px; }
.crumbs a { color: var(--muted); }

.behavior-head h1 { font-family: var(--serif); font-size: clamp(1.6rem,3.4vw,2.2rem); color: var(--accent-ink); margin: 6px 0 8px; }
.behavior-head .definition { font-size: 1.1rem; color: var(--text); max-width: 640px; }

.section-label {
  display: flex; align-items: center; gap: 10px; margin: 34px 0 14px;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.advice-list { display: grid; gap: 10px; }
.advice {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--stone-300); border-radius: 10px; padding: 13px 16px;
  font-size: 0.97rem;
}

.hadith-list { display: grid; gap: 14px; }
.hadith-card {
  display: block; background: var(--hadith-bg); border: 1px solid var(--hadith-border);
  border-radius: var(--radius); padding: 18px 20px;
}
.hadith-card:hover { text-decoration: none; border-color: var(--accent); }
.hadith-card .ref { font-size: 0.8rem; color: var(--accent); font-weight: 600; letter-spacing: 0.02em; }
.hadith-card .quote { font-family: var(--serif); font-size: 1.08rem; margin: 8px 0 0; color: var(--text); }
.hadith-card .go { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

.source-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between;
}
.source-block .ref { font-weight: 600; color: var(--accent-ink); }
.source-block .ext { font-size: 0.85rem; }
.scripture {
  font-family: var(--serif); font-size: 1.18rem; line-height: 1.8;
  background: var(--hadith-bg); border: 1px solid var(--hadith-border);
  border-radius: var(--radius); padding: 22px 24px; margin: 16px 0;
}
.scripture.clamped .full { display: none; }
.scripture:not(.clamped) .preview { display: none; }
.scripture .more-btn {
  display: inline-block; margin-top: 10px; font-family: var(--sans); font-size: 0.85rem;
  color: var(--accent); cursor: pointer; background: none; border: none; padding: 0;
}

.behaviors-here h2 { font-family: var(--serif); font-size: 1.15rem; margin: 26px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 0.88rem; cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.link:hover { border-color: var(--accent); text-decoration: none; }

.evidence {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-top: 6px;
}
.evidence .lens { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.evidence .key-quote { font-family: var(--serif); font-size: 1.1rem; margin: 8px 0; }
.evidence .definition { color: var(--muted); font-size: 0.95rem; }
.evidence .other { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 10px; }
.pager a, .pager span {
  flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 0.9rem; color: var(--text);
}
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager .next { text-align: right; }
.pager .disabled { opacity: 0.4; }

.results { display: grid; gap: 10px; margin-top: 16px; }
.empty-note {
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 18px 20px; color: var(--muted); font-size: 0.95rem;
}

footer.site-footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 26px 0; color: var(--muted); font-size: 0.85rem; text-align: center; }

/* Share bar */
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 34px 0 4px; padding-top: 20px; border-top: 1px solid var(--border); }
.share .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 2px; }
.share a, .share button.copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; padding: 0;
}
.share a:hover, .share button.copy:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.share svg { width: 18px; height: 18px; fill: currentColor; }
.share .copied { color: var(--accent); font-size: 0.78rem; padding: 0 8px; white-space: nowrap; }

.hidden { display: none !important; }
