/* Shared CSS for the four sudoku-downloads pages (index, beginner, kids,
   large-print seniors). Rules here are the ones that were byte-identical
   inline in two or more of those pages; each page keeps only what differs
   from this baseline in its own <style> block. Values use the site tokens
   from tokens.css / app.css instead of the old one-off hex colours. */

.printable-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 60px;
}

.hero-left {
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.preview-placeholder {
  text-align: center;
  color: var(--ink-2);
}

.hero-right h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.3;
}

.hero-right p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 24px;
}

.controls-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.control-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  font-size: 15px;
  background: var(--surface);
  cursor: pointer;
}

.toggle-group {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.primary-cta {
  width: 100%;
  padding: 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.primary-cta:hover {
  background: color-mix(in srgb, var(--brand) 82%, #000);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.cta-note {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

.content-section {
  margin-bottom: 60px;
}

.content-section h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
}

.content-section h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 30px 0 12px;
}

.content-section p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 16px;
}

.difficulty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.card-thumbnail {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 13px;
}

.card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.download-btn {
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.download-btn:hover {
  background: color-mix(in srgb, var(--brand) 82%, #000);
  transform: translateY(-1px);
}

.secondary-btn {
  background: var(--line);
  color: var(--ink-2);
}

.secondary-btn:hover {
  background: var(--line-2);
}

ul.features-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

ul.features-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

ul.features-list li:before {
  content: "\2022";
  position: absolute;
  left: 10px;
  color: var(--brand);
  font-size: 20px;
  font-weight: bold;
}

.info-note {
  background: var(--surface-2);
  border-left: 4px solid var(--brand);
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--ink-2);
}

.sample-preview-wrapper {
  position: relative;
}

.sample-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  padding: 20px;
  line-height: 1.4;
  gap: 8px;
}

.download-section {
  border: 3px solid var(--brand);
  border-radius: var(--r-lg);
  background: var(--brand-soft);
  position: relative;
}

.download-section::before {
  content: "DOWNLOAD PUZZLES HERE";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: white;
  padding: 6px 16px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-sticky-download {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--r-lg);
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(79,70,229,0.4);
  cursor: pointer;
  animation: pulse 2s infinite;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px;
  background: var(--surface);
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.faq-question:hover {
  background: var(--surface-2);
}

.faq-question i {
  font-size: 24px;
  color: var(--brand);
  transition: transform 0.3s;
}

.faq-answer {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  display: block;
  max-height: 1000px;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer-content {
  padding: 0 20px 20px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
}

.faq-answer-content p {
  margin: 0;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  .hero-left {
    display: none;
  }

  .mobile-sticky-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-left {
    min-height: 150px;
    padding: 12px;
    order: 2;
    opacity: 0.7;
  }

  .hero-right {
    order: 1;
  }

  .controls-box {
    margin-top: 20px;
    padding: 20px;
  }

  .card-content {
    grid-template-columns: 1fr;
  }

  .printable-page {
    padding: 16px;
    padding-bottom: 100px;
  }
}
