
:root{--bg:#E4DEFF;--fg:#26193A;--muted:#6c6391;--primary:#5b21b6;--primary-2:#7c3aed;--card:#ffffff;--border:#e5ddff;--chip:#efe9ff}
:root.dark{--bg:#0f0a1f;--fg:#ece8ff;--muted:#b8b2d9;--primary:#8b5cf6;--primary-2:#a78bfa;--card:#17122b;--border:#2a2146;--chip:#1e1634}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--fg);font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial}
.container{max-width:960px;margin:0 auto;padding:0 1rem}
.site-header{top:0;background:transparent;border-bottom:0;z-index:20}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;height:64px}
.menu-toggle{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--border);background:var(--card);color:var(--fg);border-radius:10px;cursor:pointer}
.menu-toggle:focus{outline:2px solid var(--primary);outline-offset:2px}
.logo{display:flex;align-items:center;gap:.5rem;font-weight:700;color:var(--fg);text-decoration:none}
.logo img{height:32px;width:auto}
.nav{display:flex;align-items:center;gap:1rem;margin:0 auto;font-weight:600;font-size:.95rem}
.nav a{margin:0 .2rem;text-decoration:none;color:var(--fg);padding:.25rem .5rem;border-radius:8px}
.nav a:hover{color:var(--primary)}
#themeToggle{background:transparent;border:1px solid var(--border);padding:.4rem .6rem;border-radius:10px;cursor:pointer}
.hero{padding:2.5rem 0;}
.hero h1{font-size:clamp(2.2rem,4.4vw,3rem);margin:.6rem 0;color:var(--primary);font-weight:800;line-height:1.15}
.hero p{color:var(--muted);auto 0;max-width:760px;text-align: center;}
.grid{display:grid;gap:1rem}
.grid-2{grid-template-columns:1.2fr .8fr}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:1.8rem}
label{display:block;margin:.5rem 0 .25rem}
input,select,button,textarea{width:100%;padding:.8rem;border-radius:10px;border:1px solid var(--border);background:#f5f2ff;color:var(--fg)}
/* Global button hover (applies everywhere) */
button{cursor:pointer;transition:transform .18s ease, box-shadow .18s ease, filter .18s ease}
button:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(0,0,0,.12)}
button:active{transform:translateY(-1px)}
button.primary{background:var(--primary);color:#fff;border:none;box-shadow:0 6px 18px rgba(92,56,189,.28)}
.primary:hover{filter:brightness(1.03)}
/* Stronger hover for the main Calculate button */
#calc.primary{border-radius:12px}
#calc.primary:hover{filter:none;background:linear-gradient(180deg,var(--primary-2),var(--primary));box-shadow:0 18px 30px rgba(92,56,189,.45),0 3px 0 rgba(0,0,0,.05);transform:translateY(-2px)}
.tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid var(--border);padding:.6rem;text-align:left}
.kpis{display:flex;gap:1rem;flex-wrap:wrap}
.kpi{flex:1 1 220px;background:var(--card);border:1px solid var(--border);border-radius:14px;padding:1rem}
.site-footer{margin-top:2rem;padding:1.5rem 0;border-top:1px solid var(--border);background:transparent}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.small.print{color:var(--muted);font-size:.9rem;margin-top:.5rem}
.badge{display:inline-block;padding:.2rem .5rem;border:1px solid var(--border);border-radius:999px;font-size:.8rem;color:var(--muted)}
.cookie-banner{position:fixed;bottom:12px;left:12px;right:12px;display:flex;gap:.6rem;align-items:center;justify-content:space-between;background:var(--card);border:1px solid var(--border);border-radius:10px;padding:.6rem 1rem;box-shadow:0 6px 20px rgba(0,0,0,.08)}
.cookie-banner[hidden]{display:none}
.faq details{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:1rem;margin:.6rem 0}
code.inline{background:var(--card);border:1px solid var(--border);border-radius:6px;padding:.1rem .3rem}
.ads-slot{min-height:120px;border:1px dashed var(--border);border-radius:12px;display:flex;align-items:center;justify-content:center;color:var(--muted);margin:.5rem 0;background:var(--chip)}
.notice{font-size:.9rem;color:var(--muted)}

/* New UI styling inspired by the provided mockup */
.hero-logo{display:block;margin:0 auto 1rem auto;max-width:320px;height:auto}
.hero .ads-slot{max-width:680px;margin:0 auto 1.2rem auto}
/* Main panel that matches the mock */
.panel{background:var(--card);border:1px solid var(--border);border-radius:16px;display:grid;grid-template-columns:1.3fr auto 1fr;gap:0;overflow:hidden}
.panel>section,.panel>aside{padding:1.8rem}
.panel>.vr{width:1px;background:var(--border)}

/* Right column age tiles */
.age-list{list-style:none;margin-top:20px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(90px,1fr));gap:.6rem}
.age-list li a{display:flex;align-items:center;justify-content:center;flex-direction:column;text-decoration:none;border-radius:14px;color:#fff;font-weight:700;padding:14px 10px;min-height:84px;transition:transform .18s ease, box-shadow .18s ease}
.age-list li a:hover{transform:translateY(-3px);box-shadow:0 14px 26px rgba(0,0,0,.18)}
.age-list li a small{display:block;font-weight:600;opacity:.95}
.age-list li:nth-child(1) a{background:#3b82f6}
.age-list li:nth-child(2) a{background:#f97316}
.age-list li:nth-child(3) a{background:#8b5cf6}
.age-list li:nth-child(4) a{background:#ec4899}
.age-list li:nth-child(5) a{background:#22c55e}
.age-list li:nth-child(6) a{background:#06b6d4}
.age-list li:nth-child(7) a{background:#ef4444}
.age-list li:nth-child(8) a{background:#f59e0b}
.age-list li:nth-child(9) a{background:#fb7185}

/* Chips row */
.chips{display:flex;flex-wrap:wrap;gap:.6rem}
.chip{display:inline-block;padding:.35rem .6rem;border-radius:10px;background:var(--card);border:1px solid var(--border);color:var(--muted)}

/* Elevation & sections */
.section{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:1rem}

/* Responsive tweaks */
@media (max-width: 860px){
  .grid-2{grid-template-columns:1fr}
  .panel{grid-template-columns:1fr}
  .panel>.vr{display:none}
  .nav{gap:.6rem}
}

/* Header collapse breakpoint (final: 768px) */
@media (max-width: 768px){
  .menu-toggle{display:flex}
  .nav{position:static;display:none;flex-direction:column;align-items:flex-start;gap:.2rem;padding:.6rem 0;margin:0}
  .site-header.is-menu-open .nav{display:flex}
  .nav a{padding:.6rem 0}
}

/* Schedule cards (4-month sample) */
.schedule{display:block;margin-top:.8rem}
.schedule .awake-bar{background:#1a1430;color:#bfb7dd;border-radius:12px;padding:.55rem .9rem;font-weight:700;letter-spacing:.2px;text-align:right;margin:.8rem 0}
.schedule-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#e6f3ff;border-radius:12px;overflow:hidden;border:1px solid var(--border);box-shadow:0 4px 14px rgba(0,0,0,.06);margin:.6rem 0}
.schedule-card .content{padding:1rem 1.2rem}
.schedule-card .title{font-weight:800;font-size:1.1rem;margin:0 0 .15rem}
.schedule-card .time{font-weight:700;opacity:.9}
.schedule-card .side{width:92px;min-height:76px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:900;font-size:1.6rem}
.schedule-card.nap{background:#cfeaff}
.schedule-card.nap .side{background:#45b7ff}
.schedule-card.rise{background:#ffe59e}
.schedule-card.rise .side{background:#ffd166}
.schedule .pill{display:inline-block;background:#eef1fd;border:1px solid var(--border);padding:.15rem .55rem;border-radius:999px;color:#5b5b7a;font-weight:700;font-size:.8rem;margin-left:.4rem}

/* Small tweaks in dark mode */
:root.dark .schedule .awake-bar{background:#0f0a1f;color:#b8b2d9}
:root.dark .schedule-card{border-color:#241c3e}
:root.dark .schedule-card.nap{background:#19324a}
:root.dark .schedule-card.rise{background:#493e1e}
