/* Khelo Zone — "Play & Learn" game portal, light theme */
:root{
  --bg:#f3f8f7;
  --card:#ffffff;
  --ink:#10231f;
  --muted:#5d726e;
  --teal:#0d9488;
  --teal-dark:#0a7a70;
  --teal-soft:#e3f4f2;
  --amber:#f59e0b;
  --amber-dark:#b45309;
  --amber-soft:#fdf3dd;
  --border:#dbe7e4;
  --radius:18px;
  --shadow:0 6px 24px rgba(13,148,136,.10);
  /* compat aliases used by 404.html inline styles */
  --accent:var(--teal);
  --accent-2:var(--amber);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg);color:var(--ink);line-height:1.65;font-size:17px;min-height:100vh;
}
a{color:var(--teal-dark);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}

/* ---------- header ---------- */
header.site-header{
  background:rgba(255,255,255,.94);backdrop-filter:blur(8px);
  border-bottom:3px solid var(--teal);
  padding:.8rem 1.25rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;
  position:sticky;top:0;z-index:50;box-shadow:0 2px 12px rgba(13,148,136,.08);
}
.brand{display:inline-flex;align-items:center;gap:.6rem}
.brand:hover{text-decoration:none}
.brand-logo{width:38px;height:38px;display:block;flex:0 0 auto}
.site-name{font-size:1.45rem;font-weight:800;color:var(--teal-dark);letter-spacing:.01em}
/* article pages: logo via CSS so the DOM stays untouched */
a.site-name::before{
  content:"";display:inline-block;width:30px;height:30px;vertical-align:-6px;margin-right:.5rem;
  background:url(../assets/logo.svg) no-repeat center/contain;
}
header.site-header nav{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
header.site-header nav a{
  color:var(--muted);font-weight:600;font-size:.95rem;padding:.5rem .95rem;border-radius:999px;
}
header.site-header nav a:hover{color:var(--teal-dark);background:var(--teal-soft);text-decoration:none}

/* ---------- hero ---------- */
.hero{
  background:linear-gradient(135deg,#0d9488 0%,#14b8a6 55%,#5eead4 130%);
  color:#fff;padding:3.5rem 1.25rem 3rem;position:relative;overflow:hidden;
}
.hero::after{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.14;
  background-image:radial-gradient(#fff 1.6px,transparent 1.6px);background-size:26px 26px;
}
.hero-inner{max-width:1020px;margin:0 auto;position:relative;z-index:1;text-align:center}
.hero h1{font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin-bottom:.75rem;color:#fff}
.hero h1 .hl{background:var(--amber);color:#3a2a05;padding:.05em .35em;border-radius:.35em;white-space:nowrap}
.hero p{font-size:1.1rem;opacity:.95;max-width:640px;margin:0 auto 2rem}
.choice-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.1rem;max-width:760px;margin:0 auto}
.choice{
  background:#fff;color:var(--ink);border-radius:var(--radius);padding:1.6rem 1.4rem;
  display:flex;flex-direction:column;align-items:center;gap:.45rem;
  box-shadow:0 10px 30px rgba(0,0,0,.16);transition:transform .15s ease,box-shadow .15s ease;
}
.choice:hover{text-decoration:none;transform:translateY(-4px);box-shadow:0 16px 36px rgba(0,0,0,.2)}
.choice-icon{font-size:2.6rem;line-height:1}
.choice-title{font-size:1.35rem;font-weight:800}
.choice-desc{color:var(--muted);font-size:.95rem}
.choice-cta{
  margin-top:.6rem;font-weight:800;font-size:1.05rem;padding:.7rem 2rem;border-radius:999px;color:#fff;
}
.choice-games .choice-cta{background:var(--amber)}
.choice-games .choice-cta:hover{background:var(--amber-dark)}
.choice-guides .choice-cta{background:var(--teal)}
.choice-guides .choice-cta:hover{background:var(--teal-dark)}

/* ---------- sections ---------- */
section.block{max-width:1100px;margin:0 auto;padding:2.75rem 1.25rem;scroll-margin-top:90px}
.section-head{display:flex;align-items:baseline;gap:.75rem;flex-wrap:wrap;margin-bottom:.4rem}
.section-head h2{font-size:1.8rem;font-weight:800;color:var(--ink)}
.count-badge{
  background:var(--teal-soft);color:var(--teal-dark);font-weight:800;font-size:.9rem;
  padding:.2rem .8rem;border-radius:999px;
}
.section-sub{color:var(--muted);margin-bottom:1.6rem;max-width:720px}

/* ---------- game tiles ---------- */
.game-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1.1rem}
.game-tile{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  padding:1.5rem 1.2rem 1.35rem;text-align:center;display:flex;flex-direction:column;gap:.5rem;
  box-shadow:var(--shadow);transition:transform .15s ease,box-shadow .15s ease;
}
.game-tile:hover{transform:translateY(-5px);box-shadow:0 14px 32px rgba(13,148,136,.16)}
.tile-icon{
  width:76px;height:76px;margin:0 auto;border-radius:22px;display:flex;align-items:center;justify-content:center;
  font-size:2.4rem;
}
.t1 .tile-icon{background:#e0f2fe}.t2 .tile-icon{background:#fef3c7}.t3 .tile-icon{background:#dcfce7}
.t4 .tile-icon{background:#fae8ff}.t5 .tile-icon{background:#ffedd5}
.game-tile h2{font-size:1.15rem;font-weight:800}
.game-tile p{color:var(--muted);font-size:.9rem;flex:1}
.btn-play{
  display:inline-block;background:var(--amber);color:#3a2a05;font-weight:800;font-size:1.02rem;
  padding:.75rem 1.6rem;border-radius:999px;margin-top:.4rem;box-shadow:0 4px 14px rgba(245,158,11,.4);
  transition:transform .12s ease,background .12s ease;
}
.btn-play:hover{background:var(--amber-dark);color:#fff;text-decoration:none;transform:scale(1.04)}

/* ---------- guide cards ---------- */
.guides-section{background:#fff;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:1.25rem}
.guide-card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;
  display:flex;flex-direction:column;box-shadow:var(--shadow);transition:transform .15s ease,box-shadow .15s ease;color:var(--ink);
}
.guide-card:hover{text-decoration:none;transform:translateY(-4px);box-shadow:0 14px 32px rgba(13,148,136,.16)}
.guide-thumb{aspect-ratio:16/9;object-fit:cover;width:100%;display:block;background:var(--teal-soft)}
.guide-body{padding:1.15rem 1.25rem 1.3rem;display:flex;flex-direction:column;gap:.5rem;flex:1}
.guide-body h3{font-size:1.08rem;font-weight:750;line-height:1.4}
.guide-body p{color:var(--muted);font-size:.92rem;flex:1}
.read-more{color:var(--teal-dark);font-weight:700;font-size:.95rem}
.guide-card:hover .read-more{text-decoration:underline}

/* ---------- footer ---------- */
footer.site-footer{
  background:#0f2b28;color:#cfe3e0;margin-top:0;padding:2.2rem 1.25rem;text-align:center;font-size:.92rem;
  border-top:4px solid var(--amber);
}
footer.site-footer nav{display:flex;flex-wrap:wrap;gap:1.1rem;justify-content:center;margin-top:.7rem}
footer.site-footer a{color:#cfe3e0}
footer.site-footer a:hover{color:#fff}

/* ---------- article pages ---------- */
main{padding:0 1.25rem}
main > article{
  max-width:820px;margin:2rem auto;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  padding:2.25rem 2rem;box-shadow:var(--shadow);
}
main > article h1, article h1{font-size:2.1rem;line-height:1.25;font-weight:800;margin-bottom:.5rem;color:var(--ink)}
.byline{color:var(--muted);font-size:.92rem;margin-bottom:1.4rem;padding-bottom:1.1rem;border-bottom:1px solid var(--border)}
article figure{margin:0 0 1.6rem}
article figure img{border-radius:14px;box-shadow:var(--shadow);display:block;width:100%}
article h2{
  font-size:1.5rem;font-weight:800;margin:2.2rem 0 .9rem;padding-bottom:.45rem;
  border-bottom:3px solid var(--teal-soft);color:var(--ink);
}
article h2::before{content:"";display:inline-block;width:.55em;height:.55em;border-radius:50%;background:var(--teal);margin-right:.5em;vertical-align:baseline}
article h3{font-size:1.18rem;font-weight:750;margin:1.6rem 0 .6rem;color:var(--teal-dark)}
article p{margin-bottom:1.05rem}
article .byline + p::first-letter{
  font-size:2.6em;font-weight:800;color:var(--teal);float:left;line-height:1;margin:.08em .12em 0 0;
}
article ul,article ol{margin:0 0 1.1rem 1.5rem}
article li{margin-bottom:.45rem}
article li::marker{color:var(--teal);font-weight:700}
article table{width:100%;border-collapse:collapse;margin:0 0 1.4rem;font-size:.95rem;display:block;overflow-x:auto}
article th,article td{border:1px solid var(--border);padding:.6rem .8rem;text-align:left}
article th{background:var(--teal-soft);color:var(--teal-dark);font-weight:700}
article tr:nth-child(even) td{background:#fafcfc}
.author-bio{
  margin-top:2.2rem;background:var(--amber-soft);border:1px solid #f3dfae;border-radius:14px;
  padding:1.1rem 1.25rem;font-size:.93rem;color:#6b4a08;
}

/* auto-generated table of contents */
nav.kz-toc{
  background:var(--teal-soft);border:1px solid #bfe6e1;border-left:5px solid var(--teal);
  border-radius:12px;padding:1rem 1.25rem;margin:0 0 1.8rem;
}
.kz-toc-head{font-weight:800;color:var(--teal-dark);margin-bottom:.5rem;display:flex;align-items:center;gap:.5rem}
.kz-toc-head .live-dot{width:.6em;height:.6em;border-radius:50%;background:var(--amber);display:inline-block}
nav.kz-toc ol{margin:0 0 0 1.3rem}
nav.kz-toc li{margin-bottom:.3rem}
nav.kz-toc li::marker{color:var(--teal-dark)}
nav.kz-toc a{color:var(--teal-dark);font-weight:600}

/* ---------- 404 / misc pages ---------- */
main.slim{max-width:720px;margin:0 auto;padding:2.5rem 1.25rem}

/* ---------- responsive ---------- */
@media(max-width:640px){
  .hero{padding:2.5rem 1rem 2.2rem}
  .hero h1{font-size:1.9rem}
  main > article{padding:1.4rem 1.05rem;margin:1.25rem auto;max-width:100%}
  main > article h1, article h1{font-size:1.6rem}
  .section-head h2{font-size:1.45rem}
  .game-tiles{grid-template-columns:repeat(2,1fr);gap:.8rem}
  .game-tile{padding:1.1rem .8rem}
  .tile-icon{width:60px;height:60px;font-size:1.9rem;border-radius:18px}
  .btn-play{padding:.65rem 1.1rem;font-size:.95rem}
}

/* Prevent off-canvas drawer / any stray element from causing horizontal scroll on mobile */
html{overflow-x:clip}
/* ===== Mobile drawer navigation (added 2026-10-02) ===== */
.nav-toggle,.drawer,.drawer-overlay{display:none}
@media (max-width:860px){
header nav{display:none!important}
.nav-toggle{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:44px;height:44px;margin-left:auto;padding:0;background:transparent;border:2px solid #0d9488;border-radius:10px;cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}
.nav-toggle span{display:block;width:20px;height:2px;background:#0d9488;border-radius:2px}
header:not(.site-header){display:flex;align-items:center;gap:12px}
header:not(.site-header) .site-name{flex:1 1 auto;margin:0}
.drawer-overlay{display:block;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:190;opacity:0;pointer-events:none;transition:opacity .25s ease}
.drawer{display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;width:min(320px,86vw);background:#ffffff;color:#123b38;z-index:200;transform:translateX(105%);transition:transform .28s ease;box-shadow:-10px 0 32px rgba(0,0,0,.28);overflow-y:auto;-webkit-overflow-scrolling:touch}
body.drawer-open{overflow:hidden}
body.drawer-open .drawer{transform:translateX(0)}
body.drawer-open .drawer-overlay{opacity:1;pointer-events:auto}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 12px 12px 16px;border-bottom:1px solid #d9efec}
.drawer-head a{color:inherit!important;text-decoration:none}
.drawer-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;background:transparent;border:1px solid #d9efec;border-radius:10px;color:#123b38;font-size:26px;line-height:1;cursor:pointer;flex:0 0 auto}
.drawer-nav{display:flex;flex-direction:column;gap:4px;padding:12px}
.drawer-nav .drawer-link{display:flex;align-items:center;min-height:48px;padding:10px 14px;border-radius:10px;color:#123b38;text-decoration:none;font-weight:600;font-size:1.02rem;line-height:1.35}
.drawer-nav .drawer-link:hover,.drawer-nav .drawer-link:focus-visible{background:#e6f7f5;color:#0b6b64;text-decoration:none}

}

/* Compact sticky header on scroll - mobile (added 2026-10-02) */
@media (max-width:860px){
.site-header{transition:padding .22s ease,box-shadow .22s ease}
.site-header.scrolled{padding-top:8px!important;padding-bottom:8px!important;box-shadow:0 2px 14px rgba(0,0,0,.14)}
.site-header.scrolled img{max-height:30px!important;width:auto}
.site-header.scrolled .site-name{font-size:1.05rem!important}
}
