:root {
  --bg: #f7f4ed;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --green: #0f766e;
  --green-dark: #115e59;
  --gold: #d6a84f;
  --line: #e5dfd3;
  --soft: #eef7f5;
  --shadow: 0 20px 60px rgba(31, 41, 51, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(247, 244, 237, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 223, 211, 0.75);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--green); color: white;
  box-shadow: var(--shadow);
}
.nav { display: flex; gap: 22px; color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--green); }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 78vh;
  padding: clamp(50px, 8vw, 100px) clamp(18px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(2.6rem, 6vw, 5.7rem);
  line-height: .95;
  letter-spacing: -0.07em;
  max-width: 860px;
  margin-bottom: 22px;
}
.hero-text { font-size: 1.22rem; line-height: 1.7; color: var(--muted); max-width: 650px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn, button {
  border: 0; border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  cursor: pointer;
}
.btn.primary, button { background: var(--green); color: white; }
.btn.primary:hover, button:hover { background: var(--green-dark); }
.btn.secondary { background: white; color: var(--green); border: 1px solid var(--line); }

.hero-card {
  background: linear-gradient(145deg, #ffffff, #eef7f5);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(28px, 5vw, 46px);
  box-shadow: var(--shadow);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tag { align-self: flex-start; background: #fff7df; color: #946200; padding: 8px 13px; border-radius: 999px; font-weight: 800; margin-bottom: 18px; }
.hero-card h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.05em; }
.hero-card p { color: var(--muted); line-height: 1.7; font-size: 1.08rem; }
.mini-answer { margin-top: 18px; padding: 18px; background: white; border-radius: 20px; border-left: 5px solid var(--gold); line-height: 1.65; }
.mini-answer span { display: block; color: var(--muted); }

.search-panel, .section, .reflection, .disclaimer {
  margin: 0 clamp(18px, 5vw, 72px) 34px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 34px;
}
.search-panel { background: var(--card); box-shadow: var(--shadow); }
.search-panel h2, .section h2, .reflection h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.045em; }
.search-panel p { color: var(--muted); line-height: 1.7; }
.ask-box { display: flex; gap: 12px; margin-top: 20px; }
.ask-box input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 16px 18px; font-size: 1rem; }
.ask-result { margin-top: 16px; font-weight: 700; color: var(--green) !important; }

.section { background: transparent; }
.section.soft { background: var(--soft); }
.section-head { max-width: 760px; margin-bottom: 26px; }
.section-head h2 { margin-bottom: 0; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 24px; border-radius: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }

.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.category-grid span, .category-grid a { background: white; border: 1px solid var(--line); border-radius: 999px; padding: 14px 16px; font-weight: 800; text-align: center; color: var(--green-dark); }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.timeline div { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; }
.timeline strong { font-size: 1.4rem; color: var(--green); }
.timeline p { color: var(--muted); line-height: 1.6; margin: 12px 0 0; }

.reflection { background: var(--green); color: white; text-align: center; }
.reflection .eyebrow { color: #bff4ee; }
.reflection p:last-child { color: #d7fffb; max-width: 760px; margin: 0 auto; line-height: 1.7; }
.disclaimer { background: #fff7df; border: 1px solid #ead39c; }
.disclaimer h2 { margin-bottom: 10px; }
.disclaimer p { color: #6d5520; line-height: 1.7; margin-bottom: 0; }
footer { text-align: center; color: var(--muted); padding: 30px 18px 50px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .cards-grid, .category-grid, .timeline { grid-template-columns: 1fr; }
  .ask-box { flex-direction: column; }
  .ask-box input, button { width: 100%; }
}

/* Situation page */
.situation-hero {
  padding: clamp(42px, 7vw, 84px) clamp(18px, 5vw, 72px) 28px;
}
.situation-hero h1 {
  max-width: 980px;
  margin-bottom: 16px;
}
.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--green);
  font-weight: 800;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.meta-row span {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--green-dark);
  font-weight: 800;
}
.situation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin: 0 clamp(18px, 5vw, 72px) 34px;
  align-items: start;
}
.main-answer, .side-panel {
  display: grid;
  gap: 18px;
}
.answer-box, .side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 10px 35px rgba(31, 41, 51, 0.06);
}
.answer-box.highlight {
  background: linear-gradient(145deg, #ffffff, #eef7f5);
  border-left: 6px solid var(--green);
}
.answer-box h2 { font-size: clamp(1.45rem, 3vw, 2.3rem); letter-spacing: -0.035em; }
.answer-box p, .side-card p, .steps-list { color: var(--muted); line-height: 1.75; }
.steps-list { padding-left: 22px; margin-bottom: 0; }
.steps-list li { margin-bottom: 10px; }
blockquote {
  margin: 0;
  padding: 22px;
  border-radius: 22px;
  background: #fff7df;
  border-left: 5px solid var(--gold);
  font-size: 1.12rem;
  line-height: 1.7;
  font-weight: 700;
}
.side-panel {
  position: sticky;
  top: 96px;
}
.side-card h3 { margin-bottom: 10px; }
.side-card a {
  display: block;
  color: var(--green);
  font-weight: 800;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.card-link { display: block; }
@media (max-width: 900px) {
  .situation-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}


/* Category page */
.category-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 clamp(18px, 5vw, 72px) 34px;
}
.category-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 10px 35px rgba(31, 41, 51, 0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.category-card span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--green);
  font-weight: 900;
  margin-bottom: 18px;
}
.category-card h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.category-card p {
  color: var(--muted);
  line-height: 1.7;
}
.category-card strong {
  color: var(--green);
}
.category-note { margin-top: 20px; }
@media (max-width: 900px) {
  .category-page-grid { grid-template-columns: 1fr; }
}

/* Journey page */
.journey-hero { padding-bottom: 18px; }
.journey-map {
  display: grid;
  gap: 22px;
  margin: 0 clamp(18px, 5vw, 72px) 34px;
}
.journey-stage {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(24px, 5vw, 46px);
  box-shadow: 0 10px 35px rgba(31, 41, 51, 0.06);
}
.stage-number {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
}
.journey-stage h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.045em;
  margin-bottom: 12px;
}
.journey-stage p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 900px;
}
.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.stage-grid div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.stage-grid strong {
  display: block;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.stage-grid span {
  color: var(--muted);
  line-height: 1.55;
}
.journey-actions { margin-top: 0; }
.journey-home-link { margin-top: 24px; }
@media (max-width: 900px) {
  .journey-stage { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
}


/* AI Assistant page */
.assistant-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  margin: 0 clamp(18px, 5vw, 72px) 34px;
  align-items: start;
}
.assistant-box, .assistant-response, .reflection-card, .journal-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 10px 35px rgba(31, 41, 51, 0.06);
}
.assistant-box textarea, .journal-section textarea {
  width: 100%;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  font: inherit;
  line-height: 1.6;
  margin: 12px 0 16px;
  resize: vertical;
}
.small-note, .quran-note { color: var(--muted); line-height: 1.7; margin-top: 16px; }
.response-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.response-grid div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.response-grid strong { display: block; color: var(--green-dark); margin-bottom: 8px; }
.response-grid span { color: var(--muted); line-height: 1.6; }

/* Reflection page */
.reflection-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  margin: 0 clamp(18px, 5vw, 72px) 34px;
  align-items: start;
}
.reflection-card.big {
  background: linear-gradient(145deg, #ffffff, #eef7f5);
  border-left: 6px solid var(--green);
}
.reflection-card h2, .journal-section h2 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}
.reflection-card p { color: var(--muted); line-height: 1.75; }
.reflection-card label {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}
.reflection-card input { margin-right: 10px; }
.journal-section {
  margin: 0 clamp(18px, 5vw, 72px) 34px;
}
@media (max-width: 900px) {
  .assistant-layout, .reflection-layout, .response-grid { grid-template-columns: 1fr; }
}
.ai-feedback-box {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fbfa;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.ai-feedback-box h3 {
  margin: 0 0 6px;
  color: var(--green-dark);
}

.ai-feedback-box p {
  margin: 0;
  color: var(--muted);
}

.ai-feedback-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.danger-btn {
  background: white !important;
  color: #b42318 !important;
  border: 1px solid #f04438 !important;
}

.ai-next-step {
  margin-top: 20px;
  text-align: center;
}

.ai-next-step p {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}
.sources-card {
  margin-top: 24px;
  padding: 20px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.sources-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--green-dark);
}

.source-item {
  margin-bottom: 14px;
}

.source-item strong {
  display: block;
  color: var(--green);
  margin-bottom: 4px;
}

.source-item p {
  margin: 0;
  color: var(--text);
}
.logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.site-footer {
  margin-top: 80px;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 8px 0;
}

.footer-note {
  font-size: 0.85rem;
  color: #9ca3af;
}