:root{
  /* Light theme (default) */
  --bg0:#F7F9FF;
  --bg1:#EEF2FF;

  --card: rgba(255,255,255,0.78);
  --card2: rgba(255,255,255,0.92);

  --border: rgba(15,23,42,0.10);
  --text: rgba(15,23,42,0.92);
  --muted: rgba(15,23,42,0.62);
  --muted2: rgba(15,23,42,0.48);

  --accent:#5B5CFF;   /* modern indigo */
  --accent2:#06B6D4;  /* cyan */
  --good:#10B981;
  --warn:#F59E0B;

  --shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
  --radius: 18px;
  --radius2: 24px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Dark theme overrides (toggle by adding data-theme="dark" on <html>) */
html[data-theme="dark"]{
  --bg0:#070A12;
  --bg1:#0B1022;

  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.09);

  --border: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted2: rgba(255,255,255,0.52);

  --shadow: 0 18px 60px rgba(0,0,0,0.45);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(1200px 900px at 15% 15%, rgba(91,92,255,0.20), transparent 60%),
    radial-gradient(1000px 800px at 85% 25%, rgba(6,182,212,0.14), transparent 60%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 55%, var(--bg0) 100%);
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.9}

.bg{position:fixed; inset:0; z-index:-1; pointer-events:none}
.orb{
  position:absolute; width:520px; height:520px; border-radius:999px;
  filter: blur(60px);
  opacity:.30;
  animation: float 12s ease-in-out infinite;
}
.orb-a{left:-140px; top:-120px; background: radial-gradient(circle at 30% 30%, rgba(91,92,255,0.95), transparent 60%)}
.orb-b{right:-160px; top:80px; background: radial-gradient(circle at 30% 30%, rgba(6,182,212,0.95), transparent 60%); animation-delay:-4s}
.orb-c{left:20%; bottom:-220px; background: radial-gradient(circle at 30% 30%, rgba(15,23,42,0.22), transparent 65%); animation-delay:-7s}

html[data-theme="dark"] .orb-c{
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), transparent 65%);
}

@keyframes float{
  0%,100%{transform: translateY(0) translateX(0) scale(1)}
  50%{transform: translateY(22px) translateX(10px) scale(1.02)}
}

.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.45);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
}

html[data-theme="dark"] .topbar{
  background: rgba(0,0,0,0.25);
}

.brand{display:flex; align-items:center; gap:10px; font-weight:800}
.logo{
  width:14px; height:14px; border-radius:6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 20px rgba(91,92,255,0.18);
}
.brand-text{letter-spacing:.2px}
.pill{
  font-size:12px; padding:4px 8px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.55);
  border-radius:999px;
  color: var(--muted);
}
html[data-theme="dark"] .pill{
  background: rgba(255,255,255,0.06);
}

.nav{display:flex; gap:10px; align-items:center}
.navlink{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
  color: var(--muted);
}
.navlink.active{
  border-color: rgba(91,92,255,0.30);
  background: rgba(91,92,255,0.10);
  color: var(--text);
}

.container{max-width:1120px; margin:0 auto; padding:18px 18px 60px}

.hero{display:grid; grid-template-columns: 1.4fr .6fr; gap:16px; align-items:start}
.hero-right{position:sticky; top:78px}

.h1{font-size:42px; margin:10px 0 6px; letter-spacing:-0.6px}
.lead{margin:0 0 14px; color:var(--muted); line-height:1.55}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.card-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding-bottom:10px; margin-bottom:10px;
  border-bottom:1px solid rgba(15,23,42,0.08);
}
html[data-theme="dark"] .card-head{
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.kicker{font-size:14px; color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:12px}
.muted{color:var(--muted)}
.mt8{margin-top:8px}
.mt12{margin-top:12px}
.mt16{margin-top:16px}
.hidden{display:none !important}

.form-card{overflow:hidden; position:relative}
.form-card::after{
  content:"";
  position:absolute; inset:-2px;
  background: linear-gradient(135deg, rgba(91,92,255,0.22), rgba(6,182,212,0.16), transparent 60%);
  opacity:0.40;
  filter: blur(14px);
  z-index:-1;
}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.grid3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px}

.field label{display:block; font-size:13px; color:var(--muted); margin-bottom:6px}
.field input, .field select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.75);
  color: var(--text);
  outline:none;
}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text);
}
.field input:focus, .field select:focus{
  border-color: rgba(6,182,212,0.55);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.12);
}
.hint{display:block; margin-top:6px; color:var(--muted2)}

.actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:12px}

.btn{
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.65);
  color: var(--text);
  padding:10px 14px;
  border-radius: 999px;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
html[data-theme="dark"] .btn{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,0.85)}
html[data-theme="dark"] .btn:hover{background: rgba(255,255,255,0.09)}
.btn:active{transform: translateY(0px) scale(0.99)}

.btn.primary{
  border-color: rgba(91,92,255,0.35);
  background: linear-gradient(135deg, rgba(91,92,255,0.20), rgba(6,182,212,0.12));
}
.btn.ghost{
  background: transparent;
  border-color: rgba(15,23,42,0.12);
}
html[data-theme="dark"] .btn.ghost{
  border-color: rgba(255,255,255,0.12);
}
.btn.small{padding:8px 12px; font-size:13px}



/* Distinct tiles container */
#ageTiles{
  position: relative;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(91,92,255,0.18);
  background:
    radial-gradient(900px 240px at 15% 20%, rgba(91,92,255,0.16), transparent 60%),
    radial-gradient(900px 240px at 85% 35%, rgba(6,182,212,0.12), transparent 60%),
    rgba(255,255,255,0.55);
}

/* Dark mode version */
html[data-theme="dark"] #ageTiles{
  border: 1px solid rgba(91,92,255,0.22);
  background:
    radial-gradient(900px 240px at 15% 20%, rgba(91,92,255,0.22), transparent 60%),
    radial-gradient(900px 240px at 85% 35%, rgba(6,182,212,0.16), transparent 60%),
    rgba(0,0,0,0.18);
}

/* Tile cards pop a bit more */
#ageTiles .tile{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 10px 24px rgba(2,6,23,0.08);
}

html[data-theme="dark"] #ageTiles .tile{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

/* Make numbers more visible + premium */
#ageTiles .tile .num{
  color: rgba(15,23,42,0.95);
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

html[data-theme="dark"] #ageTiles .tile .num{
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

/* Nice hover motion */
#ageTiles .tile{
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
#ageTiles .tile:hover{
  transform: translateY(-2px);
  border-color: rgba(6,182,212,0.30);
  box-shadow: 0 16px 34px rgba(2,6,23,0.12);
}
html[data-theme="dark"] #ageTiles .tile:hover{
  box-shadow: 0 16px 34px rgba(0,0,0,0.40);
}


.brand-logo{
  width: 28px;
  height: 28px;
  border-radius: 8px; /* if your logo is square */
  object-fit: contain;
  box-shadow: 0 10px 20px rgba(91,92,255,0.14);
}



.tiles{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:10px;
}
.tile{
  background: var(--card2);
  border:1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  padding:12px;
  min-height:78px;
  transform: translateZ(0);
  animation: pop .35s ease both;
}
html[data-theme="dark"] .tile{
  border:1px solid rgba(255,255,255,0.10);
}
@keyframes pop{from{transform:translateY(6px); opacity:0} to{transform:translateY(0); opacity:1}}
.tile .num{font-size:22px; font-weight:800; letter-spacing:-0.4px}
.tile .lbl{font-size:12px; color:var(--muted); margin-top:2px}
.mono{font-family:var(--mono)}

.pulse{
  width:10px; height:10px; border-radius:999px;
  background: var(--accent2);
  box-shadow: 0 0 0 0 rgba(6,182,212,0.28);
  animation: pulse 1.3s infinite;
}
@keyframes pulse{
  0%{box-shadow: 0 0 0 0 rgba(6,182,212,0.28)}
  70%{box-shadow: 0 0 0 14px rgba(6,182,212,0)}
  100%{box-shadow: 0 0 0 0 rgba(6,182,212,0)}
}

.list{margin:10px 0 0; padding-left:18px; color:var(--muted); line-height:1.6}
.stats{display:grid; gap:10px; margin-top:10px}
.statrow{
  display:flex; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,0.55);
  border:1px solid rgba(15,23,42,0.10);
}
html[data-theme="dark"] .statrow{
  background: rgba(0,0,0,0.22);
  border:1px solid rgba(255,255,255,0.08);
}
.statrow b{color:var(--text)}
.statrow span{color:var(--muted); font-family:var(--mono)}

.ad-placeholder{
  margin-top:12px;
  height:240px;
  border-radius:16px;
  border:1px dashed rgba(15,23,42,0.20);
  display:grid; place-items:center;
  background: rgba(255,255,255,0.55);
}
html[data-theme="dark"] .ad-placeholder{
  border:1px dashed rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
}


.sharebox{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:flex-start;  /* better when the URL wraps to 2+ lines */
  min-width:0;             /* allows children to shrink */
}

.sharebox .share-url{
  flex: 1 1 auto;
  min-width:0;

  /* WRAP instead of truncate */
  white-space: normal;
  overflow-wrap: anywhere;   /* breaks long URLs safely */
  word-break: break-word;    /* fallback */
  line-height: 1.35;

  /* optional: make it look like a nice “code pill” */
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.55);
}

html[data-theme="dark"] .sharebox .share-url{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}

/* keep the copy button aligned even when URL wraps */
.sharebox .btn{
  flex: 0 0 auto;
}




.sharebox{
  margin-top:10px;
  display:flex; gap:10px; align-items:center;
}
/* .sharebox .mono{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} */

.footer{
  border-top:1px solid var(--border);
  background: rgba(255,255,255,0.45);
}
html[data-theme="dark"] .footer{
  background: rgba(0,0,0,0.20);
}
.footer-inner{
  max-width:1120px; margin:0 auto;
  padding:16px 18px;
  display:flex; justify-content:space-between; gap:12px;
}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--text)}

.toast{
  position: fixed;
  right: 14px; bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(14px);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity:0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
html[data-theme="dark"] .toast{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.55);
}
.toast.show{opacity:1; transform: translateY(0)}

.celebrate{
  margin-top:14px;
  padding:14px;
  border-radius: 16px;
  border:1px solid rgba(16,185,129,0.30);
  background: rgba(16,185,129,0.10);
}
.celebrate .big{font-size:22px; font-weight:900}

/* Toggle row */
.toggle-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.55);
}
html[data-theme="dark"] .toggle-row{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

.toggle{
  position:relative;
  width:54px;
  height:32px;
  flex:0 0 auto;
}
.toggle input{opacity:0; width:0; height:0}
.slider{
  position:absolute; inset:0;
  border-radius:999px;
  background: rgba(15,23,42,0.10);
  border:1px solid rgba(15,23,42,0.12);
  transition: .2s ease;
}
html[data-theme="dark"] .slider{
  background: rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.14);
}
.slider::before{
  content:"";
  position:absolute;
  height:26px; width:26px;
  left:3px; top:2px;
  border-radius:999px;
  background: rgba(255,255,255,0.98);
  transition: .2s ease;
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.22);
}
.toggle input:checked + .slider{
  background: linear-gradient(135deg, rgba(91,92,255,0.32), rgba(6,182,212,0.20));
  border-color: rgba(6,182,212,0.32);
}
.toggle input:checked + .slider::before{
  transform: translateX(22px);
}

/* Dark-mode button */
.theme-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.55);
  color: var(--muted);
  cursor:pointer;
}
html[data-theme="dark"] .theme-btn{
  background: rgba(255,255,255,0.06);
}
.theme-dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

@media (max-width: 980px){
  .hero{grid-template-columns:1fr}
  .hero-right{position:static}
  .tiles{grid-template-columns: repeat(3, 1fr)}
  .grid3{grid-template-columns:1fr}
  .h1{font-size:36px}
}

.picker-wrap{
  position: relative;
  display: flex;
  align-items: center;
}




.picker-wrap input{
  width: 100%;
  padding-right: 46px; /* room for the button */
}

/* Hide native calendar/clock indicator (Chromium/WebKit) */
.picker-wrap input::-webkit-calendar-picker-indicator{
  opacity: 0;
  display: none;
}

/* Custom button */
.picker-btn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.70);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.picker-btn:hover{
  transform: translateY(-50%) translateY(-1px);
  background: rgba(255,255,255,0.92);
}

html[data-theme="dark"] .picker-btn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
}

html[data-theme="dark"] .picker-btn:hover{
  background: rgba(255,255,255,0.12);
}


/* Accessibility helper */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

.nav{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Desktop default */
.nav-links{display:flex; gap:10px; align-items:center;}
.nav-mobile{display:none;}

.nav-select{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.65);
  color: var(--text);
  outline:none;
  max-width: 210px;
}

html[data-theme="dark"] .nav-select{
  background: rgba(255,255,255,0.06);
}

/* Mobile behavior */
@media (max-width: 680px){
  .nav-links{display:none;}
  .nav-mobile{display:block;}
  .nav-select{max-width: 200px;}
}


/* Prevent form fields from overflowing cards on mobile */
.grid2 > *{
  min-width: 0;  /* critical for grid/flex shrink */
}

.field{
  min-width: 0;
}

.field input,
.field select{
  max-width: 100%;
}

/* Some browsers render datetime-local wider than container */
input[type="datetime-local"],
input[type="date"],
input[type="time"]{
  width: 100%;
  min-width: 0;
}
