/* DailyBingQuiz — UX-Optimized Stylesheet */

:root {
  --primary: #2563EB;
  --primary-dark: #1E40AF;
  --accent: #6366F1;
  --success: #10B981;
  --warn: #F59E0B;
  --danger: #EF4444;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;
  --muted-light: #94A3B8;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Skip-to-content link - SR-only by default, visible on focus */
.skip-link {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  background: #0F172A;
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  white-space: nowrap;
}
.skip-link:focus {
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
}

/* Focus-visible — accessibility */
*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Headings — clear hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: 28px; font-weight: 900; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 800; }
h4 { font-size: 16px; font-weight: 700; }

p {
  margin: 0 0 var(--sp-4);
  line-height: 1.7;
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--primary-dark); }

/* Layout */
.wrap {
  max-width: 920px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
}

header {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

footer {
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--surface);
}

/* Navigation — tap-friendly */
nav { display: flex; gap: 4px; }

.nav-link {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px; /* 40px+ tap target */
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
.nav-link:hover {
  background: var(--surface);
  color: var(--text);
}
.nav-link.active {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
}

/* Buttons — 44px+ tap targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 24px;
  min-height: 44px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.btn:active {
  transform: translateY(0);
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Forms — accessibility friendly */
input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  padding: 12px 16px;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}

/* Hero image */
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
  max-height: 400px;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  transition: all 0.2s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.card-premium {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}
.card-premium:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

/* Quiz card */
.quiz-card {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
  min-height: 48px; /* tap target */
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-card:hover {
  background: var(--surface);
}

/* Ad slot */
.ad-slot {
  background: rgba(0,0,0,0.02);
  border: 1px dashed rgba(0,0,0,0.1);
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-light);
  letter-spacing: 2px;
  margin: 0;
}

/* Footer link */
.footer-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.footer-link:hover {
  color: var(--text);
  background: var(--surface);
}

/* Static box (used for content blocks) */
.static-box {
  background: #fff;
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: var(--sp-5) 0;
}

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* FAQ details */
details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 8px;
  transition: all 0.15s;
}
details summary {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
}
details summary::-webkit-details-marker {
  display: none;
}
details[open] {
  border-color: var(--primary);
}
details[open] summary {
  margin-bottom: 8px;
}
details p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Reduced motion — accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }

  header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  nav {
    flex-wrap: wrap;
    gap: 2px;
    justify-content: flex-end;
    width: 100%;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .btn {
    width: 100%;
    padding: 14px 20px;
  }

  .wrap {
    max-width: 100%;
  }
}

/* Print styles */
@media print {
  header, footer, .ad-slot, button, .skip-link, [onclick] {
    display: none !important;
  }
  .wrap {
    max-width: 100%;
    box-shadow: none;
  }
}

/* Dark mode preference (optional, can be enabled later) */
/* @media (prefers-color-scheme: dark) { ... } */
