/* =========================================================
   Daily Discovery - styles.css
   Clean repair base
   Full replacement CSS
   ========================================================= */


/* 1. Global Reset */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 145px;
}

body {
  font-family: Arial, sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 30%),
    linear-gradient(135deg, #0f172a, #111827);
}


/* 2. Fixed Header / Navigation */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(248, 250, 252, 0.12);
}

.site-header .brand,
.site-header .main-nav {
  gap: 7px;
  justify-content: center;
  max-width: 1180px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.brand h1 {
  margin: 0;
  color: #fbbf24;
  font-size: 30px;
}

.brand p {
  margin: 3px 0 8px;
  color: #cbd5e1;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.main-nav a {
  color: #f8fafc;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.main-nav a:hover {
  transform: translateY(-2px);
  background: #fbbf24;
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(251, 191, 36, 0.18);
}


/* 3. Smooth Scroll Targets */

section,
.card,
.wide-card,
.landmark-card,
.tomorrow-card,
.whats-new-card,
.how-to-card,
.distribution-card {
  scroll-margin-top: 145px;
}

/* 4. Main Page Layout */

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 135px 0 50px;
}


/* 5. Hero Section */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-content,
.hero-card,
.card,
.wide-card,
.landmark-card,
.tomorrow-card {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.hero-content {
  padding: 42px;
}

.hero-content h2 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  margin: 12px 0 18px;
}

.hero-content p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
}

.daily-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
}

.daily-date-label {
  display: inline-block;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.copy-link-btn {
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: bold;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.copy-link-btn:hover {
  background: #38bdf8;
  color: #0f172a;
}

.copy-feedback {
  min-height: 22px;
  margin: -4px 0 14px !important;
  color: #86efac !important;
  font-size: 14px !important;
  font-weight: bold;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card h3 {
  font-size: 30px;
  margin: 0 0 12px;
}

.hero-card p {
  color: #cbd5e1;
  font-size: 18px;
}


/* 6. Tomorrow's Discovery Teaser */

.tomorrow-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  margin-bottom: 34px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(56, 189, 248, 0.12)),
    rgba(30, 41, 59, 0.92);
}

.tomorrow-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.tomorrow-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.tomorrow-side {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.tomorrow-badge {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fde68a;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.refresh-countdown {
  min-width: 190px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(248, 250, 252, 0.14);
  text-align: right;
}

.refresh-countdown span {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.refresh-countdown strong {
  display: block;
  margin-top: 4px;
  color: #38bdf8;
  font-size: 20px;
}


/* 7. What's New Card */

.whats-new-card,
.how-to-card,
.featured-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  margin-bottom: 34px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(251, 191, 36, 0.10)),
    rgba(30, 41, 59, 0.92);
}

.whats-new-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.whats-new-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.update-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.update-list span {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.26);
  padding: 10px 12px;
  border-radius: 999px;
  color: #bae6fd;
  font-weight: bold;
}


/* 8. How To Use This Page Card */

.how-to-card,
.featured-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  margin-bottom: 34px;
}

.how-to-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.how-to-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.how-to-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: howToSteps;
  display: grid;
  gap: 10px;
}

.how-to-list li {
  counter-increment: howToSteps;
  position: relative;
  padding: 12px 14px 12px 48px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid rgba(248, 250, 252, 0.12);
  color: #e2e8f0;
  font-weight: bold;
}

.how-to-list li::before {
  content: counter(howToSteps);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbbf24;
  color: #0f172a;
  font-size: 13px;
  font-weight: bold;
}


/* 9. Today's Featured Summary */

.featured-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  margin-bottom: 34px;
  background:
    linear-gradient(135deg, rgba(134, 239, 172, 0.14), rgba(56, 189, 248, 0.12)),
    rgba(30, 41, 59, 0.92);
  border-color: rgba(134, 239, 172, 0.22);
  overflow-wrap: anywhere;
}

.featured-summary-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.featured-summary-card p {
  max-width: 100%;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.summary-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.summary-pill-list span {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(134, 239, 172, 0.24);
  padding: 10px 12px;
  border-radius: 999px;
  color: #bbf7d0;
  font-weight: bold;
}


/* 10. Card Hover Polish */

.card:hover,
.wide-card:hover,
.landmark-card:hover,
.tomorrow-card:hover,
.distribution-card:hover,
.whats-new-card:hover,
.how-to-card:hover,
.featured-summary-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.36);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  background: rgba(35, 48, 68, 0.96);
}

@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .hero-card,
  .card,
  .wide-card,
  .landmark-card,
  .tomorrow-card,
  .distribution-card,
  .whats-new-card,
  .how-to-card,
  .featured-summary-card {
    transition: none;
  }

  .card:hover,
  .wide-card:hover,
  .landmark-card:hover,
  .tomorrow-card:hover,
  .distribution-card:hover,
  .whats-new-card:hover,
  .how-to-card:hover,
  .featured-summary-card:hover,
  .btn:hover,
  .small-btn:hover,
  .copy-link-btn:hover,
  .distribution-link:hover,
  .back-to-top:hover,
  .difficulty-btn:hover,
  .main-nav a:hover {
    transform: none;
  }
}


/* 11. Labels, Buttons, and Status Badges */

.eyebrow,
.label {
  display: inline-block;
  color: #fbbf24;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.status-badge {
  display: block;
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.coming-soon-card {
  position: relative;
}

.coming-soon-card p {
  color: #dbeafe;
}

.btn,
.small-btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  border-radius: 999px;
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.btn {
  padding: 13px 18px;
}

.primary {
  background: #fbbf24;
  color: #0f172a;
}

.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.small-btn {
  background: #38bdf8;
  color: #0f172a;
  padding: 10px 14px;
  margin-top: 0;
}

.secondary-small {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.btn:hover,
.small-btn:hover,
.copy-link-btn:hover,
.distribution-link:hover,
.back-to-top:hover,
.difficulty-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.btn:active,
.small-btn:active,
.copy-link-btn:active,
.distribution-link:active,
.back-to-top:active,
.difficulty-btn:active {
  transform: translateY(0);
}


/* 12. Keyboard Focus Polish */

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.78);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.10);
}

.main-nav a:focus-visible,
.btn:focus-visible,
.small-btn:focus-visible,
.copy-link-btn:focus-visible,
.distribution-link:focus-visible,
.back-to-top:focus-visible,
.difficulty-btn:focus-visible {
  background: rgba(251, 191, 36, 0.88);
  color: #0f172a;
}

.answer-input:focus-visible {
  border-color: rgba(251, 191, 36, 0.78);
}


/* 13. Section Intro */

.section-intro {
  position: relative;
  margin: 30px 0 18px;
  padding-left: 16px;
}

.section-intro::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: calc(100% - 8px);
  min-height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24, rgba(56, 189, 248, 0.65));
}

.section-intro h2 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.section-intro p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.5;
}


/* 14. Cards and Grids */

/* 15. Content Card Polish */

.card,
.wide-card,
.landmark-card {
  position: relative;
  overflow: hidden;
}

.card::before,
.wide-card::before,
.landmark-card::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.85), rgba(56, 189, 248, 0.45));
  opacity: 0.75;
}

.card .label,
.wide-card .label,
.landmark-card .label {
  margin-bottom: 10px;
}

.card h3,
.wide-card h3,
.landmark-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.card p,
.wide-card p,
.landmark-card p {
  line-height: 1.62;
}

.card p:last-child,
.wide-card p:last-child,
.landmark-card p:last-child {
  margin-bottom: 0;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}

.two-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.wide-card {
  padding: 24px;
}

.card {
  min-height: 210px;
}

.card h3,
.wide-card h3,
.landmark-card h3 {
  margin: 12px 0 10px;
  font-size: 23px;
  line-height: 1.15;
}

.card p,
.wide-card p,
.landmark-card p {
  color: #cbd5e1;
  line-height: 1.55;
}

.wide-card {
  margin-bottom: 22px;
}


/* 16. Landmark Section */

.landmark-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  padding: 24px;
  margin-bottom: 22px;
}

.landmark-image {
  position: relative;
  min-height: 250px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(56, 189, 248, 0.16)),
    #0f172a;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(248, 250, 252, 0.35);
  overflow: hidden;
}

.landmark-image img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  display: block;
}

.landmark-image.missing-image img {
  display: none;
}

.landmark-image:not(.missing-image) .image-placeholder-text {
  display: none;
}

.image-placeholder-text {
  color: #f8fafc;
  font-weight: bold;
}

.did-you-know {
  background: rgba(251, 191, 36, 0.12);
  border-left: 4px solid #fbbf24;
  padding: 12px;
  border-radius: 12px;
}


/* 17. Logic Challenge */

.difficulty-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.difficulty-btn {
  border: 1px solid rgba(248, 250, 252, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.difficulty-btn.active,
.difficulty-btn:hover {
  background: #fbbf24;
  color: #0f172a;
}

.challenge-level {
  color: #38bdf8 !important;
  font-weight: bold;
  margin-bottom: 8px;
}

.answer-label {
  display: block;
  margin: 16px 0 8px;
  color: #fbbf24;
  font-weight: bold;
}

.answer-input {
  width: 100%;
  max-width: 460px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 16px;
  outline: none;
}

.answer-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.logic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.feedback {
  min-height: 24px;
  font-weight: bold;
}

.feedback.correct {
  color: #86efac !important;
}

.feedback.try-again {
  color: #fbbf24 !important;
}

.answer {
  display: none;
  margin-top: 12px;
  color: #fbbf24 !important;
  font-weight: bold;
}

.answer.show {
  display: block;
}


/* 18. Daily Archive Placeholder */

.archive-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.archive-preview span {
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.22);
  padding: 10px 12px;
  border-radius: 999px;
  color: #fde68a;
  font-weight: bold;
}


/* 19. Community Section */

.community-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.community-list span {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 999px;
  color: #f8fafc;
}


/* 20. Legacy button card styles - unused */

.distribution-card,
.whats-new-card,
.how-to-card,
.featured-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 24px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(15, 23, 42, 0.92)),
    rgba(30, 41, 59, 0.92);
}

.distribution-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.distribution-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.distribution-link {
  flex: 0 0 auto;
  color: #0f172a;
  text-decoration: none;
  background: #fbbf24;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.distribution-link:hover {
  background: #fde68a;
}


/* 21. Back To Top Button */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  display: none;
  padding: 12px 16px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.95);
  color: #0f172a;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.back-to-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-to-top:hover {
  background: #fde68a;
}


/* 22. Footer */

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
  color: #94a3b8;
  text-align: center;
}

.footer-brand {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.footer-brand strong {
  color: #fbbf24;
  font-size: 20px;
}

.footer-brand span {
  color: #cbd5e1;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.footer-bottom p {
  margin: 0;
}



/* 23. Responsive Design */

@media (max-width: 1050px) {
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .hero,
  .landmark-card,
  .whats-new-card,
  .how-to-card,
  .featured-summary-card {
    grid-template-columns: 1fr;
  }

  .update-list {
    justify-content: flex-start;
  }

  .landmark-image {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .tomorrow-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .tomorrow-side {
    justify-items: start;
    width: 100%;
  }

  .tomorrow-badge {
    white-space: normal;
  }

  .refresh-countdown {
    width: 100%;
    text-align: left;
  }

  .distribution-link {
    width: 100%;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 190px;
  }

  section,
  .card,
  .wide-card,
  .landmark-card,
  .tomorrow-card,
  .whats-new-card,
  .how-to-card,
  .distribution-card {
    scroll-margin-top: 190px;
  }

  .page {
    padding-top: 180px;
  }

  .brand h1 {
    font-size: 28px;
  }

  .hero-content {
    padding: 28px;
  }

  .daily-grid,
  .two-card-grid {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    font-size: 14px;
  }

  .copy-link-btn {
    width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 13px;
    font-size: 14px;
  }
}


/* What's New Tag Cleanup */

.update-list {
  align-content: center;
}

.update-list span {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #bae6fd;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.update-list span::before {
  content: "• ";
  color: #fbbf24;
}


/* Top Nav Label Polish */

.main-nav a {
  letter-spacing: -0.01em;
}


/* Image Sorting Demo */

.image-sort-demo {
  margin-top: 16px;
}

.sort-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.sort-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.sort-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 45%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.78));
  color: #f8fafc;
  font-size: 24px;
}

.sort-info strong {
  display: block;
  margin-bottom: 2px;
  color: #f8fafc;
}

.sort-info span {
  color: #cbd5e1;
  font-size: 14px;
}

.sort-controls {
  display: flex;
  gap: 6px;
}

.sort-move-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  cursor: pointer;
  font-weight: bold;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.sort-move-btn:hover {
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.22);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.sort-move-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  transform: none;
  box-shadow: none;
}

.sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.sort-message {
  margin: 0;
  color: #cbd5e1;
  font-weight: 700;
}

.sort-message.correct {
  color: #86efac;
}

.sort-message.try-again {
  color: #fde68a;
}

@media (max-width: 620px) {
  .sort-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .sort-controls {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}


/* Image Sorting Demo Polish */

.image-sort-demo-card .sort-message {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.image-sort-demo-card .sort-message.correct {
  background: rgba(22, 101, 52, 0.18);
  border-color: rgba(134, 239, 172, 0.28);
}

.image-sort-demo-card .sort-message.try-again {
  background: rgba(113, 63, 18, 0.18);
  border-color: rgba(253, 230, 138, 0.28);
}

.image-sort-demo-card .sort-actions .small-btn {
  min-width: 120px;
  justify-content: center;
}

.sort-info strong {
  line-height: 1.15;
}

.sort-info span {
  display: inline-block;
  margin-top: 2px;
}

.sort-move-btn {
  display: grid;
  place-items: center;
}


/* Image Sort Row Layout Fix */

.sort-item {
  grid-template-columns: 54px minmax(120px, 1fr) 84px;
  column-gap: 14px;
}

.sort-info {
  min-width: 0;
  padding-right: 8px;
}

.sort-info strong {
  overflow-wrap: anywhere;
}

.sort-info span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
}

.sort-controls {
  justify-content: flex-end;
  min-width: 78px;
}

@media (max-width: 620px) {
  .sort-item {
    grid-template-columns: 54px minmax(0, 1fr);
    row-gap: 10px;
  }

  .sort-controls {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 2px;
  }
}

@media (min-width: 760px) {
  .image-sort-demo-card {
    min-width: 320px;
  }
}


/* Responsive Image Sort Card Fix */

.image-sort-demo-card {
  grid-column: span 2;
  overflow: visible;
}

.image-sort-demo-card .sort-items {
  max-width: 100%;
}

.image-sort-demo-card .sort-item {
  grid-template-columns: 54px minmax(0, 1fr);
  row-gap: 10px;
  column-gap: 14px;
  align-items: center;
}

.image-sort-demo-card .sort-info {
  min-width: 0;
  padding-right: 0;
}

.image-sort-demo-card .sort-info strong {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.image-sort-demo-card .sort-info span {
  display: block;
  margin-top: 4px;
}

.image-sort-demo-card .sort-controls {
  grid-column: 2;
  justify-content: flex-start;
  min-width: 0;
  margin-top: 0;
}

.image-sort-demo-card .sort-move-btn {
  flex: 0 0 auto;
}

@media (min-width: 980px) {
  .image-sort-demo-card .sort-item {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .image-sort-demo-card .sort-controls {
    grid-column: auto;
    justify-content: flex-end;
    min-width: 78px;
  }
}

@media (max-width: 900px) {
  .image-sort-demo-card {
    grid-column: 1 / -1;
  }
}


/* Daily Puzzle Answer Layout */
.daily-puzzle-answer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(251, 191, 36, 0.22);
}

.daily-puzzle-answer label {
  display: block;
  margin-bottom: 8px;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-puzzle-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.daily-puzzle-row input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  padding: 12px 13px;
  font: inherit;
  outline: none;
}

.daily-puzzle-row input::placeholder {
  color: rgba(226, 232, 240, 0.62);
}

.daily-puzzle-row input:focus {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.daily-puzzle-row button {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #111827;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.daily-puzzle-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(251, 191, 36, 0.18);
}

.daily-puzzle-result {
  min-height: 22px;
  margin: 12px 0 0;
  font-weight: 700;
}

.daily-puzzle-result.correct {
  color: #86efac;
}

.daily-puzzle-result.incorrect {
  color: #fde68a;
}

@media (max-width: 620px) {
  .daily-puzzle-row button {
    width: 100%;
    padding: 12px 16px;
  }
}


/* =========================================================
   Daily card natural-height cleanup
   ========================================================= */

.daily-grid {
  align-items: start;
  grid-auto-rows: auto;
}

.daily-grid > .card {
  align-self: start;
  height: auto;
  min-height: 0;
}

.daily-grid > .card p {
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .daily-grid > .card {
    min-height: 0;
  }
}


/* =========================================================
   Public footer cleanup
   ========================================================= */

.footer-bottom {
  gap: 8px;
}

.footer-bottom p {
  line-height: 1.5;
}



/* =========================================================
   Logic card size cleanup
   ========================================================= */

.logic-section-grid {
  display: grid;
  grid-template-columns: minmax(280px, 560px);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.logic-section-grid .logic-card {
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: start;
}

.logic-card .answer-input {
  max-width: 100%;
}

.logic-card .feedback {
  min-height: 0;
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .logic-section-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Placeholder card repair
   ========================================================= */

.daily-grid {
  align-items: start;
  grid-auto-rows: auto;
}

.daily-grid > .card {
  align-self: start;
  height: auto;
  min-height: 0;
}

.image-sort-demo-card {
  grid-column: span 2;
  min-width: 0;
}

.two-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.logic-card {
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: start;
}

.logic-card .answer-input {
  max-width: 100%;
}

.logic-card .feedback {
  min-height: 0;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .image-sort-demo-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .two-card-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Card layout repair
   ========================================================= */

.feature-layout {
  display: grid;
  gap: 20px;
  margin-bottom: 22px;
  align-items: start;
}

.image-feature-layout,
.puzzle-feature-layout {
  grid-template-columns: 1fr;
}

.image-sort-feature-card,
.logic-feature-card {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  min-height: 0;
  height: auto;
  grid-column: auto !important;
}

.logic-feature-card {
  max-width: 560px;
}

.planned-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.planned-card-grid > .card {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.image-planned-grid,
.puzzle-planned-grid {
  margin-bottom: 0;
}

.logic-feature-card .answer-input {
  max-width: 100%;
}

.logic-feature-card .feedback {
  min-height: 0;
  margin-bottom: 0;
}

.logic-feature-card {
  padding-top: 28px;
  padding-bottom: 28px;
}

.logic-feature-card h3 {
  margin-bottom: 12px;
}

.logic-feature-card .difficulty-buttons {
  margin-bottom: 14px;
}

.logic-feature-card .answer-input {
  margin-top: 8px;
}

.logic-feature-card .button-row {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .planned-card-grid {
    grid-template-columns: 1fr;
  }

  .image-sort-feature-card,
  .logic-feature-card {
    max-width: 100%;
  }
}


/* =========================================================
   Image section column layout
   ========================================================= */

.image-board-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(360px, 1.35fr) minmax(190px, 0.85fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.image-board-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: start;
}

.image-board-card {
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
}

.image-card-sort,
.image-card-center,
.image-card-spot,
.image-card-rebuild,
.image-card-memory,
.image-card-extra {
  max-width: none !important;
}

.image-board-layout .image-sort-demo-card {
  min-width: 0;
  overflow: hidden;
}

.image-board-layout .sort-item {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.image-board-layout .sort-controls {
  grid-column: auto;
  justify-content: flex-end;
}

.image-board-layout .sort-message {
  font-size: 0.95rem;
}

@media (max-width: 1050px) {
  .image-board-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-board-center {
    grid-column: 1 / -1;
    order: 1;
  }

  .image-board-left {
    order: 2;
  }

  .image-board-right {
    order: 3;
  }
}

@media (max-width: 680px) {
  .image-board-layout {
    grid-template-columns: 1fr;
  }

  .image-board-layout .sort-item {
    grid-template-columns: 54px minmax(0, 1fr);
    row-gap: 10px;
  }

  .image-board-layout .sort-controls {
    grid-column: 2;
    justify-content: flex-start;
  }
}


/* =========================================================
   Daily info card height match
   ========================================================= */

.daily-pick-info-card {
  min-height: 185px;
  display: flex;
  flex-direction: column;
}

.daily-pick-info-card p {
  margin-bottom: 0;
}

@media (max-width: 1050px) {
  .daily-pick-info-card {
    min-height: 0;
  }
}


/* =========================================================
   Clean Repair 1 - Layout Safety Overrides
   Keeps the navbar unchanged and preserves all placeholder cards.
   ========================================================= */

.daily-grid {
  grid-template-columns: minmax(260px, 1.15fr) repeat(3, minmax(0, 1fr));
  align-items: start;
}

.daily-grid > #puzzles {
  align-self: start;
}

.daily-pick-info-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.daily-pick-info-card p {
  margin-top: 0;
}

.image-board-layout {
  grid-template-columns: minmax(210px, 0.9fr) minmax(350px, 1.3fr) minmax(210px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.image-board-column {
  gap: 14px;
  align-self: start;
  order: 0;
}

.image-board-left {
  grid-column: 1;
}

.image-board-center {
  grid-column: 2;
}

.image-board-right {
  grid-column: 3;
}

.image-board-card {
  margin: 0;
}

@media (max-width: 1050px) {
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .image-board-layout {
    grid-template-columns: 1fr;
  }

  .image-board-left,
  .image-board-center,
  .image-board-right {
    grid-column: auto;
  }

  .image-board-center {
    order: 1;
  }

  .image-board-left {
    order: 2;
  }

  .image-board-right {
    order: 3;
  }
}

@media (max-width: 620px) {
  .daily-grid {
    grid-template-columns: 1fr;
  }

  .daily-pick-info-card {
    min-height: 0;
  }
}


/* =========================================================
   Clean Repair 4 - Center selected card titles
   ========================================================= */

.image-board-card h3,
.puzzle-planned-grid > .card h3,
.logic-feature-card h3 {
  text-align: center;
}


/* =========================================================
   Clean Repair 5 - Center Today's Daily Picks heading
   ========================================================= */

main > .section-intro:first-of-type {
  width: 100%;
  max-width: 100%;
  margin: 30px auto 20px;
  padding-left: 0;
  text-align: center;
}

main > .section-intro:first-of-type::before {
  display: none;
}

main > .section-intro:first-of-type p {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}


/* =========================================================
   Daily Crossword - Phase 1
   ========================================================= */

.crossword-card {
  min-height: 0;
}

.crossword-card h3,
.crossword-instructions {
  text-align: center;
}

.crossword-board {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.crossword-cell {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.crossword-cell.empty {
  color: rgba(248, 250, 252, 0.25);
}

.crossword-clue {
  margin: 10px 0 12px;
}

.crossword-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.crossword-card .feedback {
  min-height: 0;
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .crossword-cell {
    width: 34px;
    height: 34px;
  }
}


/* =========================================================
   Daily Crossword - Two Mini Crosswords
   ========================================================= */

.mini-crossword-card {
  min-height: 0;
}

.mini-crossword-card h3,
.mini-crossword-card .crossword-instructions {
  text-align: center;
}

.mini-crossword-card .crossword-board {
  margin-top: 16px;
}

.mini-crossword-card .answer-input {
  max-width: 100%;
}


/* =========================================================
   Puzzle Section Layout Fix
   Crosswords on top, planned puzzle cards underneath.
   ========================================================= */

.puzzle-card-stack {
  display: grid;
  gap: 18px;
}

.crossword-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.puzzle-planned-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 380px));
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}

.puzzle-small-card {
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.puzzle-small-card h3 {
  text-align: center;
}

@media (max-width: 860px) {
  .crossword-card-row,
  .puzzle-planned-row {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Three Mini Crosswords
   ========================================================= */

.crossword-card-row {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.crossword-card-row .mini-crossword-card {
  min-width: 0;
}

@media (max-width: 1180px) {
  .crossword-card-row {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 860px) {
  .crossword-card-row {
    grid-template-columns: 1fr;
  }
}
