/* EAIZ — story.css */
:root {
  --bg: #ffffff; --text: #1a1a1a; --text-secondary: #555; --accent: #4f46e5;
  --accent-light: #eef2ff; --border: #e5e7eb; --card-bg: #f9fafb; --radius: 12px;
  --font-body: 'Nunito', -apple-system, sans-serif;
  --baby-color: #f472b6; --baby-bg: #fdf2f8;
  --preschool-color: #fb923c; --preschool-bg: #fff7ed;
  --kinder-color: #34d399; --kinder-bg: #ecfdf5;
  --elementary-color: #60a5fa; --elementary-bg: #eff6ff;
  --adult-color: #8b5cf6; --adult-bg: #f5f3ff;
}
.dark { --bg: #0f0f14; --text: #e5e5e5; --text-secondary: #999; --accent: #818cf8; --accent-light: #1e1b4b; --border: #2a2a35; --card-bg: #1a1a24; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.site-logo { font-size: 1.5rem; font-weight: 800; color: var(--accent); text-decoration: none; letter-spacing: 0.05em; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.dark-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer; font-size: 1rem; color: var(--text); }
.age-switcher { display: flex; gap: 0.25rem; background: var(--card-bg); border-radius: 10px; padding: 4px; overflow-x: auto; }
.age-switcher button { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; padding: 0.4rem 0.75rem; border: none; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.age-switcher button:hover { background: var(--border); }
.age-switcher button[aria-selected="true"] { color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.age-switcher button[data-level="baby"][aria-selected="true"] { background: var(--baby-color); }
.age-switcher button[data-level="preschool"][aria-selected="true"] { background: var(--preschool-color); }
.age-switcher button[data-level="kinder"][aria-selected="true"] { background: var(--kinder-color); }
.age-switcher button[data-level="elementary"][aria-selected="true"] { background: var(--elementary-color); }
.age-switcher button[data-level="adult"][aria-selected="true"] { background: var(--adult-color); }
.story { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.story-header { margin-bottom: 1.5rem; }
.story-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; }
.story-category { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.story-date { font-size: 0.85rem; color: var(--text-secondary); }
.story-byline { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem; }
.story-title { line-height: 1.2; margin-bottom: 0.5rem; display: none; }
.story-title.active { display: block; }
.story-title[data-level="baby"] { font-size: 2.5rem; }
.story-title[data-level="preschool"] { font-size: 2rem; }
.story-title[data-level="kinder"] { font-size: 1.8rem; }
.story-title[data-level="elementary"] { font-size: 1.6rem; }
.story-title[data-level="adult"] { font-size: 1.5rem; }
.story-hero { margin: 1.5rem -1.5rem; border-radius: var(--radius); overflow: hidden; }
.story-hero img { width: 100%; height: auto; display: block; }
.story-body { display: none; }
.story-body.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.story-body[data-level="baby"] { text-align: center; font-size: 2rem; font-weight: 700; line-height: 1.8; }
.baby-card { background: var(--baby-bg); border-radius: 16px; padding: 2rem; margin: 1.5rem 0; border: 3px solid var(--baby-color); }
.baby-label { font-size: 2.5rem; color: var(--baby-color); }
.story-body[data-level="preschool"] { font-size: 1.3rem; line-height: 1.8; }
.did-you-know { background: var(--preschool-bg); border-left: 4px solid var(--preschool-color); border-radius: 0 12px 12px 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.did-you-know strong { color: var(--preschool-color); }
.story-body[data-level="kinder"] { font-size: 1.15rem; line-height: 1.75; }
.story-body[data-level="kinder"] p { margin-bottom: 1.25rem; }
.story-body[data-level="kinder"] h2 { font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--kinder-color); }
.cool-fact { background: var(--kinder-bg); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.5rem 0; border: 2px solid var(--kinder-color); }
.story-body[data-level="elementary"] { font-size: 1.05rem; line-height: 1.7; }
.story-body[data-level="elementary"] p { margin-bottom: 1.1rem; }
.story-body[data-level="elementary"] h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--elementary-color); }
.think-about-it { background: var(--elementary-bg); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.5rem 0; border: 2px solid var(--elementary-color); }
.story-body[data-level="adult"] { font-size: 1rem; line-height: 1.7; }
.story-body[data-level="adult"] p { margin-bottom: 1rem; }
.story-body[data-level="adult"] h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.discussion-guide { background: var(--adult-bg); border-radius: 12px; padding: 1.5rem; margin: 2rem 0; border: 2px solid var(--adult-color); }
.discussion-guide h3 { color: var(--adult-color); margin-bottom: 1rem; }
.discussion-guide ul { padding-left: 1.5rem; }
.discussion-guide li { margin-bottom: 0.5rem; }
.references { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-secondary); }
.references li { margin-bottom: 0.5rem; }
sup a { color: var(--accent); text-decoration: none; font-weight: 600; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.hero-section { text-align: center; padding: 3rem 1.5rem 2rem; max-width: 700px; margin: 0 auto; }
.hero-section h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.2; }
.hero-section p { font-size: 1.1rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; padding: 1rem 1.5rem 4rem; max-width: 1100px; margin: 0 auto; }
.article-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border); }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.article-card img { width: 100%; height: 180px; object-fit: cover; }
.card-content { padding: 1rem 1.25rem 1.25rem; }
.card-category { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin: 0.4rem 0; }
.card-excerpt { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 200; width: 0%; transition: width 0.1s; }
@media (max-width: 768px) {
  .site-nav { padding: 0.5rem 1rem; }
  .age-switcher button { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
  .story { padding: 1.5rem 1rem 3rem; }
  .story-hero { margin: 1rem -1rem; }
  .story-title[data-level="baby"] { font-size: 2rem; }
  .hero-section h1 { font-size: 1.6rem; }
  .article-grid { grid-template-columns: 1fr; padding: 1rem; }
}
