/* alrasool.life — same palette as the page's cards: deep green, cream, gold. */
:root {
  --green: #0f5a32; --green-dark: #0b3f24; --gold: #b98f3e; --gold-soft: #e9d9b4;
  --cream: #fbf7ee; --paper: #fffdf8; --ink: #1d2a24; --muted: #6b6455; --line: #e6dcc4;
  --serif: "Amiri", "Traditional Arabic", serif;
  --sans: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.9; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); color: var(--green); line-height: 1.4; }
h1 { font-size: clamp(30px, 5vw, 42px); margin: 8px 0; }
h2 { font-size: clamp(24px, 3.6vw, 30px); margin: 40px 0 16px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--green); }
.brand img { border-radius: 50%; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); font-size: 16px; }
.top nav a:hover { color: var(--green); }
@media (max-width: 560px) {
  .top .wrap { flex-direction: column; align-items: stretch; gap: 4px; padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 19px; }
  .top nav { gap: 14px; justify-content: space-between; }
  .top nav a { font-size: 15px; }
}
.foot { margin-top: 64px; background: var(--green-dark); color: #f3ead6; text-align: center; padding: 36px 0 28px; }
.foot img { border-radius: 50%; }
.foot a { color: var(--gold-soft); }
.foot .small { font-size: 14px; opacity: .8; }
.foot .links a { margin: 0 4px; }

/* buttons & chips */
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 999px; font-size: 16px; border: 2px solid var(--green); }
.btn:hover { background: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost.light { color: #fff; border-color: #fff; }
.foot .btn { background: var(--gold); border-color: var(--gold); color: #fff; }
.chip { display: inline-block; font-size: 13px; color: var(--green); background: #e8f1ea; border-radius: 999px; padding: 2px 10px; }

/* hero */
.hero { background: radial-gradient(circle at 50% 20%, #17704a, var(--green-dark)); color: #fff; text-align: center; padding: 48px 0 56px; }
.hero img { border-radius: 50%; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.hero h1 { color: #fff; margin-bottom: 0; }
.hero .tagline { font-family: var(--serif); font-size: 24px; color: var(--gold-soft); margin: 0; opacity: 1; }
.hero .en-sub { font-family: "Segoe UI", sans-serif; font-size: 15px; letter-spacing: .5px; margin: 2px auto 10px; opacity: .75; }
.hero p { max-width: 620px; margin: 8px auto 22px; opacity: .92; }
.hero .btn { margin: 4px; }
.hero .btn:first-of-type { background: var(--gold); border-color: var(--gold); }

/* banner header (home) */
.banner { position: relative; background: #f6efdf; border-bottom: 4px solid var(--gold); }
.banner picture, .banner img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: center; }
.banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40px; background: linear-gradient(to bottom, rgba(251,247,238,0), rgba(251,247,238,.35)); pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro { text-align: center; padding: 18px 0 6px; }
.intro .tagline { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 28px); color: var(--green); margin: 0; }
.intro .en-sub { font-family: "Segoe UI", sans-serif; font-size: 15px; color: var(--muted); }
@media (max-width: 560px) { .intro .en-sub { display: block; } }
.intro p { margin: 6px auto 14px; max-width: 640px; color: var(--muted); }
.intro .cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: #a37c31; }

/* story cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.sc { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.sc:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,90,50,.12); }
.sc > img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.sc .noimg { aspect-ratio: 1; display: grid; place-items: center; background: var(--cream); }
.sc .noimg img { width: 40%; opacity: .8; }
.sc-body { padding: 14px 16px 18px; }
.sc h3 { margin: 8px 0 4px; font-size: 22px; }
.sc p { margin: 0; color: var(--muted); font-size: 16px; }
.today .sc { flex-direction: row; max-width: 820px; }
.today .sc > img, .today .sc .noimg { width: 42%; flex: none; }
.today .sc-body { align-self: center; }
@media (max-width: 640px) { .today .sc { flex-direction: column; } .today .sc > img, .today .sc .noimg { width: 100%; } }
.more { text-align: center; margin-top: 22px; }

/* stages */
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stage { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 12px; text-decoration: none; color: inherit; }
.stage b { font-family: var(--serif); font-size: 21px; color: var(--green); }
.stage span { font-size: 15px; color: var(--muted); line-height: 1.7; }
.stage em { font-style: normal; font-size: 14px; color: var(--gold); margin-top: auto; }

/* timeline strip (same idea as the cards) */
.tl { margin: 18px 0 26px; }
.tl-when { text-align: center; color: var(--green); font-weight: 700; margin-bottom: 6px; }
.tl-row { position: relative; display: flex; justify-content: space-between; }
.tl-row::before { content: ""; position: absolute; top: 11px; right: 8%; left: 8%; height: 2px; background: var(--gold); opacity: .6; }
.tl-stage { position: relative; flex: 1; text-align: center; font-size: 14px; color: var(--muted); text-decoration: none; line-height: 1.5; }
.tl-dot { display: block; width: 14px; height: 14px; margin: 4px auto 6px; border-radius: 50%; background: var(--cream); border: 2px solid var(--gold); }
.tl-stage.on { color: var(--green); font-weight: 700; }
.tl-stage.on .tl-dot { width: 24px; height: 24px; margin: -1px auto 1px; background: var(--green); border: 3px solid var(--gold); }

/* story page */
.story { max-width: 760px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 22px 0 0; }
.crumbs a { color: var(--muted); }
.date { color: var(--muted); font-size: 15px; margin: 0; }
.hook { font-family: var(--serif); font-size: 26px; color: var(--green-dark); line-height: 1.7; border-right: 4px solid var(--gold); padding-right: 14px; }
.body p { margin: 0 0 12px; }
.card { margin: 26px auto; max-width: 520px; text-align: center; }
.card img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(15,90,50,.12); }
.card figcaption { font-size: 15px; margin-top: 6px; }
.lesson, .question, .source { border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.lesson { background: #e8f1ea; }
.question { background: #fbf1dc; }
.source { background: var(--paper); border: 1px dashed var(--gold); font-size: 16px; }
.lesson p, .question p, .source p { margin: 4px 0 0; }
.share { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.share .fb { background: #1877f2; border-color: #1877f2; }
.share .wa { background: #1f9d55; border-color: #1f9d55; }
.pn { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 16px; }

/* chapters */
.ch-num { margin: 14px 0 0; color: var(--gold); font-weight: 700; }
.metas { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.meta-chip { font-size: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; color: var(--muted); }
.src-quote { margin: 18px 0; padding: 16px 18px; background: var(--paper); border-right: 4px solid var(--green); border-radius: 10px; }
.src-quote p { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 2; color: var(--green-dark); }
.src-quote footer { margin-top: 8px; font-size: 14px; color: var(--muted); }
.lesson ul { margin: 6px 0 0; padding-right: 20px; }
.related { background: #fbf1dc; border-radius: 12px; padding: 10px 16px; }
.toc-group h2 { margin-top: 30px; }
.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.toc li a { display: flex; gap: 12px; align-items: center; text-decoration: none; font-family: var(--serif); font-size: 21px; color: var(--green); }
.toc .n { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 16px; font-family: var(--sans); }
.toc small { display: block; margin-right: 48px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.toc li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.toc .soon { color: var(--muted); font-size: 16px; }
.toc li.todo { background: transparent; border-style: dashed; }
.toc li.todo > span { display: flex; gap: 12px; align-items: center; font-family: var(--serif); font-size: 20px; color: var(--muted); }
.toc li.todo .n { background: var(--gold-soft); color: var(--muted); }
.progress { height: 10px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: linear-gradient(to left, var(--gold), var(--green)); border-radius: 999px; }
.vtl .tl-item.todo > div { display: block; padding: 10px 16px; border: 1px dashed var(--line); border-radius: 12px; opacity: .75; }
.vtl .tl-item.todo b { font-family: var(--serif); font-size: 19px; color: var(--muted); }
.vtl .tl-item.todo span { display: block; font-size: 14px; color: var(--muted); }
.vtl .tl-item.todo::before { background: var(--paper); border-style: dashed; }

/* vertical timeline */
.vtl { list-style: none; padding: 0 22px 0 0; margin: 20px 0; border-right: 3px solid var(--gold); }
.vtl .tl-era { margin: 26px 0 12px; position: relative; }
.vtl .tl-era span { display: inline-block; background: var(--green); color: #fff; border-radius: 999px; padding: 4px 16px; font-family: var(--serif); font-size: 20px; position: relative; right: -36px; }
.vtl .tl-item { position: relative; margin: 0 0 14px; }
.vtl .tl-item::before { content: ""; position: absolute; right: -31px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 3px solid var(--gold); }
.vtl .tl-item a { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.vtl .tl-item b { font-family: var(--serif); font-size: 20px; color: var(--green); }
.vtl .tl-item em { font-style: normal; font-size: 13px; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 999px; padding: 0 8px; margin-right: 8px; }
.vtl .tl-item span { display: block; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* search */
.search input, .home-search input { width: 100%; font: inherit; font-size: 18px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.search input:focus, .home-search input:focus { outline: none; border-color: var(--green); }
.results { list-style: none; padding: 0; display: grid; gap: 10px; }
.results a { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.results b { font-family: var(--serif); font-size: 20px; color: var(--green); }
.results small { display: block; color: var(--muted); font-size: 15px; }
.ref { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px 24px 22px; margin-top: 36px; }
.home-search { display: flex; gap: 8px; }
.home-search .btn { flex: none; }
@media (max-width: 720px) { .ref { grid-template-columns: 1fr; } }

/* text pages */
.prose { max-width: 760px; }
.prose .en { text-align: left; border-top: 1px solid var(--line); margin-top: 30px; font-family: "Segoe UI", sans-serif; font-size: 16px; }
.lead { color: var(--muted); }
.empty { color: var(--muted); }
