/* Home page. Scrolls as a normal page (the app pages use fixed panels). */
body.page-home { overflow: auto; height: auto; }
.home { background: #fff; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 56px 28px 8px; }
.section-title { font-size: 24px; font-weight: 600; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.section-title::after { content: ''; display: block; width: 44px; height: 3px; background: var(--green); border-radius: 2px; margin-top: 10px; }
.section-sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; color: #fff;
  background: radial-gradient(1200px 500px at 50% -10%, #3d8a58 0%, transparent 60%),
              linear-gradient(160deg, #24573a 0%, #2f6e45 45%, #1c4630 100%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 28px);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero-inner { position: relative; max-width: 860px; margin: 0 auto; padding: 56px 24px 52px; text-align: center; }
.hero-logo { width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 12px 32px rgba(0,0,0,.25); }
.hero-eyebrow { margin: 22px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #cfe5d6; font-weight: 600; }
.hero h1 { margin: 0; font-size: 44px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.hero-ur { display: block; font-family: 'Noto Nastaliq Urdu', serif; font-weight: 400; font-size: 30px; line-height: 2; color: #e9cf95; }
.hero-sub { margin: 6px auto 26px; max-width: 680px; font-size: 16px; line-height: 1.65; color: #e3efe7; }
.hero-sub .ur-inline { color: #fff; }
.hero-search {
  display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink);
  border-radius: var(--r-pill); padding: 6px 6px 6px 20px; max-width: 720px; margin: 0 auto;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 10px 4px; background: transparent; }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-go {
  border: 0; background: var(--green); color: #fff; font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: var(--r-pill);
}
.hero-go:hover { background: var(--green-dark); }
.hero-search:focus-within { box-shadow: 0 14px 40px rgba(0,0,0,.25), 0 0 0 4px rgba(233,207,149,.55); }
.hero-try { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.hero-chip {
  color: #fff; text-decoration: none; font-size: 13px; padding: 5px 14px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06);
}
.hero-chip:hover { background: #fff; color: var(--green); border-color: #fff; }

/* ---------------------------------------------------------------- numbers */
.stats-band { background: #f6f8f6; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; align-items: center; padding: 22px 12px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat strong { font-size: 28px; font-weight: 700; color: var(--green); letter-spacing: -.01em; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
a.stat:hover { background: var(--green-soft); }

/* ---------------------------------------------------------------- explore tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 500;
  padding: 7px 16px; border-radius: var(--r-pill);
}
.tab:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(20, 40, 28, .12); transform: translateY(-2px); border-color: #cfe0d5; }
.card-band { display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-size: 12px; font-weight: 600; }
.band-book { background: linear-gradient(135deg, #eaf3ed, #f7f3e8); color: var(--green); }
.band-lec { background: linear-gradient(135deg, #f7efe3, #eaf3ed); color: #8a5a1f; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 18px; }
.card-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.card-title.ur { font-family: var(--urdu); font-weight: 400; font-size: 18px; line-height: 2; }
.card:hover .card-title { color: var(--green); }
.more-row { display: flex; justify-content: center; margin-top: 24px; }
.more-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green); font-weight: 600; font-size: 14px;
  border: 1px solid var(--green); border-radius: var(--r-pill); padding: 9px 20px;
}
.more-btn:hover { background: var(--green); color: #fff; }

/* ---------------------------------------------------------------- welcome + browse panel */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.welcome-col p { color: var(--text-2); line-height: 1.7; font-size: 15px; margin: 14px 0 0; }
.welcome-col .lede { font-size: 17px; color: var(--ink); }
.wisdom { margin: 28px 0 0; background: #fbf8f1; border: 1px solid #eee3c8; border-radius: var(--r-lg); padding: 20px 24px; }
.wisdom-head { display: flex; align-items: center; gap: 8px; color: #8a6a2a; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.wisdom blockquote { margin: 12px 0 14px; font-size: 16px; line-height: 1.7; color: var(--ink); }
.wisdom figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.wisdom figcaption a { color: var(--green); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.wisdom figcaption a:hover { text-decoration: underline; }
.browse-panel { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.bp-head { background: var(--green); color: #fff; font-weight: 600; padding: 14px 18px; font-size: 15px; }
.bp-group { padding: 12px 18px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; background: #f8faf8; border-top: 1px solid var(--line); }
.bp-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; text-decoration: none; color: var(--ink); font-size: 14px; border-top: 1px solid var(--line-soft); }
.bp-link:hover { background: var(--green-soft); color: var(--green); }
.bp-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- AI feature band */
.feature-band { background: var(--green-soft); margin-top: 56px; }
.feature { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 40px; padding: 52px 28px; align-items: center; }
.feature-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.feature h2 { font-size: 28px; margin: 8px 0 10px; color: var(--ink); letter-spacing: -.01em; }
.feature p { color: var(--text-2); line-height: 1.7; margin: 0 0 20px; }
.feature-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--green); color: #fff; text-decoration: none; font-weight: 600; padding: 11px 22px; border-radius: var(--r-pill); }
.feature-btn:hover { background: var(--green-dark); }
.prompt-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prompt-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--r-lg);
  padding: 16px 40px 16px 18px; text-decoration: none; color: var(--ink); border: 1px solid #d7e6dc;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.prompt-card:hover { border-color: var(--green); box-shadow: 0 8px 22px rgba(20, 40, 28, .10); }
.pc-label { font-weight: 600; font-size: 15px; }
.pc-label.ur { font-family: var(--urdu); font-weight: 400; font-size: 18px; line-height: 1.9; }
.pc-q { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-q:dir(rtl) { font-family: var(--urdu); line-height: 2; }
.pc-ic { position: absolute; top: 16px; right: 14px; color: var(--green); }

/* ---------------------------------------------------------------- key concepts */
.concepts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.concept {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); background: #fff;
}
.concept:hover { border-color: var(--green); background: var(--green-soft); }
.c-en { font-size: 13.5px; font-weight: 500; }
.concept:hover .c-en { color: var(--green); }
.c-ur { font-family: 'Noto Nastaliq Urdu', serif; font-size: 15px; line-height: 2; color: #8a6a2a; white-space: nowrap; }

/* ---------------------------------------------------------------- timeline chart (one series: no legend) */
.chart { position: relative; height: 240px; margin-top: 8px; padding: 0 0 26px 34px; }
.chart-grid { position: absolute; inset: 0 0 26px 34px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { border-top: 1px dashed #e3e3e3; font-family: var(--mono); font-size: 10.5px; color: var(--muted); position: relative; }
.chart-grid span:first-child::before { content: attr(data-v); }
.chart-grid span:first-child { text-indent: -34px; line-height: 0; }
.bars { position: relative; height: 100%; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #cfcfcf; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; outline: none; cursor: default; }
.bar { background: #8db59a; border-radius: 4px 4px 0 0; min-height: 0; transition: background-color .12s ease; }
.bar.peak { background: var(--green); }
.bar-col.hover .bar, .bar-col:focus-visible .bar { background: var(--green-dark); }
.bar-x { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--muted); visibility: hidden; }
.bar-x.show { visibility: visible; }
.chart-tip {
  position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font-size: 12px;
  padding: 5px 9px; border-radius: var(--r-sm); white-space: nowrap; pointer-events: none; z-index: 2;
}
.chart-table { margin-top: 14px; font-size: 13px; color: var(--muted); }
.chart-table summary { cursor: pointer; }
.chart-table table { border-collapse: collapse; margin-top: 8px; font-family: var(--mono); font-size: 12px; }
.chart-table td, .chart-table th { padding: 3px 14px 3px 0; text-align: left; }

/* ---------------------------------------------------------------- insights */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; background: #fff; }
.tile strong { display: block; font-size: 28px; font-weight: 700; color: var(--green); letter-spacing: -.01em; line-height: 1.2; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 500; }
.tile-loading strong { color: #d5ddd8; }
.ins-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px 18px; background: #fff; margin-bottom: 18px; min-width: 0; }
.ins-card h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.ins-sub { margin: 4px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.ins-sub a { color: var(--green); font-weight: 600; text-decoration: none; }
.ins-sub a:hover { text-decoration: underline; }
.ins-sub .ur-inline { font-size: 14px; }
.ins-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ins-grid .ins-card { margin-bottom: 18px; }
.ins-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ins-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.chip-ur { font-family: 'Noto Nastaliq Urdu', serif; font-size: 12.5px; line-height: 1.6; opacity: .85; }
.chart-sm { height: 200px; }
.hbars { display: flex; flex-direction: column; gap: 4px; }
.hbar {
  display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 5px 8px; margin: 0 -8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 13.5px;
}
a.hbar:hover { background: var(--green-soft); }
a.hbar:hover .hb-fill { background: var(--green-dark); }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-ur { font-family: 'Noto Nastaliq Urdu', serif; font-size: 13px; color: #8a6a2a; line-height: 1.8; }
.hb-track { height: 12px; background: #f1f3f1; border-radius: 0 4px 4px 0; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: #6fa383; border-radius: 0 4px 4px 0; }
.hb-val { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); white-space: nowrap; text-align: right; }

/* ---------------------------------------------------------------- footer */
.site-foot { background: #17241c; color: #c9d6cd; margin-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 44px 28px 36px; }
.foot-brand img { border-radius: 50%; }
.foot-brand div { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.foot-brand strong { color: #fff; font-size: 16px; }
.foot-brand .ur-inline { color: #e9cf95; font-family: 'Noto Nastaliq Urdu', serif; }
.foot-brand p { font-size: 13px; line-height: 1.6; margin: 8px 0 0; max-width: 280px; }
.site-foot h3 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 6px 0 12px; }
.site-foot a { display: block; color: #c9d6cd; text-decoration: none; font-size: 13.5px; padding: 4px 0; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; font-size: 12px; color: #8fa596; font-family: var(--mono); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .ins-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .feature { grid-template-columns: minmax(0, 1fr); }
  .concepts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap, .section { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 40px; }
  .hero-inner { padding: 36px 16px 36px; }
  .hero h1 { font-size: 32px; }
  .hero-ur { font-size: 24px; }
  .hero-logo { width: 96px; height: 96px; }
  .hero-search { padding-left: 14px; }
  .hero-search .voice-lang { display: none; }
  .hero-go { padding: 10px 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .cards, .prompt-cards, .concepts, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 40px 16px; }
  .chart { height: 200px; }
  .hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .ins-card { padding: 16px; }
}

/* Insights: soft shimmer while the numbers load */
#insights[aria-busy="true"] .chart, #insights[aria-busy="true"] .hbars,
#insights[aria-busy="true"] .tile-loading {
  background: linear-gradient(90deg, #f1f4f2 0%, #e6ece8 40%, #f1f4f2 80%) 0 0 / 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-md);
}
#insights[aria-busy="true"] .hbars { min-height: 180px; }
#insights[aria-busy="true"] .tile-loading strong { visibility: hidden; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { #insights[aria-busy="true"] * { animation: none !important; } }
