/* ============================================================
   CodyCross Answers — Complete Design System
   Colors: deep navy #1e1b4b, violet #5b21b6, purple #6D28D9
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-navy:    #1e1b4b;
  --c-violet:  #5b21b6;
  --c-purple:  #6D28D9;
  --c-purple2: #7C3AED;
  --c-light:   #EDE9FE;
  --c-bg:      #F5F3FF;
  --c-white:   #ffffff;
  --c-text:    #1f2937;
  --c-muted:   #6b7280;
  --c-border:  #e5e7eb;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(109,40,217,.10);
  --shadow-md: 0 6px 24px rgba(109,40,217,.16);
  --shadow-lg: 0 12px 48px rgba(109,40,217,.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-purple); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--c-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--c-purple), #a855f7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(109,40,217,.4);
}
.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -.01em;
}
.site-nav a {
  color: rgba(255,255,255,.8);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .8rem;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.site-nav a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  padding: .6rem 0;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
  font-size: .83rem;
  font-family: 'Inter', sans-serif;
}
.breadcrumb a {
  color: var(--c-purple);
  font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [itemprop="name"] { color: var(--c-muted); }
.sep { color: var(--c-border); margin: 0 .1rem; }

/* ── Page hero ────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-violet) 60%, #7c3aed 100%);
  padding: 1.6rem 1.25rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative circles behind the hero text */
.page-hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -120px; right: -80px;
}
.page-hero::after {
  content: '';
  position: absolute;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  bottom: -80px; left: -40px;
}

/* Crossword dot pattern overlay */
.page-hero .hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.page-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto .45rem;
}
.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: .93rem;
  color: rgba(255,255,255,.82);
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

/* Wave divider below hero */
.hero-wave {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: -2px;
  color: var(--c-bg);
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  padding: 2rem 0 3rem;
}

/* ── Section styles ───────────────────────────────────────── */
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.3em;
  background: linear-gradient(180deg, var(--c-purple), var(--c-violet));
  border-radius: 4px;
  flex-shrink: 0;
}

.section-intro {
  font-size: .95rem;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

/* ── About / text sections ────────────────────────────────── */
.about-section {
  margin-top: 2.5rem;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.about-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 1rem;
}
.about-section p {
  font-size: .95rem;
  color: #374151;
  line-height: 1.75;
  margin-bottom: .85rem;
}
.about-section p:last-child { margin-bottom: 0; }
.about-section a { color: var(--c-purple); font-weight: 600; }
.about-section a:hover { text-decoration: underline; }

/* ── How-to steps ─────────────────────────────────────────── */
.how-section {
  margin-top: 2rem;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.how-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 1.25rem;
}
.how-steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.how-steps li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  font-size: .95rem;
  color: #374151;
  line-height: 1.65;
}
.how-steps li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--c-navy), var(--c-violet));
  color: #fff;
  border-radius: 50%;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ── FAQ section ──────────────────────────────────────────── */
.faq-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--c-border);
}
.faq-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 1.25rem;
}
.faq-item {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  margin-bottom: .75rem;
  transition: box-shadow .15s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item h3 {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--c-navy);
  margin-bottom: .4rem;
}
.faq-item p { font-size: .9rem; color: #4b5563; line-height: 1.65; }
.faq-answer {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-purple);
  letter-spacing: .04em;
}

/* ── Notice box ───────────────────────────────────────────── */
.notice {
  background: #fef9c3;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  font-size: .93rem;
  color: #78350f;
}

/* ── Parent / back link ───────────────────────────────────── */
.parent-link {
  margin: 1rem 0 1.5rem;
}
.parent-link a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--c-purple);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: .35rem .8rem;
  transition: box-shadow .15s, background .15s;
}
.parent-link a:hover {
  box-shadow: var(--shadow-sm);
  background: var(--c-light);
  text-decoration: none;
}

/* ── Navigation buttons ───────────────────────────────────── */
.puzzle-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
}
.nav-left, .nav-right { display: flex; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--c-navy), var(--c-violet));
  color: #fff;
  padding: .6rem 1.3rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.nav-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: #fff;
}

/* ── Clue / answer list ───────────────────────────────────── */
.answers-section { margin-top: 1.5rem; }
.clue-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
}
.clue-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .9rem 1.25rem;
  transition: box-shadow .12s, border-color .12s;
  flex-wrap: wrap;
}
.clue-row:hover {
  box-shadow: var(--shadow-sm);
  border-color: #c4b5fd;
}
.clue-text {
  flex: 1;
  font-size: .95rem;
  color: #374151;
  min-width: 160px;
  line-height: 1.5;
}
.clue-answer {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-purple);
  background: var(--c-light);
  border-radius: 8px;
  padding: .25rem .8rem;
  letter-spacing: .05em;
  white-space: nowrap;
  border: 1px solid #ddd6fe;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--c-navy);
  margin-top: 4rem;
  padding: 2.5rem 0 0;
  color: rgba(255,255,255,.7);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.footer-brand strong {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand p {
  font-size: .85rem;
  max-width: 280px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-links a {
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  transition: color .15s;
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy {
  background: rgba(0,0,0,.25);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.45);
}

/* ── Info cards (home) ────────────────────────────────────── */
.info-section { margin-top: 2.5rem; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.info-card {
  background: linear-gradient(135deg, var(--c-navy), var(--c-violet));
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform .15s, box-shadow .15s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.info-icon { font-size: 2.2rem; margin-bottom: .6rem; }
.info-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}
.info-card p { font-size: .87rem; color: rgba(255,255,255,.82); line-height: 1.6; }

/* ── Btn primary ──────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--c-navy), var(--c-violet));
  color: #fff;
  padding: .75rem 2rem;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  transition: opacity .15s, transform .15s;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { opacity: .88; transform: translateY(-2px); text-decoration: none; color: #fff; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .page-hero { padding: 2.5rem 1.25rem 3rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .info-grid { grid-template-columns: 1fr; }
  .clue-row { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .footer-inner { flex-direction: column; }
  .puzzle-nav { flex-direction: column; gap: .5rem; }
  .nav-left, .nav-right { justify-content: center; }
}

/* ── Language switcher ────────────────────────────────────── */
.lang-switcher-bar {
  background: var(--c-navy);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1rem 0;
}
.lang-switcher-bar .container {
  display: flex;
  align-items: center;
  gap: .75rem 1.25rem;
  flex-wrap: wrap;
}
.lang-label {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lang-flags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.lang-flag {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .3rem .65rem .3rem .45rem;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  transition: background .15s, border-color .15s, transform .12s;
}
.lang-flag img {
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.lang-name {
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.lang-flag:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
  text-decoration: none;
}
.lang-flag.lang-active {
  border-color: #7c3aed;
  background: rgba(124,58,237,.28);
}
.lang-flag.lang-active .lang-name {
  color: #c4b5fd;
  font-weight: 600;
}
@media (max-width: 600px) {
  .lang-name { display: none; }
  .lang-flag { padding: .35rem; border-radius: 5px; }
}

/* Cross-site related links */
.footer-related {
  text-align: center;
  padding: 10px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 10px;
}
.footer-related .related-label {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-right: 8px;
}
.footer-related a {
  display: inline-block;
  margin: 4px 8px;
  font-size: 0.85rem;
  color: inherit;
  opacity: 0.85;
  text-decoration: underline;
}
.footer-related a:hover { opacity: 1; }

/* ── Intro text section ─────────────────────────────────────────── */
.intro-section{background:#fff;border-bottom:1px solid #e8e4f0;padding:28px 0 24px;}
.intro-section .wrap{max-width:860px;}
.intro-lead{font-size:1.08rem;line-height:1.75;color:#1e1b4b;margin-bottom:.9rem;}
.intro-lead strong{font-weight:700;}
.intro-section p{font-size:.97rem;line-height:1.72;color:#4b5563;margin-bottom:.75rem;}
.intro-section p:last-child{margin-bottom:0;}

/* ── Home intro section (replaces big hero on home page) ──── */
.home-intro-wrap {
  background: linear-gradient(180deg,#f5f3ff 0%,#fff 100%);
  border-bottom: 1px solid #e8e4f0;
  padding: 28px 1.25rem 24px;
  text-align: center;
}
.home-intro-wrap .inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}
.home-intro-logo {
  display: block;
  margin: 0 auto 10px;
  width: 48px;
  height: 48px;
}
.home-intro-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--c-navy);
  margin: 0 0 .85rem;
  line-height: 1.2;
  text-align: center;
}
.home-intro-body p {
  font-size: .95rem;
  line-height: 1.73;
  color: #374151;
  margin-bottom: .65rem;
  text-align: left;
}
.home-intro-body p:last-child { margin-bottom: 0; }
.home-intro-body strong { font-weight: 600; color: #1e1b4b; }
.intro-updated {
  font-size: .8rem !important;
  color: #9ca3af !important;
  margin-top: .5rem !important;
  text-align: left;
}
