/* QuantTester Global Design Tokens, Navbar, Cards & Footer Shell */
:root {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --background: #f4f2f0;
  --foreground: #0c0a08;
  --card: #ffffff;
  --card-foreground: #0c0a08;
  --popover: #ffffff;
  --popover-foreground: #0c0a08;
  --primary: #0c0a08;
  --primary-foreground: #ffffff;
  --secondary: #f9f8f7;
  --secondary-foreground: #0c0a08;
  --muted: #ece9e6;
  --muted-foreground: #6d6c6b;
  --accent: #ece9e6;
  --accent-foreground: #0c0a08;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #d2cecb;
  --input: #d2cecb;
  --ring: #0c0a08;
  --emerald: #0f5132;
  --emerald-bg: #e6f4ea;
  --emerald-border: #a7f3d0;
  --emerald-text: #0f5132;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;
  --rose: #b91c1c;
  --rose-bg: #fee2e2;
  --rose-border: #fecaca;
  --rose-text: #991b1b;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --blue-text: #1e40af;
  --shadow-card: 0 1px 3px 0 rgba(12, 10, 8, 0.04);
}

html[data-theme="dark"], .dark {
  --background: #05070a;
  --foreground: #f3f4f6;
  --card: #0b0e14;
  --card-foreground: #f3f4f6;
  --popover: #0b0e14;
  --popover-foreground: #f3f4f6;
  --primary: #00f59b;
  --primary-foreground: #05070a;
  --secondary: #080b10;
  --secondary-foreground: #f3f4f6;
  --muted: #111622;
  --muted-foreground: #8b949e;
  --accent: #161d2b;
  --accent-foreground: #f3f4f6;
  --destructive: #f43f5e;
  --destructive-foreground: #fafafa;
  --border: rgba(255, 255, 255, 0.09);
  --input: rgba(255, 255, 255, 0.12);
  --ring: #00f59b;
  --emerald: #00f59b;
  --emerald-bg: rgba(0, 245, 155, 0.12);
  --emerald-border: rgba(0, 245, 155, 0.28);
  --emerald-text: #00f59b;
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.28);
  --amber-text: #fcd34d;
  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.12);
  --rose-border: rgba(244, 63, 94, 0.28);
  --rose-text: #fda4af;
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --blue-border: rgba(59, 130, 246, 0.28);
  --blue-text: #93c5fd;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* Shared Text & Button Utilities */
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }
.text-amber { color: var(--amber); }

.btn, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--accent); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover { opacity: 0.9; background: var(--primary); }

.seg-control {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: var(--muted);
  border: 1px solid var(--border);
  padding: 3px;
  gap: 4px;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
}
.seg-btn.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Navbar */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  height: 56px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) { .header-inner { padding: 0 24px; } }
@media (min-width: 1024px) { .header-inner { padding: 0 32px; } }

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--foreground);
}
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}
html[data-theme="dark"] .brand-icon, .dark .brand-icon {
  background: #09090b;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px -2px rgba(16, 185, 129, 0.3);
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-logo-dark, .theme-icon-sun { display: none; }
.brand-logo-light, .theme-icon-moon { display: block; }
html[data-theme="dark"] .brand-logo-dark, .dark .brand-logo-dark,
html[data-theme="dark"] .theme-icon-sun, .dark .theme-icon-sun { display: block; }
html[data-theme="dark"] .brand-logo-light, .dark .brand-logo-light,
html[data-theme="dark"] .theme-icon-moon, .dark .theme-icon-moon { display: none; }

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--foreground);
}
.brand-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.brand-sub {
  font-size: 10px;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  margin-top: -2px;
}
@media (max-width: 639px) { .brand-sub { display: none; } }

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 640px) { .header-controls { gap: 10px; } }

.seg-tabs {
  display: inline-flex;
  height: 32px;
  align-items: center;
  border-radius: 8px;
  background: var(--muted);
  padding: 2px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.seg-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.seg-tab-btn:hover { color: var(--foreground); }
.seg-tab-btn.active {
  background: var(--card);
  color: var(--foreground);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
@media (max-width: 900px) { #styleFilter { display: none; } }

.theme-toggle-btn {
  display: inline-flex;
  height: 32px;
  width: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle-btn:hover { background: var(--accent); }

.nav-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.nav-btn-secondary:hover { background: var(--accent); }

.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: var(--primary);
  color: var(--primary-foreground);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.nav-btn-primary:hover { opacity: 0.9; }

/* Cards & Badges */
.shadcn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-emerald { background: var(--emerald-bg); color: var(--emerald); border-color: var(--emerald-border); }
.pill-rose    { background: var(--rose-bg); color: var(--rose); border-color: var(--rose-border); }
.pill-amber   { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.pill-blue    { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }
.pill-secondary { background: var(--secondary); color: var(--muted-foreground); border-color: var(--border); }
.pill-private { background: rgba(148, 163, 184, 0.15); color: var(--muted-foreground); border-color: var(--border); }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 12.5px;
  padding-top: 48px;
  padding-bottom: 24px;
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .site-footer-inner { padding: 0 24px; } }
@media (min-width: 1024px) { .site-footer-inner { padding: 0 32px; } }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand .brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 900;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-desc {
  margin: 12px 0 14px;
  line-height: 1.6;
  font-size: 12px;
  color: var(--muted-foreground);
  max-width: 360px;
}
.footer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}
.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}
.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links-list li {
  margin-bottom: 8px;
}
.footer-links-list a, .footer-btn {
  color: var(--muted-foreground);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}
.footer-links-list a:hover, .footer-btn:hover {
  color: var(--foreground);
}
.footer-bottom-bar {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modals */
.footer-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.footer-modal-overlay.active {
  display: flex;
}
.footer-modal-dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close-btn:hover { color: var(--foreground); background: var(--muted); }
.modal-body {
  padding: 20px;
  max-height: 65vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--foreground);
}
.modal-body h3 {
  margin: 16px 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 0 0 10px; color: var(--muted-foreground); }
.modal-body p b { color: var(--foreground); }

/* FAQ Accordion */
.qf-acc { display: flex; flex-direction: column; gap: 8px; }
.qf-acc__item { border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.02); overflow: hidden; transition: border-color 0.2s ease, background 0.2s ease; }
.qf-acc__item[open] { border-color: rgba(0, 255, 136, 0.35); background: rgba(0, 255, 136, 0.03); }
.qf-acc__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--foreground); list-style: none; }
.qf-acc__q::-webkit-details-marker { display: none; }
.qf-acc__q::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--muted-foreground); border-bottom: 1.5px solid var(--muted-foreground); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease; flex: 0 0 auto; }
.qf-acc__item[open] .qf-acc__q::after { transform: rotate(-135deg) translate(-2px, -2px); }
.qf-acc__a { padding: 0 14px 13px; font-size: 12.5px; line-height: 1.7; color: var(--muted-foreground); }
.qf-acc__a p { margin: 0; }
.qf-acc__a a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(0, 255, 136, 0.35); }
.qf-acc__a a:hover { border-bottom-color: currentColor; }
html[data-theme="light"] .qf-acc__item[open] { border-color: rgba(10, 143, 86, 0.4); background: rgba(10, 143, 86, 0.04); }
html[data-theme="light"] .qf-acc__a a { color: #0a8f56; border-bottom-color: rgba(10, 143, 86, 0.4); }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  background: var(--muted);
}
.modal-action-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
