:root {
  color-scheme: light;
  --raj-pink: #be123c;
  --raj-royal: #1e3a8a;
  --raj-sand: #fdfbf7;
  --raj-stone: #78350f;
  --raj-gold: #d4af37;
  --text: #1f2937;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --btn-primary: #4F46E5;
  --btn-primary-hover: #4338CA;
  --btn-secondary: #0F766E;
  --btn-secondary-hover: #0D6B63;
  --btn-radius: 0.75rem;
}

/* ==========================================================
   Unified Button System — WCAG AA Compliant
   All buttons use high-contrast text on deep backgrounds
   with consistent padding, radius, and smooth transitions.
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
/* Primary — Indigo #4F46E5 with white text, contrast ratio ~8.6:1 */
.btn-primary {
  background-color: var(--btn-primary);
  color: #FFFFFF;
  border-color: var(--btn-primary);
}
.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
/* Secondary — Slate Teal #0F766E with white text, contrast ratio ~7.2:1 */
.btn-secondary {
  background-color: var(--btn-secondary);
  color: #FFFFFF;
  border-color: var(--btn-secondary);
}
.btn-secondary:hover {
  background-color: var(--btn-secondary-hover);
  border-color: var(--btn-secondary-hover);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
}
/* Outline — transparent background with Indigo border/text */
.btn-outline {
  background-color: transparent;
  color: var(--btn-primary);
  border-color: var(--btn-primary);
}
.btn-outline:hover {
  background-color: var(--btn-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
/* Outline Teal variant */
.btn-outline-teal {
  background-color: transparent;
  color: var(--btn-secondary);
  border-color: var(--btn-secondary);
}
.btn-outline-teal:hover {
  background-color: var(--btn-secondary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
}
/* Ghost — no border, subtle hover background */
.btn-ghost {
  background-color: transparent;
  color: var(--text);
  border-color: transparent;
}
.btn-ghost:hover {
  background-color: rgba(79, 70, 229, 0.08);
  color: var(--btn-primary);
}
/* Accent — Rose for destructive/highlight actions */
.btn-accent {
  background-color: #E11D48;
  color: #FFFFFF;
  border-color: #E11D48;
}
.btn-accent:hover {
  background-color: #BE123C;
  border-color: #BE123C;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}
/* Size variants */
.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: calc(var(--btn-radius) - 2px);
}
.btn-lg {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  border-radius: calc(var(--btn-radius) + 2px);
}
/* Pill shape variant */
.btn-pill {
  border-radius: 9999px;
}


body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--raj-sand);
  color: var(--text);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.section-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  border: 1px solid var(--border);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.article-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.article-card .category-pill {
  background: rgba(190, 18, 60, 0.08);
  color: var(--raj-pink);
  border: 1px solid rgba(190, 18, 60, 0.16);
}

.prose h2,
.prose h3 {
  color: var(--raj-royal);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p,
.prose li {
  color: #374151;
  line-height: 1.8;
  margin-bottom: 0.9rem;
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.hero-accent {
  background: linear-gradient(90deg, rgba(190, 18, 60, 0.12), rgba(30, 58, 138, 0.12));
}

.footer-link:hover {
  color: #fff;
}

.qr-form-panel,
.qr-preview-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.qr-preview-frame {
  min-height: 340px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qr-preview-frame:hover {
  border-color: rgba(190, 18, 60, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-placeholder-icon {
  width: 92px;
  height: 92px;
  opacity: 0.88;
}

.qr-placeholder-icon svg {
  width: 100%;
  height: 100%;
}

#qr-preview canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
}

.download-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.download-enabled {
  opacity: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  .qr-preview-frame {
    min-height: 280px;
  }
}

/* ==========================================================
   AdSense — CLS-safe ad containers
   Fixed min-heights reserve layout space before the ad script
   loads, so units never cause a Cumulative Layout Shift.
   ========================================================== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 1.5rem auto;
  background: #f8f8f8;
  border: 1px solid var(--border);
  contain: layout;
}

.ad-slot .adsbygoogle {
  width: 100%;
}

.ad-slot--relaxed {
  min-height: 250px;
}

.ad-slot--in-article {
  min-height: 280px;
  max-width: 800px;
}

.ad-slot--auto {
  min-height: 250px;
}

.ad-slot--anchor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  min-height: 60px;
  margin: 0;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  border-left: none;
  border-right: none;
  border-bottom: none;
  display: none; /* shown only on mobile, see media query below */
}

@media (max-width: 767px) {
  .ad-slot--anchor {
    display: flex;
  }
  /* reserve space at the bottom of the viewport so the anchor
     ad never covers footer/CTA content */
  body {
    padding-bottom: 60px;
  }
}
