/* Zabihah AI website. Tokens first; no raw colours below the token blocks. */
:root {
  --bg: #FAF6EE;
  --bg-2: #F3EDE1;
  --surface: #FFFDF8;
  --ink: #15201A;
  --ink-2: #4F5A52;
  --ink-3: #6F786F;
  --hairline: #E5DECF;
  --accent: #187524;
  --accent-ink: #12601D;
  --on-accent: #FFFDF8;
  --accent-soft: rgba(24, 117, 36, 0.08);
  --accent-line: rgba(24, 117, 36, 0.22);
  --halal: #146320;
  --halal-bg: rgba(24, 117, 36, 0.10);
  --doubt: #855500;
  --doubt-bg: rgba(196, 138, 20, 0.15);
  --haram: #A12F27;
  --haram-bg: rgba(190, 60, 50, 0.11);
  --danger: #A12F27;
  --shadow: 0 1px 2px rgba(21, 32, 26, 0.04), 0 12px 32px rgba(21, 32, 26, 0.07);
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --radius-s: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C130E;
    --bg-2: #111A14;
    --surface: #151F18;
    --ink: #EEF2EC;
    --ink-2: #B2BCB2;
    --ink-3: #8F998F;
    --hairline: #26322A;
    --accent: #6BCF79;
    --accent-ink: #84DA90;
    --on-accent: #07140A;
    --accent-soft: rgba(107, 207, 121, 0.09);
    --accent-line: rgba(107, 207, 121, 0.28);
    --halal: #84DA90;
    --halal-bg: rgba(107, 207, 121, 0.13);
    --doubt: #F0C35A;
    --doubt-bg: rgba(240, 195, 90, 0.13);
    --haram: #FF8A7E;
    --haram-bg: rgba(255, 138, 126, 0.13);
    --danger: #FF8A7E;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1080px; }

/* Header and footer */
header.site {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { font: 700 21px/1 var(--display); letter-spacing: -0.01em; }
nav.site { display: flex; gap: 20px; font-size: 15px; }
nav.site a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }
nav.site a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

footer.site {
  margin: 72px 0 40px; padding-top: 22px; border-top: 1px solid var(--hairline);
  font-size: 14px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 8px 20px;
}
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 7.5vw, 56px); margin: 24px 0 14px; }
h2 { font-size: clamp(24px, 4.4vw, 30px); margin: 52px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 6px; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 6px; }
.lede { font-size: clamp(18px, 2.6vw, 20px); color: var(--ink-2); margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-3); }
.eyebrow { font: 600 15px/1 var(--sans); letter-spacing: 0; color: var(--accent-ink); margin: 32px 0 0; }

/* Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 18px 0;
}
.card > :last-child { margin-bottom: 0; }
.card.soft { background: var(--accent-soft); border-color: var(--accent-line); }
.card ul { margin: 8px 0 0; }
.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  padding: 16px 20px; margin: 20px 0;
}
.notice > :last-child { margin-bottom: 0; }
.notice strong:first-child { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 18px; }

table.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
table.facts th, table.facts td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 0; }
table.facts th { color: var(--ink-2); font-weight: 600; width: 34%; }
.scroll-x { overflow-x: auto; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 17px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.button:active { transform: scale(0.98); }
.button[disabled] { opacity: 0.45; cursor: default; }

/* Landing */
.hero { display: grid; gap: 36px; align-items: center; padding: 8px 0 12px; }
.hero h1 { margin-top: 14px; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 26px 0 10px; }
.badge-row a { display: inline-block; line-height: 0; border-radius: 10px; }
.badge-row img { height: 54px; width: auto; }
.badge-row .small { margin: 0; }

.example {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 26px;
  box-shadow: var(--shadow); padding: 22px; max-width: 420px; width: 100%; justify-self: center;
}
.example-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.example-head strong { font: 700 18px/1.2 var(--display); }
.example-head .small { margin: 2px 0 0; }
.example ul { list-style: none; padding: 0; margin: 0; }
.example li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hairline); margin: 0; }
.example li span:first-child { font-weight: 600; }
.example li em { display: block; font-style: normal; font-weight: 400; font-size: 14px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.example figcaption { margin-top: 12px; }
.chip { flex: none; display: inline-block; font: 600 13px/1 var(--sans); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.chip.halal { color: var(--halal); background: var(--halal-bg); }
.chip.doubt { color: var(--doubt); background: var(--doubt-bg); }
.chip.haram { color: var(--haram); background: var(--haram-bg); }

.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { margin: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: 12px;
  background: var(--accent-soft); color: var(--accent-ink); font: 700 15px/1 var(--display);
}
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }

.pillars { display: grid; gap: 10px 28px; margin: 18px 0 0; padding: 0; list-style: none; }
.pillars li { margin: 0; padding-left: 30px; position: relative; color: var(--ink-2); }
.pillars li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23187524' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.pillars li strong { color: var(--ink); }

/* Screenshot gallery: horizontal scroll on phones, row on wide screens. */
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 16px; margin: 18px 0 0; }
.shots img { flex: none; width: 230px; border-radius: 28px; border: 1px solid var(--hairline); scroll-snap-align: start; }

.links { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.links li { margin: 0; }
.links a {
  display: block; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-s);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.links a:hover { border-color: var(--accent-line); }
.links a strong { display: block; font-family: var(--display); }
.links a span { color: var(--ink-2); font-size: 15px; }

/* FAQ */
details { border-bottom: 1px solid var(--hairline); }
details:first-of-type { border-top: 1px solid var(--hairline); }
summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font: 600 18px/1.35 var(--display); letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details > div { padding: 0 0 18px; color: var(--ink-2); }
details > div p:last-child { margin-bottom: 0; }

/* Form */
form .field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
form label, form legend { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
input, textarea {
  width: 100%; font: 17px/1.4 var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius-s);
  padding: 13px 15px;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topics label {
  margin: 0; font: 600 15px/1 var(--sans); color: var(--ink);
  padding: 11px 15px; border-radius: 999px; background: var(--bg); border: 1px solid var(--hairline); cursor: pointer;
}
.topics input:checked + label { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.topics input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 16px 0 0; font-size: 15px; min-height: 1px; }
.status.ok { color: var(--accent-ink); }
.status.error { color: var(--danger); }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pillars { grid-template-columns: 1fr 1fr; }
  .links { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 24px 0 8px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  nav.site { gap: 14px; font-size: 14px; }
  .brand span { font-size: 19px; }
  .brand img { width: 34px; height: 34px; }
  table.facts th { width: 40%; }
  .card { padding: 18px; }
}
