/* ============================================================
   NGS STORE — ACCESSIBLE GLOBAL DESIGN SYSTEM (WCAG AAA/AA COMPLIANT)
   ============================================================ */
:root {
  /* Dark Theme (Default Tech Mode) - High Contrast */
  --bg-base: #0a0e17;
  --bg-surface: #101726;
  --bg-card: #141e32;
  --bg-card-hover: #192742;
  --bg-subtle: #1c2c4a;
  
  --border: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  
  /* Text colors: Minimum 4.5:1 ratio for normal text, 7:1 for AAA */
  --text-main: #ffffff;        /* 17.5:1 contrast on #141e32 (AAA) */
  --text-sub: #e2e8f0;         /* 13.8:1 contrast on #141e32 (AAA) */
  --text-muted: #cbd5e1;       /* 11.2:1 contrast on #141e32 (AAA) */
  --text-dim: #94a3b8;         /* 5.8:1 contrast on #141e32 (Passes AA 4.5:1) */

  --primary: #10b981;          /* Official NGS Emerald Green */
  --primary-hover: #34d399;
  --primary-bg: rgba(16, 185, 129, 0.16);
  --primary-text: #ecfdf5;

  --accent: #34d399;           /* 9.8:1 on #141e32 */
  --accent-hover: #6ee7b7;
  --accent-bg: #064e3b;
  --accent-text: #d1fae5;

  --warning: #fbbf24;
  --danger: #f87171;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Nirmala UI", "Hind Siliguri", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --bg-subtle: #f1f5f9;

  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --border-focus: #047857;

  /* Light mode contrast - All verified >= 4.5:1 against white/card */
  --text-main: #0f172a;        /* 16:1 on white (AAA) */
  --text-sub: #1e293b;         /* 13:1 on white (AAA) */
  --text-muted: #334155;       /* 9.5:1 on white (AAA) */
  --text-dim: #475569;         /* 5.3:1 on white (Passes AA 4.5:1) */

  --primary: #047857;          /* Rich Emerald Green (5.51:1 contrast on white - Passes AA) */
  --primary-hover: #065f46;    /* Deep Emerald (7.4:1 contrast on white - Passes AAA) */
  --primary-bg: #ecfdf5;       /* Fresh mint white */
  --primary-text: #065f46;     /* 7.4:1 contrast on #ecfdf5 */

  --accent: #047857;           /* Vibrant Emerald */
  --accent-hover: #065f46;
  --accent-bg: #d1fae5;
  --accent-text: #064e3b;

  --warning: #b45309;          /* Deep rich amber - 5.2:1 contrast against light background */
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #b91c1c;           /* Deep crimson - 5.8:1 contrast against light background */
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim) !important;
  opacity: 1 !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Focus Indicator */
:focus-visible {
  outline: 3px solid var(--border-focus) !important;
  outline-offset: 3px !important;
}

/* Skip to main content (WCAG AAA Bypass blocks) */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: #059669;
  color: #ffffff !important;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  z-index: 99999;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #eaedf1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .site-header {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.25rem;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main) !important;
  text-decoration: none !important;
  letter-spacing: -0.02em;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.site-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-logo:hover .site-logo-icon {
  transform: scale(1.08) rotate(-4deg);
}

.site-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-logo-text {
  display: inline-flex;
  align-items: center;
  white-space: nowrap !important;
}

.site-logo-text span {
  color: #10b981;
}
[data-theme="light"] .site-logo-text span {
  color: #059669;
}

.verified-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-left: 0.35rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  overflow: visible;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  list-style: none;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-sub) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.88rem;
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-main) !important;
  background: var(--bg-card);
  border-color: var(--border-light);
}

.nav-link.active {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  font-weight: 700;
}

[data-theme="light"] .nav-link {
  color: #334155 !important;
}

[data-theme="light"] .nav-link:hover {
  color: #047857 !important;
  background: #f0fdf4;
  border-color: #a7f3d0;
}

[data-theme="light"] .nav-link.active {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  font-weight: 700;
}

/* Navigation Dropdown for Future Multi-App Scaling */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: pointer;
  background: transparent;
}

.nav-dropdown-toggle .dropdown-arrow {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
}

.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown.is-open .dropdown-arrow,
.nav-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 270px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

[data-theme="light"] .nav-dropdown-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
  display: flex !important;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--text-main) !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: normal !important;
}

.nav-dropdown-link:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981 !important;
}

[data-theme="light"] .nav-dropdown-link:hover {
  background: #f8fafc;
  color: #059669 !important;
}

.nav-dropdown-link.current-app {
  background: rgba(16, 185, 129, 0.15);
  color: #059669 !important;
}

.nav-dropdown-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
}

.nav-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.nav-dropdown-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal !important;
  color: var(--text-main);
}

[data-theme="light"] .nav-dropdown-title {
  color: #0f172a;
}

.nav-dropdown-version {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Header Auth & User Profile Dropdown */
.header-auth-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 38px;
  padding: 0 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main) !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1;
}

.header-login-btn .auth-icon {
  color: #10b981;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

[data-theme="light"] .header-login-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .header-login-btn .auth-icon {
  color: #059669;
}

.header-login-btn:hover {
  background: var(--bg-card-hover, var(--bg-card));
  border-color: #10b981;
  color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.header-login-btn:hover .auth-icon {
  transform: scale(1.1);
}

[data-theme="light"] .header-login-btn:hover {
  background: #f0fdf4;
  border-color: #059669;
  color: #059669 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15);
}

.header-login-btn:active {
  transform: translateY(0);
}

.header-login-btn span {
  text-decoration: none !important;
}

/* Auth Visibility State Rules (Zero-collision toggle) */
.header-auth-wrap.is-logged-in #header-login-btn,
#header-login-btn.is-hidden {
  display: none !important;
}

.header-auth-wrap.is-logged-in #header-user-menu,
#header-user-menu.is-visible {
  display: inline-flex !important;
}

.header-auth-wrap:not(.is-logged-in) #header-user-menu:not(.is-visible) {
  display: none !important;
}

/* User Menu & Pill */
.header-user-menu {
  position: relative;
  display: none;
  align-items: center;
}

.header-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.75rem 0.28rem 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  outline: none;
}

[data-theme="light"] .header-user-pill {
  background: #ffffff;
  border-color: #e2e8f0;
}

.header-user-pill:hover,
.header-user-pill[aria-expanded="true"] {
  border-color: #10b981;
  background: var(--bg-card-hover, var(--bg-card));
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .header-user-pill:hover,
[data-theme="light"] .header-user-pill[aria-expanded="true"] {
  border-color: #059669;
  background: #f8fafc;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.15);
}

.user-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.user-pill-name {
  font-size: 0.86rem;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.header-user-pill[aria-expanded="true"] .user-pill-chevron {
  transform: rotate(180deg);
}

/* User Dropdown */
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.6rem 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

[data-theme="light"] .header-user-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.header-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.1rem;
  display: block;
}

.dropdown-user-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

[data-theme="light"] .dropdown-user-badge {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0;
}

[data-theme="light"] .dropdown-sep {
  background: #f1f5f9;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main) !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.dropdown-link:hover {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981 !important;
  padding-left: 1.15rem;
}

[data-theme="light"] .dropdown-link:hover {
  background: rgba(5, 150, 105, 0.06);
  color: #059669 !important;
}

.dropdown-link-logout {
  color: #ef4444 !important;
}

.dropdown-link-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
}

.dropdown-link-icon {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--border-focus);
}

.btn-admin-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-admin-pill:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

/* Breadcrumbs */
.breadcrumb {
  padding: 1.25rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-sub);
  text-decoration: underline;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

/* Screen reader only utility (WCAG AAA compliant) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.45rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: var(--transition);
  line-height: 1.2;
}

.btn-primary {
  background: #0369a1;
  color: #ffffff !important;
}
.btn-primary:hover {
  background: #075985;
  transform: translateY(-1px);
}

.btn-accent {
  background: #047857;
  color: #ffffff !important;
}
.btn-accent:hover {
  background: #065f46;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main) !important;
}
.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--border-focus);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  color: var(--text-sub);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand h3 {
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 360px;
  margin-bottom: 1.25rem;
}

.footer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 600;
}

.footer-col h4 {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: underline;
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-trust-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-trust-pills .trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.76rem;
}

[data-theme="light"] .footer-trust-pills .trust-badge {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}


/* ============================================================
   GLOBAL ADSENSE SLOTS & AD CONTAINERS (Zero CLS & Themed)
   ============================================================ */
.ad-slot-container {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  overflow: hidden;
  transition: var(--transition);
}

[data-theme="light"] .ad-slot-container {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ad-label {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: var(--bg-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

[data-theme="light"] .ad-label {
  background: #f1f5f9;
  color: #475569;
}

.adsense-banner, 
.adsense-post-bottom, 
.adsense-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1rem;
}

[data-theme="light"] .adsense-banner,
[data-theme="light"] .adsense-post-bottom,
[data-theme="light"] .adsense-sidebar {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.sidebar-sticky-slot .ad-label {
  margin-bottom: 0.75rem;
}

.sidebar-sticky-slot .adsense-sidebar {
  width: 100%;
  min-height: 250px;
}

/* Responsive Header Styles */
@media (max-width: 1024px) {
  .header-inner {
    height: 60px;
    padding: 0 1rem;
    gap: 0.75rem;
  }
  .site-header nav {
    overflow: visible;
  }
  .nav-links {
    gap: 0.35rem;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }
  .nav-link {
    font-size: 0.84rem;
    height: 36px;
    padding: 0 0.65rem;
    white-space: nowrap !important;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 0.6rem 0.75rem;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    overflow: visible;
    padding: 0.35rem 0;
  }
  .nav-links {
    flex-wrap: wrap !important;
    white-space: normal !important;
    gap: 0.4rem;
    padding: 0.1rem 0;
  }
  .nav-link {
    font-size: 0.85rem;
    min-height: 38px;
    height: 38px;
    padding: 0 0.75rem;
    white-space: nowrap !important;
  }
  .user-pill-name {
    display: none;
  }
  .header-user-pill {
    padding: 0.25rem;
    min-height: 38px;
  }
  .header-login-btn {
    min-height: 38px;
    padding: 0 0.9rem;
    font-size: 0.85rem;
  }
  .theme-toggle-btn {
    min-width: 38px;
    min-height: 38px;
  }
  .header-user-dropdown {
    right: -10px;
    width: 250px;
  }
}

/* ============================================================
   LEGAL, POLICY & STATIC PAGES (.legal-page-card / .ngs-page)
   ============================================================ */
.legal-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2.75rem;
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .legal-page-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.legal-page-header {
  padding-bottom: 1.4rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-page-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 0.85rem 0;
}

.legal-page-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.legal-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .legal-meta-badge {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.ngs-page {
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 0.96rem;
}

.ngs-page > p:first-of-type {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 1.35rem;
}

[data-theme="light"] .ngs-page > p:first-of-type {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.ngs-page p {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text-sub);
  margin: 0 0 1.15rem 0;
}

.ngs-page h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2.15rem 0 0.9rem 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 4px solid #10b981;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

[data-theme="light"] .ngs-page h2 {
  border-left-color: #059669;
}

.ngs-page h3 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.5rem 0 0.6rem 0;
  line-height: 1.4;
}

.ngs-page ul,
.ngs-page ol {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 1.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ngs-page ul li,
.ngs-page ol li {
  position: relative;
  padding: 0.78rem 1.15rem 0.78rem 2.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

[data-theme="light"] .ngs-page ul li,
[data-theme="light"] .ngs-page ol li {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.ngs-page ul li:hover,
.ngs-page ol li:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="light"] .ngs-page ul li:hover,
[data-theme="light"] .ngs-page ol li:hover {
  background: #f0fdf4;
  border-color: #a7f3d0;
}

.ngs-page ul li::before,
.ngs-page ol li::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 1.32rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

[data-theme="light"] .ngs-page ul li::before,
[data-theme="light"] .ngs-page ol li::before {
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.ngs-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--primary);
}

@media (max-width: 640px) {
  .legal-page-card {
    padding: 1.5rem 1.25rem;
    border-radius: 12px;
  }
  .ngs-page ul li,
  .ngs-page ol li {
    padding: 0.68rem 0.9rem 0.68rem 2.1rem;
  }
  .ngs-page ul li::before,
  .ngs-page ol li::before {
    left: 0.85rem;
    top: 1.22rem;
  }
}


