/* ===== 清源·儿童认知成长画像 — 公共样式 ===== */

/* ─── CSS Variables ─── */
:root {
  --bg: #fafaf9;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --ink-700: #374151;
  --ink-600: #4b5563;
  --ink-400: #9ca3af;
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --border: #e7e5e4;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 20px rgba(124,58,237,0.15), 0 12px 40px rgba(0,0,0,0.1);
  --radius: 16px;
  --success: #10b981;
  --gold: #d4a853;
  --gold-soft: rgba(212,168,83,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }

/* ─── Skip to Content ─── */
.skip-to-content {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 8px;
  z-index: 9999; font-weight: 600; font-size: 14px;
  transition: top 0.2s; text-decoration: none;
}
.skip-to-content:focus { top: 8px; }

/* ─── Site Navigation ─── */
.site-nav { position: sticky; top: 0; z-index: 1100; background: #fff; border-bottom: 1px solid #e5e7eb; }
.site-nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
.site-nav .brand { font-size: 18px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.site-nav .brand .brand-sub { font-size: 13px; font-weight: 500; opacity: 0.7; }

/* Responsive brand names */
.brand-short { display: none; }
.brand-full { display: inline; }
@media (max-width: 640px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
}

.site-nav .nav-links { display: flex; align-items: center; gap: 6px; }
.site-nav .nav-links a {
  font-size: 14px; color: #4b5563; text-decoration: none;
  padding: 8px 14px; min-height: 44px; display: inline-flex;
  align-items: center; border-radius: 8px;
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.site-nav .nav-links a:hover { background: #f3f4f6; color: var(--accent); }
.site-nav .nav-links a.active { color: var(--accent); font-weight: 600; background: rgba(124,58,237,0.08); }
.site-nav .nav-links a.nav-cta { background: var(--accent); color: #fff; font-weight: 600; border-radius: 8px; padding: 6px 18px; }
.site-nav .nav-links a.nav-cta:hover { background: #6d28d9; }
.site-nav .nav-links a.nav-cta.active { background: #6d28d9; color: #fff; }

.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 8px 12px; min-height: 44px; min-width: 44px; color: #4b5563; }

/* Mobile nav */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: #fff; flex-direction: column;
    padding: 8px 16px 16px; border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .site-nav .nav-links.open { display: flex; }
  .site-nav .nav-links a { padding: 12px 14px; width: 100%; min-height: 44px; }
  .site-nav .nav-links a.nav-cta { text-align: center; }
  .site-nav .nav-links .lang-switcher { margin: 8px 14px; display: inline-flex; }
}

/* Nav overlay for mobile menu */
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.35); z-index: 1099;
}
.nav-overlay.open { display: block; }

/* ─── Language Switcher ─── */
.lang-switcher { display: inline-flex; align-items: center; gap: 2px; background: #f3f4f6; border-radius: 8px; padding: 2px; font-size: 13px; }
.lang-switcher .lang-icon { font-size: 14px; padding: 0 4px 0 2px; opacity: 0.7; line-height: 1; }
.lang-switcher .lang-opt { background: transparent; border: none; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #6b7280; min-height: 28px; line-height: 1; transition: background 0.15s, color 0.15s; }
.lang-switcher .lang-opt:hover { color: var(--accent); background: rgba(124,58,237,0.06); }
.lang-switcher .lang-opt.active { background: var(--accent); color: #fff; }
.lang-switcher .lang-sep { color: #d1d5db; font-size: 12px; user-select: none; }

.lang-switcher--mobile { display: none; }
@media (max-width: 640px) {
  .lang-switcher--mobile { display: inline-flex; margin: 8px 14px; }
  .nav-actions > .lang-switcher { display: none; }
}

/* ─── NoScript Fallback ─── */
noscript .noscript-notice {
  background: #fef3c7; border: 1px solid #f59e0b;
  padding: 16px 20px; text-align: center; font-size: 14px; color: #92400e;
  margin: 0 auto; max-width: 600px;
}
noscript .noscript-notice a { color: var(--accent); text-decoration: underline; }
