:root{
  --bg:#0b1220;
  --card:#121a2b;
  --line:rgba(255,255,255,.12);
  --text:#ffffff;
  --muted:#aab0c3;
  --primary:#7dffa8;
  --accent:#7aa7ff;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.container{
  width:min(1100px,92vw);
  margin:auto;
  padding:16px;
}

.topbar{
  background:#0e1628;
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.brand{
  font-weight:1000;
  font-size:1.1em;
}
.nav a{
  margin-left:12px;
  color:var(--muted);
}

.footer{
  border-top:1px solid var(--line);
  background:#0e1628;
}
.footer__inner{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
}
.footer__links a{
  margin-right:12px;
  color:var(--muted);
}
.footer__copy{
  font-size:.9em;
  color:var(--muted);
}

.hero{margin-top:10px}
.title{font-size:1.6em;margin-bottom:4px}
.subtitle{color:var(--muted)}

.grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
}
@media(max-width:900px){
  .grid{grid-template-columns:1fr}
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  margin-bottom:16px;
}

.h1{font-size:1.6em}
.h2{font-size:1.3em;margin-bottom:8px}
.h3{font-size:1.1em;margin-bottom:6px}

.small{font-size:.85em}
.muted{color:var(--muted)}

.formGrid{display:grid;gap:12px}
.field span{display:block;font-size:.9em;color:var(--muted)}
.field input,.field select{
  width:100%;
  padding:10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
}

.fieldRow{display:grid;grid-template-columns:1fr 1fr;gap:8px}

.btnRow{display:flex;gap:8px;flex-wrap:wrap}

.btn{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
  font-weight:1000;
}
.btn-primary{
  background:var(--primary);
  color:#002210;
}
.btn:active{transform:translateY(1px)}

.linkBtn{
  background:none;
  border:none;
  color:var(--accent);
  font-weight:1000;
  cursor:pointer;
}

.result{
  margin-top:10px;
  font-size:1.2em;
}

.adCard{
  margin:16px 0;
  padding:10px;
  border:1px dashed var(--line);
  border-radius:12px;
  text-align:center;
}
.adLabel{
  font-size:.8em;
  color:var(--muted);
}

.timerBox{
  margin-top:16px;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.timerTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.timerTime{
  font-size:2em;
  text-align:center;
  margin:8px 0;
}
.timerBtns{
  display:flex;
  gap:8px;
  justify-content:center;
}

.nudgeRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-top:8px;
}

.pill{
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
  padding:6px 10px;
  border-radius:999px;
  font-weight:1000;
}

.nudgeLog{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:8px;
  color:var(--muted);
}

.learnRow{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(125,255,168,.08);
}
.learnBtns{display:flex;gap:8px;flex-wrap:wrap}

.adaptiveHint{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(122,167,255,.1);
}

.seg{display:flex;gap:8px;flex-wrap:wrap}
.segBtn{
  flex:1;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--muted);
  font-weight:1000;
}
.segBtn.is-active{
  background:rgba(122,167,255,.2);
  color:var(--text);
}

.optWrap{
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px;
}
.optToggle{
  width:100%;
  background:#0b1220;
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px;
  color:var(--text);
  font-weight:1000;
}
.optBody{margin-top:8px}

.presets{margin-bottom:16px}
.presetGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
@media(max-width:700px){
  .presetGrid{grid-template-columns:1fr}
}
.presetBtn{
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
  padding:10px;
  border-radius:12px;
  font-weight:1000;
  text-align:left;
}
.presetBtn.is-ghost{
  border-style:dashed;
  color:var(--muted);
}

.quickTable{margin-top:16px}
.tableWrap{overflow:auto}
.tbl{
  width:100%;
  border-collapse:collapse;
  min-width:520px;
}
.tbl th,.tbl td{
  padding:10px;
  border-bottom:1px solid var(--line);
  text-align:center;
}

.qa{margin-top:8px}
.qa summary{cursor:pointer;font-weight:1000}
.qa p{color:var(--muted)}

.uiToast{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0e1628;
  color:var(--text);
  font-weight:1000;
  opacity:0;
  pointer-events:none;
  transition:.2s;
}
.uiToast.is-show{opacity:1}

.shareRow{display:flex;gap:8px;align-items:center}
.toast{color:var(--muted)}
