@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&family=Nunito+Sans:wght@400;600&display=swap');

:root {
  --bg:       #f0f7ff;
  --surface:  #ffffff;
  --ink:      #1a1a2e;
  --ink-soft: #555577;
  --border:   #dde8f5;

  /* fun palette */
  --blue:     #3b82f6;
  --blue-lt:  #eff6ff;
  --purple:   #8b5cf6;
  --purple-lt:#f5f3ff;
  --green:    #10b981;
  --green-lt: #ecfdf5;
  --orange:   #f59e0b;
  --orange-lt:#fffbeb;
  --pink:     #ec4899;
  --pink-lt:  #fdf2f8;
  --red:      #ef4444;

  --display:  'Fredoka One', cursive;
  --body:     'Nunito', sans-serif;
  --nav-h:    64px;
  --max:      1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  height: var(--nav-h);
  display: flex; align-items: center;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--display); font-size: 1.4rem;
  color: #fff; text-decoration: none; letter-spacing: 0.5px;
}
.logo span { color: var(--orange); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 0.82rem; font-weight: 700; color: #ccc;
  text-decoration: none; padding: 6px 12px; border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── PROGRESS ── */
.progress {
  position: fixed; top: var(--nav-h); left: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  z-index: 200; width: 0; transition: width 0.08s linear;
  border-radius: 0 4px 4px 0;
}

/* ── PAGE WRAP ── */
.page-wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── CARDS GRID ── */
.cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.card {
  background: var(--surface); border-radius: 16px;
  border: 2px solid var(--border);
  text-decoration: none; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.card-emoji {
  font-size: 2.2rem; padding: 24px 20px 8px; line-height: 1;
}
.card-body { padding: 0 20px 16px; flex: 1; }
.card-num {
  font-family: var(--display); font-size: 0.7rem; letter-spacing: 1px;
  color: #bbb; margin-bottom: 5px;
}
.card h3 {
  font-family: var(--display); font-size: 1.05rem;
  color: var(--ink); margin-bottom: 6px; line-height: 1.3;
}
.card p { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; }
.card-foot {
  padding: 12px 20px; border-top: 2px dashed var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.card-foot .read { font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.card-foot .mins { font-size: 0.7rem; color: #bbb; font-weight: 600; }

/* ── ARTICLE LAYOUT ── */
.article-wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 680px 1fr; gap: 40px;
  align-items: start;
}
.article-main { padding: 32px 0 80px; min-width: 0; }
.article-sidebar { padding-top: 32px; position: sticky; top: 80px; }

/* breadcrumb */
.crumb {
  font-size: 0.78rem; color: var(--ink-soft); font-weight: 600;
  display: flex; gap: 6px; align-items: center; margin-bottom: 20px;
  flex-wrap: wrap;
}
.crumb a { text-decoration: none; color: var(--blue); }

/* article header */
.a-page-num {
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px;
}
.a-emoji { font-size: 3rem; line-height: 1; margin-bottom: 12px; display: block; }
.article-main h1 {
  font-family: var(--display); font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--ink); line-height: 1.2; margin-bottom: 16px;
}
.a-meta {
  font-size: 0.78rem; color: var(--ink-soft); font-weight: 600;
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 2px dashed var(--border);
  margin-bottom: 32px;
}
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px;
}

/* body */
.a-body { font-size: 1.02rem; line-height: 1.85; color: #222; }
.a-body h2 {
  font-family: var(--display); font-size: 1.6rem;
  color: var(--ink); margin: 40px 0 12px; line-height: 1.25;
}
.a-body h3 {
  font-family: var(--body); font-size: 1.05rem; font-weight: 800;
  color: var(--ink); margin: 28px 0 10px;
}
.a-body p { margin-bottom: 16px; }
.a-body ul, .a-body ol { padding-left: 1.4rem; margin-bottom: 16px; }
.a-body li { margin-bottom: 6px; }
.a-body strong { font-weight: 800; }

/* callout boxes */
.callout {
  border-radius: 12px; padding: 18px 22px; margin: 24px 0;
  font-weight: 600; font-size: 0.97rem;
}
.callout p { margin: 0; }
.callout.blue { background: var(--blue-lt); border-left: 4px solid var(--blue); }
.callout.green { background: var(--green-lt); border-left: 4px solid var(--green); }
.callout.orange { background: var(--orange-lt); border-left: 4px solid var(--orange); }
.callout.purple { background: var(--purple-lt); border-left: 4px solid var(--purple); }
.callout.pink { background: var(--pink-lt); border-left: 4px solid var(--pink); }

/* activity box */
.activity {
  background: var(--ink); color: white;
  border-radius: 14px; padding: 22px 26px; margin: 28px 0;
}
.activity-label {
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--orange); margin-bottom: 10px;
}
.activity p { margin: 0; font-size: 0.97rem; line-height: 1.7; color: #ddd; }

/* prompt template box */
.prompt-box {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 14px; padding: 22px 26px; margin: 20px 0;
  font-family: var(--body); font-size: 1rem; color: #e0e7ff;
  font-weight: 600; line-height: 1.6;
}
.prompt-box::before {
  content: '✨ Try This Prompt';
  display: block; font-size: 0.65rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--orange);
  margin-bottom: 8px; font-family: var(--display);
}

/* fun fact */
.fun-fact {
  background: linear-gradient(135deg, var(--orange-lt), #fff);
  border: 2px solid var(--orange); border-radius: 14px;
  padding: 18px 22px; margin: 24px 0;
}
.fun-fact-label {
  font-family: var(--display); font-size: 0.7rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--orange); margin-bottom: 8px;
}
.fun-fact p { margin: 0; font-size: 0.95rem; font-weight: 600; }

/* ── SIDEBAR ── */
.sidebar-block {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 18px;
}
.sb-head {
  background: var(--ink); color: white;
  padding: 10px 16px;
  font-family: var(--display); font-size: 0.78rem; letter-spacing: 1px;
}
.sb-body { padding: 14px 16px; }
.toc-list { list-style: none; }
.toc-list li {
  border-bottom: 1px dashed var(--border); padding: 7px 0;
  font-size: 0.83rem; font-weight: 600;
}
.toc-list li:last-child { border-bottom: none; }
.toc-list a { text-decoration: none; color: var(--ink); transition: color 0.15s; }
.toc-list a:hover { color: var(--blue); }

.related-list { list-style: none; }
.related-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 0.83rem; }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  text-decoration: none; color: var(--ink); font-weight: 700;
  transition: color 0.15s; display: flex; gap: 8px; align-items: flex-start;
}
.related-list a:hover { color: var(--blue); }
.rnum { font-size: 0.65rem; color: #bbb; padding-top: 3px; }

/* ── ARTICLE NAV ── */
.a-nav {
  display: flex; justify-content: space-between;
  padding: 24px 0; border-top: 2px dashed var(--border); margin-top: 48px;
}
.a-nav a {
  font-weight: 800; font-size: 0.88rem; text-decoration: none;
  padding: 10px 20px; border-radius: 20px; transition: opacity 0.15s;
}
.a-nav a:hover { opacity: 0.8; }
.a-nav .prev { background: var(--border); color: var(--ink); }
.a-nav .next { background: var(--blue); color: white; }

/* ── SECTION TITLE ── */
.section-title {
  font-family: var(--display); font-size: 1.6rem; color: var(--ink);
  margin-bottom: 24px; display: flex; align-items: center; gap: 12px;
}

/* ── FOOTER ── */
.footer {
  background: var(--ink); color: #888;
  padding: 48px 24px 24px; margin-top: 64px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-brand .logo { display: block; margin-bottom: 10px; }
.footer-brand p { font-size: 0.82rem; color: #666; max-width: 220px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--display); font-size: 0.85rem; color: var(--orange);
  margin-bottom: 12px; letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { font-size: 0.82rem; color: #666; text-decoration: none; font-weight: 600; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding-top: 20px;
  border-top: 1px solid #222; font-size: 0.75rem; color: #444;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ── FAQ ── */
.faq-item { border-bottom: 2px dashed var(--border); }
.faq-q {
  padding: 16px 0; font-weight: 800; font-size: 0.97rem;
  cursor: pointer; display: flex; justify-content: space-between;
}
.faq-q::after { content: '➕'; font-size: 1rem; }
.faq-q.open::after { content: '➖'; }
.faq-a { display: none; padding-bottom: 16px; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.75; }
.faq-a.open { display: block; }

/* ── PROMPT LIST ── */
.prompt-list { list-style: none; padding: 0; }
.prompt-list li {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 10px;
  font-weight: 600; font-size: 0.92rem;
  display: flex; gap: 12px; align-items: flex-start;
}
.prompt-list .pnum {
  background: var(--blue); color: white; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center;
  justify-content: center; font-size: 0.72rem; font-weight: 800;
  flex-shrink: 0; margin-top: 1px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeUp 0.5s ease both; }
.fade-in-2 { animation: fadeUp 0.5s 0.1s ease both; }
