/* ============================================================================
   Balum - balum.app marketing/legal site design system
   Shared by index.html (landing) + privacy/terms/get/contact.
   Brand DNA (from the app): deep green #1B4A3A / #2D6B55, gold #D4B65E, cream,
   pearl #F6F8F7 light surfaces, Poppins (UI) + Amiri (scripture/quotes), and the
   signature time-of-day SKY (see sky.js) - the website breathes like the app.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Amiri:ital@0;1&display=swap');

:root {
  /* brand */
  --green-1: #1B4A3A;   /* deep green (wordmark, CTAs) */
  --green-2: #2D6B55;   /* mid green */
  --green-d: #0F3528;   /* darkest green */
  --green-pale: #E4F2EC;
  --gold: #D4B65E;
  --gold-soft: #E8C97A;
  --gold-deep: #9A7B2E;

  /* surfaces */
  --sky-deep: #070d1f;  /* cosmic base behind the hero */
  --pearl: #F6F8F7;     /* light section bg (app's surface) */
  --cream: #FBF7EF;     /* warm light section bg */
  --paper: #FDFBF6;     /* card on light */

  /* ink */
  --ink: #1A1A14;
  --ink-soft: #5A5A50;
  --ink-faint: #8E897C;
  --on-dark: #F2ECDF;        /* cream text on the cosmic sky */
  --on-dark-soft: #B9C2D6;   /* muted slate on the sky */

  /* type */
  --ui: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: 'Amiri', Georgia, serif;

  /* shape */
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-pill: 999px;
  --shadow-card: 0 18px 40px -22px rgba(15, 35, 25, 0.30);
  --shadow-float: 0 30px 70px -30px rgba(8, 16, 32, 0.55);
  --wrap: 1120px;
  --section-y: clamp(72px, 12vw, 140px);

  /* live sky (overwritten by sky.js per local time of day) */
  --hero-from: #0a1228;
  --hero-mid:  #15233f;
  --hero-to:   #0c1730;
  --hero-glow: #9DB4DE;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--pearl);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.section { padding: var(--section-y) 0; position: relative; }
.section--pearl { background: var(--pearl); }
.section--cream { background: var(--cream); }
.section--green { background: linear-gradient(165deg, var(--green-d), var(--green-1) 70%, var(--green-2)); color: var(--on-dark); }
.section--sky   { background: var(--sky-deep); color: var(--on-dark); position: relative; }
/* faint drifting starfield ties the cosmic section to the hero sky */
.section--sky::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 24%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 68% 58%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.5px 1.5px at 42% 82%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 84% 22%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 54% 12%, rgba(255,255,255,0.42), transparent),
    radial-gradient(1.5px 1.5px at 30% 60%, rgba(255,255,255,0.38), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,0.4), transparent);
  animation: skyTwinkle 6s ease-in-out infinite;
}
.section--sky > .wrap { position: relative; z-index: 1; }
.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---- typography ------------------------------------------------------------ */
h1, h2, h3 { font-family: var(--ui); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); letter-spacing: -0.01em; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-deep);
}
.section--green .eyebrow, .section--sky .eyebrow { color: var(--gold); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); line-height: 1.65; }
.section--green .lead, .section--sky .lead { color: var(--on-dark-soft); }
.muted { color: var(--ink-faint); }
.serif { font-family: var(--serif); }

/* ---- brand mark + wordmark ------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-mark { width: 1.1em; height: 1.1em; }
.wordmark { font-weight: 800; letter-spacing: -0.02em; color: var(--green-2); }
.wordmark .spark { color: var(--gold-soft); }
.section--green .wordmark, .section--sky .wordmark, .hero .wordmark { color: #EAF6F0; }

/* ---- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--ui); font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 0.95rem 1.6rem; border-radius: var(--r-pill); border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--green-2), var(--green-1)); color: #fff; box-shadow: 0 14px 30px -14px rgba(27,74,58,0.7); }
.btn-primary:hover { box-shadow: 0 20px 40px -16px rgba(27,74,58,0.8); }
.btn-glass {
  background: rgba(255,255,255,0.08); color: var(--on-dark);
  border-color: rgba(255,255,255,0.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,0.14); }

/* ---- store badge + QR placeholders ---------------------------------------- */
/* Real store links/QРs are filled post-launch; until then these read as tasteful
   "coming soon" placeholders. data-store lets JS swap href + active state later. */
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; position: relative; overflow: hidden;
  padding: 12px 20px; border-radius: 16px; min-width: 200px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
  color: var(--on-dark); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s, transform 0.18s, border-color 0.18s;
}
/* a slow light sweeps across the badges - a quiet "alive" shimmer */
.store-badge::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg); pointer-events: none; animation: badgeShine 7s ease-in-out infinite;
}
.store-badge[data-store="android"]::before { animation-delay: -3.5s; }
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge .sb-top { font-size: 0.7rem; letter-spacing: 0.04em; opacity: 0.7; line-height: 1.2; }
.store-badge .sb-main { font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.store-badge[data-active="false"] { cursor: default; }
.store-badge[data-active="false"]::after {
  content: "Soon"; margin-left: auto; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-soft); border: 1px solid rgba(212,182,94,0.45);
  border-radius: var(--r-pill); padding: 2px 8px;
}
.store-badge[data-active="true"]:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
/* light-section variant */
.section--pearl .store-badge, .section--cream .store-badge {
  background: #fff; border-color: #E8E4DC; color: var(--ink); box-shadow: var(--shadow-card);
}

.qr-box {
  width: 132px; height: 132px; border-radius: 18px; flex-shrink: 0;
  display: grid; place-items: center; text-align: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.3);
  color: var(--on-dark-soft); font-size: 0.72rem; letter-spacing: 0.04em;
}
.qr-box .qr-glyph { width: 56px; height: 56px; opacity: 0.55; }
.section--pearl .qr-box, .section--cream .qr-box { background: #fff; border-color: #DED9CE; color: var(--ink-faint); }

/* ---- chips / pills --------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: var(--r-pill);
  font-size: 0.85rem; font-weight: 600; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16); color: var(--on-dark);
}
.section--pearl .chip, .section--cream .chip { background: #fff; border-color: #E8E4DC; color: var(--ink-soft); box-shadow: var(--shadow-card); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: blink 2.4s ease-in-out infinite; }
.chips-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---- feature grid ---------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--paper); border: 1px solid #EDE8DD; border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -24px rgba(15,35,25,0.34); }
.feature .ficon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--green-pale); color: var(--green-1);
}
.feature .ficon svg { width: 26px; height: 26px; }
/* Curated illustration niche - the app's "illuminated window" plates (LearnArt /
   PrayArt), a warm cream ground with a soft gold glow. NO flat icons. */
.feature .fillus {
  height: 150px; margin: -4px -2px 20px; border-radius: 16px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #FBF6E9 0%, #F1E6CE 100%);
  display: flex; align-items: flex-end; justify-content: center;
}
.feature .fillus::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 56% at 50% 44%, rgba(255,221,150,0.5), transparent 72%);
  animation: nicheGlow 5.5s ease-in-out infinite;
}
.features .feature:nth-child(2) .fillus::before { animation-delay: -1.4s; }
.features .feature:nth-child(3) .fillus::before { animation-delay: -2.7s; }
.features .feature:nth-child(4) .fillus::before { animation-delay: -3.6s; }
.features .feature:nth-child(5) .fillus::before { animation-delay: -2.1s; }
.features .feature:nth-child(6) .fillus::before { animation-delay: -4.4s; }
.feature .fillus svg { position: relative; height: 100%; width: auto; display: block; }
.feature h3 { margin-bottom: 8px; color: var(--ink); }
.feature p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---- phone mockup + screenshots ------------------------------------------- */
.phone {
  position: relative; width: clamp(150px, 21vw, 232px); aspect-ratio: 1242 / 2688;
  border-radius: 34px; padding: 9px; background: linear-gradient(160deg, #20242b, #0e1116);
  box-shadow: var(--shadow-float); flex-shrink: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: phoneFloat 7s ease-in-out infinite;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.phone::after { /* notch */
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.18);
}
.phone:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 44px 90px -28px rgba(8,16,32,0.7); animation-play-state: paused; }
/* one clean row; figures don't shrink. Horizontal scroll on small screens. */
.screens-row { display: flex; gap: clamp(14px, 2vw, 26px); align-items: flex-start; justify-content: center; flex-wrap: nowrap; }
.screens-row > figure { flex: 0 0 auto; }
.screens-row > figure:nth-child(2) .phone { animation-delay: -1.75s; }
.screens-row > figure:nth-child(3) .phone { animation-delay: -3.5s; }
.screens-row > figure:nth-child(4) .phone { animation-delay: -5.25s; }
@media (max-width: 760px) {
  .screens-row { overflow-x: auto; justify-content: flex-start; padding: 4px 4px 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .screens-row > figure { scroll-snap-align: center; }
  .phone { width: 64vw; }
}

/* ---- quote (Amiri) --------------------------------------------------------- */
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.6; }
.quote-src { font-family: var(--ui); font-weight: 700; letter-spacing: 0.04em; color: var(--gold); font-size: 0.95rem; }

/* ---- hero / living sky ----------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; overflow: hidden;
  color: var(--on-dark);
  background: linear-gradient(180deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
  transition: background 1.2s ease;
}
.hero-sky { position: absolute; inset: -46px; width: calc(100% + 92px); height: calc(100% + 92px); z-index: 0; pointer-events: none; transition: transform 0.5s ease-out; }
.hero-glow { /* soft moonlight halo around the crescent - subtle, not a blob */
  position: absolute; z-index: 0; width: 30vw; height: 30vw; max-width: 360px; max-height: 360px;
  top: 1%; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--hero-glow) 32%, transparent) 0%, transparent 68%);
  filter: blur(20px); opacity: 0.5; pointer-events: none; transition: transform 0.5s ease-out;
}
.hero-content { position: relative; z-index: 2; padding: 96px 20px; display: flex; flex-direction: column; align-items: center; }
.hero h1 { color: #F4EFE3; text-shadow: 0 2px 30px rgba(0,0,0,0.35); }
.hero .lead { color: var(--on-dark-soft); }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; opacity: 0.6; animation: bob 2.4s ease-in-out infinite; }

/* celestial bodies for the hero */
.crescent { filter: drop-shadow(0 0 22px rgba(212,182,94,0.55)) drop-shadow(0 0 50px rgba(212,182,94,0.25)); animation: floatMoon 7s ease-in-out infinite; }
.sun-orb  { filter: drop-shadow(0 0 40px rgba(255,210,130,0.6)); animation: floatMoon 9s ease-in-out infinite; }

/* ---- header ---------------------------------------------------------------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-solid, .site-header--solid {
  position: fixed; background: rgba(246,248,247,0.82); backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px); box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.site-header .wordmark { font-size: 1.35rem; color: #EAF6F0; }
.site-header.is-solid .wordmark, .site-header--solid .wordmark { color: var(--green-2); }
.site-header .header-cta { padding: 0.6rem 1.2rem; font-size: 0.92rem; }
.site-header.is-solid .header-cta, .site-header--solid .header-cta { background: linear-gradient(135deg, var(--green-2), var(--green-1)); color:#fff; }

/* ---- footer ---------------------------------------------------------------- */
.site-footer { background: var(--green-d); color: var(--on-dark); padding: 64px 0 40px; }
.site-footer a { color: var(--on-dark-soft); transition: color 0.2s; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.92rem; }
.footer-base { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.82rem; color: var(--on-dark-soft); }

/* ---- legal page (privacy/terms) ------------------------------------------- */
.legal { background: var(--pearl); }
.legal .wrap { max-width: 760px; }
.legal-head { padding: clamp(48px, 8vw, 90px) 0 28px; }
.legal-body { padding-bottom: 96px; }
.legal-body h2 { font-size: 1.25rem; margin: 36px 0 12px; color: var(--green-1); }
.legal-body h3 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--ink); }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; margin: 0.5rem 0; }
.legal-body li { margin-bottom: 0.4rem; }
.legal-body strong { color: var(--ink); }
.legal-body a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; }
.legal-body hr { border: none; border-top: 1px solid #E6E1D6; margin: 32px 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--green-2); font-size: 0.92rem; font-weight: 600; }

/* ---- scroll reveal --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---- keyframes ------------------------------------------------------------- */
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes floatMoon { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@keyframes phoneFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes nicheGlow { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes badgeShine { 0% { left: -60%; } 22% { left: 130%; } 100% { left: 130%; } }
@keyframes skyTwinkle { 0%,100% { opacity: 0.4; } 50% { opacity: 0.62; } }

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .store-badge { min-width: 0; width: 100%; }
}

/* ---- reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Cookie consent bar ──────────────────────────────────────────────────────
   Neutral chrome (pearl + ink, no colour). Gates the Meta pixel (consent.js). */
#balum-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
  max-width: 580px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: #FBF7EF; color: #1B2233;
  border: 1px solid rgba(27, 34, 51, 0.12); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(10, 18, 40, 0.22);
  font-size: 0.9rem; line-height: 1.45;
}
#balum-consent .cc-text { margin: 0; flex: 1 1 260px; }
#balum-consent .cc-text a { color: #1B2233; text-decoration: underline; }
#balum-consent .cc-actions { display: flex; gap: 10px; flex: 0 0 auto; }
#balum-consent .cc-btn {
  cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 10px; padding: 9px 18px;
  border: 1px solid rgba(27, 34, 51, 0.22); background: transparent; color: #1B2233;
}
#balum-consent .cc-accept { background: #1B2233; color: #FBF7EF; border-color: #1B2233; }
@media (max-width: 520px) {
  #balum-consent { flex-direction: column; align-items: stretch; }
  /* In the column layout the flex-basis becomes a *height* - reset it so the
     text sizes to its content instead of forcing a ~260px-tall empty banner. */
  #balum-consent .cc-text { flex: 0 0 auto; }
  #balum-consent .cc-actions { justify-content: flex-end; }
}

/* ============================================================================
   TOOLS + GUIDES - interactive utility pages (zakat / qibla / prayer times /
   hijri / tasbih) and the /guides content hub. Same brand DNA: green + gold on
   pearl, Poppins + Amiri, rounded shadowed cards. Neutral chrome, no flat icons.
   ========================================================================== */
.tool-main { background: var(--pearl); min-height: 100vh; }
.tool-head { padding: clamp(96px, 12vw, 150px) 0 20px; }
.tool-head .eyebrow { color: var(--gold-deep); }
.tool-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); color: var(--green-1); }
.tool-head .lead { margin-top: 14px; max-width: 640px; }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 14px; }
.crumb a { color: var(--green-2); }
.crumb span { opacity: 0.5; }
.tool-wrap { max-width: 760px; }
.tool-grid { padding-bottom: 20px; }

/* card */
.card {
  background: var(--paper); border: 1px solid #ECE6DA; border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: clamp(22px, 4vw, 34px);
}
.card + .card { margin-top: 22px; }
.card h2 { font-size: 1.35rem; color: var(--green-1); margin-bottom: 6px; }
.card h3 { font-size: 1.05rem; color: var(--ink); margin: 20px 0 8px; }
.card p { color: var(--ink-soft); }

/* form fields */
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: 0.82rem; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid #DcD6C8; background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(45,107,85,0.14); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-money { position: relative; }
.input-money .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-weight: 600; pointer-events: none; }
.input-money input { padding-left: 30px; }

/* result panel */
.result {
  margin-top: 6px; border-radius: var(--r-md); padding: 22px 24px;
  background: linear-gradient(160deg, var(--green-1), var(--green-d)); color: var(--on-dark);
  box-shadow: 0 16px 34px -20px rgba(15,53,40,0.6);
}
.result .r-label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); }
.result .r-value { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.1; margin: 4px 0; }
.result .r-note { font-size: 0.92rem; color: var(--on-dark-soft); }
.result.is-below { background: linear-gradient(160deg, #3A3A44, #23232B); }
.result .r-sub { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.9rem; color: var(--on-dark-soft); }
.result .r-sub b { color: #fff; font-weight: 700; }

/* readout (qibla/hijri/prayer) big value */
.readout { text-align: center; padding: 8px 0 4px; }
.readout .big { font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 800; color: var(--green-1); line-height: 1.05; }
.readout .sub { color: var(--ink-soft); margin-top: 4px; }

/* prayer times table */
.ptable { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ptable th, .ptable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #EDE7DB; }
.ptable th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.ptable td:last-child, .ptable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ptable tr.is-next td { background: var(--green-pale); color: var(--green-1); font-weight: 700; }
.ptable tr.is-next td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.ptable tr.is-next td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* qibla compass */
.compass { width: min(260px, 72vw); aspect-ratio: 1; margin: 12px auto; position: relative; }
.compass .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #E3DcCB; background: radial-gradient(circle at 50% 40%, #fff, #F3EEE2); box-shadow: var(--shadow-card); }
.compass .tick { position: absolute; top: 8px; left: 50%; font-size: 0.7rem; font-weight: 700; color: var(--ink-faint); transform: translateX(-50%); }
.compass .needle { position: absolute; left: 50%; top: 50%; width: 6px; height: 42%; transform-origin: bottom center; transform: translate(-50%, -100%) rotate(0deg); transition: transform 0.4s ease; }
.compass .needle::before { content: ""; position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); box-shadow: 0 0 12px rgba(212,182,94,0.6); }
.compass .kaba { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); border-radius: 5px; background: #14140F; border: 2px solid var(--gold); }
.compass .hub { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); border-radius: 50%; background: var(--green-1); z-index: 2; }

/* small buttons + actions inside cards */
.act-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.92rem; }
.btn-ghost { background: transparent; border: 1px solid #D8D2C4; color: var(--ink); }
.btn-ghost:hover { background: #fff; }

/* tasbih */
.tasbih { text-align: center; }
.tasbih .count { font-size: clamp(3.6rem, 18vw, 6rem); font-weight: 800; color: var(--green-1); line-height: 1; font-variant-numeric: tabular-nums; }
.tasbih .of { color: var(--ink-faint); margin-top: 2px; }
.tap-btn {
  width: min(200px, 60vw); aspect-ratio: 1; border-radius: 50%; margin: 20px auto 12px; cursor: pointer;
  border: none; color: #fff; font: inherit; font-weight: 700; font-size: 1.1rem;
  background: radial-gradient(circle at 50% 38%, var(--green-2), var(--green-1) 70%, var(--green-d));
  box-shadow: 0 20px 44px -18px rgba(15,53,40,0.7), inset 0 2px 6px rgba(255,255,255,0.14);
  transition: transform 0.08s ease;
}
.tap-btn:active { transform: scale(0.96); }

/* dhikr phrase pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.pill { cursor: pointer; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid #DDD7C9; background: #fff; font-size: 0.9rem; color: var(--ink-soft); }
.pill[aria-pressed="true"] { background: var(--green-pale); border-color: var(--green-2); color: var(--green-1); font-weight: 700; }

/* arabic line */
.ar { font-family: var(--serif); font-size: 1.9rem; line-height: 1.9; color: var(--green-1); direction: rtl; text-align: right; }
.translit { color: var(--gold-deep); font-style: italic; }

/* status / error line */
.status { font-size: 0.9rem; color: var(--ink-faint); margin-top: 8px; }
.status.err { color: #B23B3B; }

/* disclaimer note */
.note { margin-top: 18px; font-size: 0.86rem; color: var(--ink-faint); line-height: 1.6; background: #fff; border: 1px solid #EDE7DB; border-radius: var(--r-sm); padding: 14px 16px; }
.note strong { color: var(--ink); }

/* FAQ (details/summary) */
.faq { margin-top: 8px; }
.faq details { border-bottom: 1px solid #E6E0D3; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 2px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green-2); font-weight: 800; font-size: 1.2rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); padding: 0 2px 18px; }

/* related tools/guides */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.related a { display: block; padding: 16px 18px; border-radius: var(--r-md); background: var(--paper); border: 1px solid #ECE6DA; box-shadow: var(--shadow-card); transition: transform 0.18s, box-shadow 0.18s; }
.related a:hover { transform: translateY(-3px); }
.related a b { display: block; color: var(--green-1); margin-bottom: 2px; }
.related a span { color: var(--ink-faint); font-size: 0.88rem; }

/* CTA strip */
.cta-strip { margin: 26px 0; padding: 26px; border-radius: var(--r-lg); text-align: center; background: linear-gradient(160deg, var(--green-1), var(--green-d)); color: var(--on-dark); }
.cta-strip h2 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.cta-strip p { color: var(--on-dark-soft); margin-bottom: 16px; }

/* guide article */
.guide-body { max-width: 740px; }
.guide-body h2 { font-size: 1.4rem; color: var(--green-1); margin: 34px 0 12px; }
.guide-body h3 { font-size: 1.1rem; color: var(--ink); margin: 22px 0 8px; }
.guide-body p, .guide-body li { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.8; }
.guide-body ul, .guide-body ol { padding-left: 1.3rem; margin: 0.6rem 0 1rem; }
.guide-body li { margin-bottom: 0.5rem; }
.guide-body strong { color: var(--ink); }
.guide-body a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; }
.guide-body blockquote { border-left: 3px solid var(--gold); padding: 6px 0 6px 18px; margin: 18px 0; font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 1.15rem; }

/* guide hub cards */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.hub-card { display: block; background: var(--paper); border: 1px solid #ECE6DA; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-card); transition: transform 0.18s, box-shadow 0.18s; }
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -24px rgba(15,35,25,0.34); }
.hub-card .k { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.hub-card h3 { margin: 8px 0 6px; color: var(--green-1); }
.hub-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* footer columns (richer nav) */
.foot-cols { display: flex; flex-wrap: wrap; gap: 34px 60px; }
.foot-col h4 { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 12px; font-weight: 700; }
.foot-col a { display: block; margin-bottom: 8px; font-size: 0.92rem; }

@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---- header nav (tools menu) ----------------------------------------------- */
.header-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; margin-right: 24px; font-size: 0.92rem; font-weight: 600; }
.header-nav a { color: #EAF6F0; opacity: 0.88; white-space: nowrap; transition: opacity 0.2s, color 0.2s; }
.header-nav a:hover { opacity: 1; }
.site-header.is-solid .header-nav a, .site-header--solid .header-nav a { color: var(--ink-soft); opacity: 1; }
.site-header.is-solid .header-nav a:hover, .site-header--solid .header-nav a:hover { color: var(--green-1); }
.nav-toggle { display: none; }
.nav-toggle > summary { list-style: none; cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 2px 6px; color: #EAF6F0; }
.nav-toggle > summary::-webkit-details-marker { display: none; }
.site-header.is-solid .nav-toggle > summary, .site-header--solid .nav-toggle > summary { color: var(--green-1); }
.nav-drop { position: absolute; right: clamp(20px,5vw,40px); top: 62px; min-width: 210px; background: #fff; border: 1px solid #ECE6DA; border-radius: 16px; box-shadow: var(--shadow-float); padding: 8px; display: flex; flex-direction: column; z-index: 40; }
.nav-drop a { padding: 11px 14px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 0.96rem; }
.nav-drop a:hover { background: var(--green-pale); color: var(--green-1); }
.nav-drop .nav-cta { background: linear-gradient(135deg, var(--green-2), var(--green-1)); color: #fff; margin-top: 4px; text-align: center; }
.nav-drop .nav-cta:hover { color: #fff; }
@media (max-width: 880px) {
  .header-nav { display: none; }
  .site-header .header-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
}
