/* Noor Research — hub + project subpage + custom admin styling.
   Indigo accent, scoped to .theme-research (set on <body>). Class names are
   research-specific (rs-/res-/rd-/rc-/radm-). Self-contained: the theme vars
   below define every colour token the rules reference. */

.theme-research {
  --grad-green: linear-gradient(135deg, #6366f1, #312e9e);
  --green: #4338ca;
  --green-dark: #312e9e;
  --tint-green: #ebe9fb;
  --card: #ffffff;
  --line: #e7ece9;
  --muted: #5d6b64;
}

/* ── App sub-nav (app-bar) ──────────────────────────────────────────────── */
.rs-subnav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.rs-subnav .rs-brand { font-weight: 800; color: var(--green-dark); margin-inline-end: 10px; }
.rs-subnav a {
  padding: 7px 12px; border-radius: 999px; color: var(--ink, #22302a);
  font-size: .92rem; font-weight: 600;
}
.rs-subnav a:hover { background: var(--tint-green); text-decoration: none; }
.rs-subnav a.active { background: var(--green); color: #fff; }
.rs-subnav .spacer { flex: 1; }

/* ── Shared pills ───────────────────────────────────────────────────────── */
.res-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 3px 11px; line-height: 1.6; white-space: nowrap;
}
.res-pill.green { background: #e8f5ee; color: #137a4b; }
.res-pill.amber { background: #fcf3e3; color: #8a6420; }
.res-pill.indigo { background: #ebe9fb; color: #4338ca; }
.res-pill.blue { background: #e6eefc; color: #1d4ed8; }
.res-pill.gray { background: #eef0f2; color: #566; }

/* ── Hub hero ───────────────────────────────────────────────────────────── */
.rs-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: clamp(30px, 5vw, 56px); margin: 10px 0 4px; border-radius: var(--radius-lg, 26px); color: #fff;
  background: var(--grad-green); box-shadow: 0 22px 48px rgba(49, 46, 158, 0.22);
}
.rs-hero .rs-hero-mark {
  width: 88px; height: 88px; display: grid; place-items: center; border-radius: 24px;
  background: rgba(255, 255, 255, 0.16); font-size: 46px;
}
.rs-hero h1 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.03; letter-spacing: -.022em; }
.rs-hero p { margin: 7px 0 0; max-width: 70ch; color: rgba(255, 255, 255, 0.92); line-height: 1.55; }

/* ── Stats strip ────────────────────────────────────────────────────────── */
.rs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 6px; }
.rs-stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: center; }
.rs-stat .n { font-size: 1.7rem; font-weight: 800; color: var(--green-dark); line-height: 1; }
.rs-stat .l { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }
@media (max-width: 680px) { .rs-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── Featured project ───────────────────────────────────────────────────── */
.rs-featured {
  display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; margin: 18px 0 6px; box-shadow: 0 10px 30px rgba(20, 32, 27, 0.07);
  text-decoration: none; color: inherit; transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.rs-featured:hover { box-shadow: 0 16px 40px rgba(49, 46, 158, 0.16); transform: translateY(-2px); }
.rs-featured .rs-feat-cover { min-height: 220px; background: var(--tint-green) center/cover no-repeat; display: grid; place-items: center; font-size: 56px; }
.rs-featured .rs-feat-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 9px; }
.rs-featured .rs-feat-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--green); }
.rs-featured .rs-feat-title { font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: #14201b; }
.rs-featured .rs-feat-sum { color: var(--muted); line-height: 1.6; }
.rs-featured .rs-feat-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 760px) { .rs-featured { grid-template-columns: 1fr; } .rs-featured .rs-feat-cover { min-height: 150px; } }

/* ── Filters ────────────────────────────────────────────────────────────── */
.rs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 2px; flex-wrap: wrap; }
.rs-section-head h2 { margin: 0; font-size: 1.25rem; }
.rs-search { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.rs-search input[type="search"] { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; min-width: 190px; background: var(--card); color: #14201b; }
.rs-search input[type="search"]:focus { outline: none; border-color: var(--green); }
@media (max-width: 560px) { .rs-search { width: 100%; } .rs-search input[type="search"] { flex: 1; min-width: 0; } }
.research-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.research-filters .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: #14201b; background: #eef0fb; border: 1px solid transparent; }
.research-filters .chip:hover { background: #e3e6f8; }
.research-filters .chip.active { background: var(--grad-green); color: #fff; }
.rs-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; margin-inline-start: 6px; border-radius: 999px; background: var(--tint-green); color: var(--green-dark); font-size: 12.5px; font-weight: 800; vertical-align: middle; }
.rs-active-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; font-size: 13px; color: var(--muted); }
.rs-active-note .rs-tag { background: var(--tint-green); color: var(--green-dark); font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.rs-active-note .rs-clear { color: var(--green); font-weight: 700; text-decoration: none; }
.rs-active-note .rs-clear:hover { text-decoration: underline; }

/* ── Project grid + cards ───────────────────────────────────────────────── */
.research-grid { display: grid; gap: 16px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.research-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: inherit; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.research-card:hover { box-shadow: 0 12px 30px rgba(49, 46, 158, 0.14); transform: translateY(-3px); }
.research-card .rc-cover { aspect-ratio: 16 / 9; background: var(--tint-green) center/cover no-repeat; display: grid; place-items: center; font-size: 40px; color: var(--green); }
.research-card .rc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.research-card .rc-area { font-size: 12px; font-weight: 700; color: var(--green); }
.research-card .rc-title { font-size: 17px; font-weight: 800; line-height: 1.25; color: #14201b; }
.research-card .rc-sum { font-size: 14px; color: var(--muted); line-height: 1.5; }
.research-card .rc-foot { display: flex; gap: 8px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.research-empty { margin: 28px 0; color: var(--muted); text-align: center; }

/* ── Subpage ────────────────────────────────────────────────────────────── */
.rd-back { font-size: 13.5px; font-weight: 700; color: var(--green); text-decoration: none; }
.rd-back:hover { text-decoration: underline; }
.rd-hero { position: relative; margin: 12px 0 18px; border-radius: 20px; overflow: hidden; background: var(--grad-green); color: #fff; }
.rd-hero.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,60,0.18), rgba(20,18,60,0.74)); }
.rd-hero .rd-hero-cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.rd-hero .rd-hero-inner { position: relative; z-index: 1; padding: 30px; }
.rd-hero.has-cover .rd-hero-inner { padding-top: 90px; }
.rd-hero .rd-hero-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rd-hero h1 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.12; }
.rd-hero .rd-tagline { margin: 8px 0 0; font-size: 1.05rem; color: rgba(255,255,255,0.92); max-width: 70ch; }
.rd-hero .res-pill.indigo { background: rgba(255,255,255,0.2); color: #fff; }

.rd-facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 4px 0 18px; }
.rd-fact { background: var(--tint-green); border-radius: 14px; padding: 12px 15px; }
.rd-fact .k { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--green); }
.rd-fact .v { font-size: 14.5px; color: #14201b; margin-top: 3px; font-weight: 600; }

.rd-foot-nav { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.rd-section { margin: 26px 0; }
.rd-section > h2 { font-size: 1.3rem; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.rd-body { line-height: 1.75; color: #25302b; max-width: 75ch; }
.rd-body p { margin: 0 0 13px; }

/* Team */
.rs-team-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rs-member { display: flex; gap: 13px; align-items: flex-start; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
a.rs-member:hover { box-shadow: 0 8px 22px rgba(49,46,158,0.12); }
.rs-member .rs-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--tint-green); display: grid; place-items: center; font-weight: 800; color: var(--green-dark); font-size: 19px; }
.rs-member .rs-m-name { font-weight: 800; color: #14201b; }
.rs-member .rs-m-role { font-size: 12.5px; color: var(--green); font-weight: 700; }
.rs-member .rs-m-aff { font-size: 12.5px; color: var(--muted); }
.rs-member .rs-m-bio { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* Outputs */
.rs-output-list { display: grid; gap: 10px; }
.rs-out { display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.rs-out .rs-out-ic { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.rs-out .rs-out-title { font-weight: 700; color: #14201b; }
.rs-out .rs-out-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rs-out .rs-out-desc { font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.rs-out .rs-out-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rs-out-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 9px; background: var(--tint-green); color: var(--green-dark); text-decoration: none; }
.rs-out-btn:hover { filter: brightness(0.97); }
.rs-type-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--green); }

/* Funding */
.rs-fund-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.rs-fund-note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.rs-fund-bar { height: 12px; border-radius: 999px; background: #eceaf8; overflow: hidden; margin: 4px 0 6px; }
.rs-fund-bar > span { display: block; height: 100%; background: var(--grad-green); border-radius: 999px; }
.rs-fund-prog { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.rs-fund-prog strong { color: var(--green-dark); }
.rs-fund-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rs-fund-table th { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rs-fund-table td { padding: 9px 8px; border-bottom: 1px solid #f1f3f8; }
.rs-fund-table td.amt { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-fund-table tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: none; }

/* Custom sections */
.rs-quote { font-size: 1.3rem; line-height: 1.5; font-weight: 600; color: var(--green-dark); border-inline-start: 4px solid var(--green); padding: 6px 0 6px 18px; margin: 0; max-width: 70ch; }
.rs-highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.rs-highlights li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.55; }
.rs-highlights li::before { content: "✓"; color: var(--green); font-weight: 800; flex: 0 0 auto; }
.rs-faq { display: grid; gap: 8px; }
.rs-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 15px; }
.rs-faq summary { font-weight: 700; cursor: pointer; color: #14201b; }
.rs-faq p { margin: 9px 0 2px; color: var(--muted); line-height: 1.6; }
.rs-timeline { position: relative; margin: 0; padding: 0 0 0 22px; border-inline-start: 2px solid var(--tint-green); display: grid; gap: 16px; }
.rs-timeline li { list-style: none; position: relative; }
.rs-timeline li::before { content: ""; position: absolute; inset-inline-start: -28px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--tint-green); }
.rs-timeline .rs-tl-date { font-size: 12px; font-weight: 800; color: var(--green); }
.rs-timeline .rs-tl-label { color: #25302b; line-height: 1.5; }
.rs-statcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }
.rs-statcards .rs-sc { background: var(--tint-green); border-radius: 14px; padding: 16px; text-align: center; }
.rs-statcards .rs-sc .v { font-size: 1.7rem; font-weight: 800; color: var(--green-dark); line-height: 1; }
.rs-statcards .rs-sc .l { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.rs-links { display: flex; flex-wrap: wrap; gap: 10px; }
.rs-embed { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.rs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Custom admin ───────────────────────────────────────────────────────── */
.radm-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 8px 0 18px; }
.radm-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.radm-stat .num { font-size: 1.6rem; font-weight: 800; color: var(--green-dark); line-height: 1; }
.radm-stat .lbl { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.radm-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.radm-panel > strong { display: block; margin-bottom: 4px; font-size: 15px; }
.radm-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 10px; }
.radm-grid .col-full { grid-column: 1 / -1; }
.radm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; border-bottom: 1px solid var(--line); }
.radm-tabs a { padding: 8px 15px; border-radius: 10px 10px 0 0; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); text-transform: capitalize; }
.radm-tabs a.active { color: var(--green-dark); background: var(--tint-green); }
.radm-rowops { display: flex; gap: 5px; align-items: center; }
.radm-iconbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-decoration: none; font-size: 13px; color: #25302b; }
.radm-iconbtn:hover { background: var(--tint-green); }
.radm-iconbtn.danger { color: #b42318; border-color: #f3c9c4; }
.radm-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.radm-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 2px; }
