/* ============================================================
   PIPAC 全球联盟 — 专业版样式 v2
   设计理念：简洁 · 大气 · 专业医学平台感
   配色参考：Primer / Ant Design / Tailwind 语义化色板
   零依赖纯 CSS，保持所有原有 class 名不变
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* 基础色板 */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a1f36;
  --ink-soft: #4b5563;
  --muted: #8896a4;
  --line: #e5e7eb;

  /* 品牌色 — 深海蓝主色调，传达专业与信赖 */
  --primary: #1b5ebc;
  --primary-dark: #12409a;
  --primary-50: #eff4ff;
  --primary-100: #dce9ff;
  --primary-200: #bacdff;
  --primary-600: #1847a0;

  /* 强调色 — 青蓝，用于研究与数据 */
  --accent: #0891a2;
  --accent-50: #e6f7f9;
  --accent-100: #cceff2;
  --accent-600: #06707d;

  /* 语义色 */
  --warn: #c47d00;
  --warn-50: #fff8e6;
  --danger: #dc3545;
  --danger-50: #fef2f2;
  --success: #0e9f6e;
  --success-50: #ecfdf5;

  /* 圆角体系 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 阴影 — 多层次，从极轻到中强 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.12);

  /* 布局 */
  --maxw: 1180px;
  --font: -apple-system, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;

  /* 动画 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { text-decoration: underline; color: var(--primary-dark); }
::selection { background: var(--primary-100); color: var(--primary-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header — 精简导航栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 17px; color: var(--ink);
  flex-shrink: 0;
}
.brand .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: grid; place-items: center; color: #fff;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(27,94,188,0.28);
}
.brand small {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--muted); letter-spacing: .3px; margin-top: 1px;
}
.nav-links {
  display: flex; gap: 2px; align-items: center;
}
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-size: 14px; font-weight: 500;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.nav-links a:hover {
  background: var(--primary-50);
  color: var(--primary-dark);
  text-decoration: none;
}
.nav-links a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(27,94,188,0.25);
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 11px;
  cursor: pointer; font-size: 17px; color: var(--ink-soft);
  transition: all var(--duration) var(--ease);
}
.nav-toggle:hover { background: var(--bg); border-color: var(--muted); }

/* ---------- Hero — 大气首屏 ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 800px 350px at 90% -5%, rgba(8,145,162,0.10), transparent),
    radial-gradient(ellipse 500px 250px at 10% 80%, rgba(27,94,188,0.08), transparent),
    linear-gradient(145deg, #0f3057 0%, #165ba8 45%, #1b6fd6 100%);
  color: #fff; padding: 72px 0 76px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 36px; line-height: 1.22; margin-bottom: 18px;
  font-weight: 800; letter-spacing: -0.02em;
}
.hero h1 .hl { color: #7ed8ea; }
.hero p {
  font-size: 16.5px; max-width: 680px; color: #c5d9ef;
  line-height: 1.7;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(4px);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: #e0eeff;
  transition: all var(--duration) var(--ease);
}
.badge:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.nonprofit-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: #fff;
}
.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary {
  background: #ffffff; color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.btn-primary:hover {
  background: var(--primary-50);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-ghost {
  background: rgba(255,255,255,0.08); color: #fff;
  border-color: rgba(255,255,255,0.30);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.16);
  text-decoration: none;
  border-color: rgba(255,255,255,0.48);
}
.btn-outline {
  background: var(--surface); color: var(--primary);
  border-color: var(--line);
  transition: all var(--duration) var(--ease);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

/* ---------- Stat Strip — 统计卡片 ---------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: -40px;
  position: relative; z-index: 2;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-md);
  transition: all var(--duration) var(--ease);
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.stat-card .v {
  font-size: 28px; font-weight: 800; color: var(--primary);
  line-height: 1.2; letter-spacing: -0.02em;
}
.stat-card .l {
  font-size: 13.5px; color: var(--ink); font-weight: 600;
  margin-top: 4px;
}
.stat-card .n {
  font-size: 12px; color: var(--muted); margin-top: 3px;
}

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { margin-bottom: 32px; }
.section-head .eyebrow {
  color: var(--accent); font-weight: 700; font-size: 12.5px;
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 6px;
}
.section-head h2 {
  font-size: 26px; margin: 6px 0 10px; color: var(--ink);
  font-weight: 750; letter-spacing: -0.01em;
}
.section-head p { color: var(--ink-soft); max-width: 720px; line-height: 1.65; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(to bottom, var(--primary-200), var(--line));
  border-radius: 1px;
}
.tl-item { position: relative; padding: 0 0 22px 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--primary-100);
}
.tl-item .y { font-weight: 800; color: var(--primary-dark); font-size: 14px; }
.tl-item .t { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

/* ---------- Cards Grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs);
  transition: all 0.22s var(--ease);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  opacity: 0; transition: opacity var(--duration) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-200);
}
.card:hover::before { opacity: 1; }
.card h3 {
  font-size: 16.5px; margin-bottom: 4px; color: var(--ink);
  font-weight: 700; line-height: 1.35;
}
.card .sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* Tags */
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: var(--primary-50); color: var(--primary);
  margin: 0 5px 6px 0; letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all var(--duration) var(--ease);
}
.tag.accent {
  background: var(--accent-50); color: var(--accent-600);
}
.tag.warn {
  background: var(--warn-50); color: var(--warn);
}
.tag.feat {
  background: #fff8e6; color: #b86900;
}

.card p.desc {
  font-size: 13.5px; color: var(--ink-soft); margin: 8px 0 16px;
  flex: 1; line-height: 1.62;
}

/* Spec list */
.spec-list {
  border-top: 1px dashed var(--line); margin-top: auto;
  padding-top: 14px;
}
.spec-list .row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12.8px; padding: 4px 0;
}
.spec-list .row .k { color: var(--muted); font-weight: 500; }
.spec-list .row .v { color: var(--ink); text-align: right; font-weight: 600; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-foot .updated { font-size: 11.5px; color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }

/* Card type variants */
.std-card { border-left: 4px solid var(--primary); }
.std-card::before { background: var(--primary); }
.std-card .journal { font-size: 12.5px; color: var(--muted); }
.std-card .type { font-size: 11.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }

.research-card { border-left: 4px solid var(--accent); }
.research-card::before { background: var(--accent); }
.research-card .date { font-size: 12px; color: var(--muted); font-weight: 600; }

.reg-card { border-left: 4px solid var(--warn); }
.reg-card::before { background: var(--warn); }

.card-featured {
  border: 1px solid var(--primary-200);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(27,94,188,0.05);
}
.card-featured::before { opacity: 1; }

/* ---------- Filter Bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; align-items: center; }
.filter-bar .label { font-size: 13px; color: var(--muted); margin-right: 4px; font-weight: 500; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; cursor: pointer;
  color: var(--ink-soft); font-weight: 500; transition: all var(--duration) var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(27,94,188,0.25); }

/* ---------- Update Banner ---------- */
.update-banner {
  background: var(--accent-50); border: 1px solid var(--accent-100);
  color: var(--accent-600); border-radius: var(--radius);
  padding: 12px 18px; font-size: 13.5px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-weight: 500;
}
.update-banner b { font-weight: 700; }

/* ---------- Definition Box ---------- */
.def-box {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg); padding: 26px 28px;
}
.def-box h3 { color: var(--primary-dark); margin-bottom: 10px; font-weight: 700; }
.def-box p { color: var(--ink-soft); font-size: 15.2px; line-height: 1.7; }

/* ---------- Mission Box ---------- */
.mission-box {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg); padding: 28px 30px;
}
.mission-box .eyebrow {
  color: var(--accent); font-weight: 700; font-size: 12.5px;
  letter-spacing: 1.2px; text-transform: uppercase;
}
.mission-box h3 { color: var(--primary-dark); margin: 6px 0 12px; font-size: 21px; font-weight: 750; }
.mission-box p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }

/* ---------- Footer — 深色专业底栏 ---------- */
.site-footer {
  background: linear-gradient(180deg, #0c1929 0%, #0a1525 100%);
  color: #b8c9df; padding: 44px 0 28px; margin-top: 32px;
}
.site-footer a { color: #8fb3e0; transition: color var(--duration) var(--ease); }
.site-footer a:hover { color: #cce0f7; text-decoration: none; }
.site-footer .cols {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
}
.site-footer h4 { color: #e8f0fc; font-size: 14.5px; margin-bottom: 16px; font-weight: 700; letter-spacing: 0.01em; }
.site-footer p, .site-footer li { font-size: 13px; color: #95aac8; line-height: 1.7; }
.site-footer ul { list-style: none; }
.site-footer ul li { padding: 3.5px 0; transition: padding-left var(--duration) var(--ease); }
.site-footer ul li:hover { padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px; padding-top: 20px;
  font-size: 12.5px; color: #6b83a8;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- Loading ---------- */
.loading {
  text-align: center; color: var(--muted); padding: 48px 0;
  font-size: 14px;
}

/* ---------- Search Toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 22px;
}
.search-box { position: relative; flex: 1; min-width: 260px; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  font-size: 14.5px; background: var(--surface); color: var(--ink);
  font-family: var(--font); transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-xs);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-100);
  background: #fff;
}
.dl-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.result-count { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.result-count b { color: var(--primary-dark); font-weight: 700; }

/* ---------- Downloads Page ---------- */
.dl-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.dl-card h3 { color: var(--ink); margin-bottom: 6px; font-weight: 700; }
.dl-card p { color: var(--ink-soft); font-size: 13.8px; margin-bottom: 16px; }
.dl-card .dl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.log-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.log-table th, .log-table td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.log-table th {
  color: var(--muted); font-weight: 600; background: var(--bg);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px;
}
.log-table td { color: var(--ink-soft); }
.log-table tbody tr:last-child td { border-bottom: none; }
.log-table tbody tr:hover { background: var(--primary-50); }

/* ---------- Community / Posts ---------- */
.post-item {
  display: flex; gap: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 12px;
  box-shadow: var(--shadow-xs); transition: all var(--duration) var(--ease);
  color: inherit;
}
.post-item:hover {
  text-decoration: none; box-shadow: var(--shadow-md);
  transform: translateY(-1px); border-color: var(--primary-200);
}
.post-main { flex: 1; min-width: 0; }
.post-cat {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: var(--accent-50); color: var(--accent-600);
  margin-bottom: 7px;
}
.post-title { font-size: 16px; font-weight: 650; color: var(--ink); margin-bottom: 4px; line-height: 1.4; }
.post-excerpt { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-side { text-align: center; min-width: 66px; display: flex; flex-direction: column; justify-content: center; }
.post-replies { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; }
.post-rep-label { font-size: 11px; color: var(--muted); }
.post-meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* Forms */
.form-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.form-panel h3 { margin-bottom: 16px; color: var(--ink); font-weight: 700; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px;
  font-family: var(--font); color: var(--ink); background: var(--surface);
  transition: all var(--duration) var(--ease);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.form-row textarea { resize: vertical; min-height: 90px; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg {
  display: none; background: var(--accent-50); color: var(--accent-600);
  border: 1px solid var(--accent-100); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; margin-top: 10px;
}

.thread-head {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.thread-head h1 { font-size: 24px; color: var(--ink); margin: 8px 0; font-weight: 750; }
.thread-meta { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.thread-body {
  font-size: 15px; color: var(--ink-soft); line-height: 1.8;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.comment {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 10px;
}
.comment-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.comment-head b { color: var(--primary-dark); font-weight: 600; }
.comment-head span { color: var(--muted); }
.comment-body { font-size: 14px; color: var(--ink-soft); line-height: 1.72; }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; font-weight: 500; }

/* Shared Resources */
.res-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 28px; }
.res-card .card-foot { align-items: center; }

/* Member Section */
.member-head { margin-bottom: 20px; font-size: 16px; }
.member-section {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.member-section h3 { font-size: 17.5px; margin-bottom: 16px; font-weight: 700; }
.upload-form { display: grid; gap: 12px; }
.upload-form input, .upload-form select, .upload-form textarea {
  padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.upload-form textarea { min-height: 82px; resize: vertical; }
.upload-msg { color: var(--success); font-size: 13px; margin-left: 8px; font-weight: 600; }
.up-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.up-row:last-child { border-bottom: none; }
.up-info { font-size: 15px; }
.up-actions { display: flex; gap: 8px; }
.login-prompt {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 38px; text-align: center;
}
.login-prompt h2 { margin-bottom: 12px; font-weight: 700; }
.login-prompt p { color: var(--ink-soft); margin-bottom: 20px; }

/* Auth */
.auth-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; max-width: 460px; margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tabs button {
  flex: 1; padding: 10px; border: 1.5px solid var(--line);
  background: var(--bg); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
  transition: all var(--duration) var(--ease);
}
.auth-tabs button.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.auth-form { display: grid; gap: 12px; }
.auth-form input {
  padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.auth-msg { color: var(--danger); font-size: 13px; min-height: 16px; font-weight: 500; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c0303c; }

/* Account Nav */
.acct-wrap { position: relative; display: inline-block; }
.acct-btn { color: var(--accent) !important; font-weight: 600; cursor: pointer; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 100;
  animation: fadeInUp 0.15s var(--ease);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.acct-menu a {
  display: block; padding: 10px 13px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: 14px; font-weight: 500;
  transition: all var(--duration) var(--ease);
}
.acct-menu a:hover { background: var(--primary-50); color: var(--primary-dark); }

/* Utilities */
.narrow { max-width: 840px; }
.lead { color: var(--ink-soft); font-size: 15.5px; max-width: 720px; margin: 6px auto 0; line-height: 1.68; }
.muted { color: var(--muted); font-size: 13px; }

/* Featured Partner section */
.featured-partner {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

/* Language Toggle */
.lang-toggle { display: inline-flex; align-items: center; margin-left: 4px; }
.lang-btn {
  padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--primary-dark); font-weight: 700;
  font-size: 12.5px; cursor: pointer; transition: all var(--duration) var(--ease);
  letter-spacing: 0.3px;
}
.lang-btn:hover {
  border-color: var(--primary); background: var(--primary-50);
  text-decoration: none;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 900px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero h1 { font-size: 29px; }
  .section-head h2 { font-size: 23px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 760px) {
  .form-grid2 { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
    flex-direction: column; padding: 14px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; border-radius: var(--radius-sm); }
  .nav-links a.active { box-shadow: none; }
  .nav-toggle { display: block; }
  .hero { padding: 52px 0 56px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .hero-badges { gap: 7px; }
  .badge, .nonprofit-badge { font-size: 12px; padding: 5px 11px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -24px; }
  .stat-card { padding: 16px 18px; }
  .stat-card .v { font-size: 24px; }
  .card { padding: 18px; }
  .container { padding: 0 18px; }
  .section { padding: 42px 0; }
  .section-head { margin-bottom: 24px; }
  .mission-box { padding: 22px 20px; }
  .def-box { padding: 20px 18px; }
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header, .site-footer, .toolbar, .dl-group,
  .nav-toggle, .update-banner, .hero-badges, .hero-cta { display: none !important; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .hero { background: #f0f0f0; color: #000; padding: 20px 0; }
  .hero h1 .hl { color: #000; }
}
