:root{
  --blue0:#1a46ff;
  --blue1:#2d5bff;
  --blue2:#6b8bff;
  --green:#12c48b;
  --amber:#ffb020;
  --red:#ff4d6d;

  --shadow: 0 14px 34px rgba(13, 27, 66, .14);
  --shadow2: 0 10px 24px rgba(13, 27, 66, .10);
  --radius: 18px;
  --radius2: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";

  /* Light defaults */
  --page:#f3f6ff;
  --text:#0c1530;
  --muted:#56627a;
  --line:#e7ebff;
  --card:#ffffff;
  --card2:#f6f8ff;
  --chip:#eef2ff;
  --chipLine:#dee6ff;
  --heroText: rgba(255,255,255,.90);
  --pill: rgba(255,255,255,.16);
  --pillLine: rgba(255,255,255,.22);
}

html[data-theme="dark"]{
  --page:#070b18;
  --text:#eaf0ff;
  --muted:#a8b7db;
  --line: rgba(255,255,255,.10);
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --chip: rgba(255,255,255,.08);
  --chipLine: rgba(255,255,255,.12);
  --shadow: 0 18px 44px rgba(0, 0, 0, .40);
  --shadow2: 0 12px 28px rgba(0, 0, 0, .32);
  --heroText: rgba(255,255,255,.90);
  --pill: rgba(255,255,255,.14);
  --pillLine: rgba(255,255,255,.20);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background: var(--page);
}
.container{max-width:1100px;margin:0 auto;padding:0 16px;}
.hero{
  background:
    radial-gradient(1100px 700px at 15% 15%, rgba(255,255,255,.18), transparent 55%),
    radial-gradient(900px 600px at 85% 25%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(135deg, #173d9a, var(--blue1));
  color:#fff;
  padding:22px 0 26px;
}
.hero-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.pills{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.pill, .pill-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  background: var(--pill);
  border:1px solid var(--pillLine);
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
  font-size:12px;
  font-weight:750;
  color:#fff;
}
.pill-btn{
  cursor:pointer;
}
.pill svg{opacity:.95}
.hero-main{
  text-align:center;
  padding:18px 0 6px;
}
.hero-main h1{
  margin:0;
  font-size:46px;
  letter-spacing:.2px;
  line-height:1.05;
}
.hero-main p{
  margin:12px auto 0;
  max-width:72ch;
  font-size:15px;
  line-height:1.55;
  color: var(--heroText);
}
.stat-row{
  margin-top:22px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}
@media (max-width: 980px){
  .stat-row{grid-template-columns: repeat(2, 1fr);}
  .hero-main h1{font-size:38px;}
}
@media (max-width: 520px){
  .stat-row{grid-template-columns: 1fr;}
  .hero-main h1{font-size:34px;}
}
.stat{
  background: rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  padding:14px 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.stat .left{display:flex;align-items:center;gap:10px;}
.icon{
  width:42px;height:42px;border-radius:14px;
  background: rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.24);
  display:grid;place-items:center;
}
.stat .num{font-size:22px;font-weight:900;line-height:1;}
.stat .lbl{margin-top:4px;font-size:12px;color: rgba(255,255,255,.88);}

.main{
  margin-top:-20px;
  padding-bottom:34px;
}
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-h{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.card-h h2{margin:0;font-size:14px;letter-spacing:.2px;}
.card-b{padding:16px 18px;}

.kpi{
  font-weight:950;
  font-family: var(--mono);
  font-size:13px;
  color: var(--text);
  background: var(--chip);
  border:1px solid var(--chipLine);
  padding:6px 10px;
  border-radius:999px;
}

.progress-card{
  margin-top:14px;
  padding:14px 16px;
  border-radius: 18px;
  border:1px solid var(--line);
  background: var(--card2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.progress-left{display:flex;gap:12px;align-items:center;}
.progress-badge{
  width:42px;height:42px;border-radius:14px;
  background: rgba(45,91,255,.12);
  border:1px solid rgba(45,91,255,.18);
  display:grid;place-items:center;
}
.progress-title{font-weight:900;font-size:13px;margin:0;}
.progress-sub{margin:4px 0 0;color:var(--muted);font-size:12px;}
.bar{height:10px;width:100%;background:rgba(45,91,255,.12);border-radius:999px;overflow:hidden;}
.bar > div{height:100%;width:0%;background: linear-gradient(90deg, var(--blue1), var(--blue2));border-radius:999px;transition: width .25s ease;}

.section-title{
  margin:0 0 10px;
  font-size:12px;
  color: var(--muted);
  letter-spacing:.25px;
  text-transform:uppercase;
}
.poll-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
.poll-sections{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:start;
}
@media (max-width: 980px){
  .poll-sections{grid-template-columns: 1fr;}
}
.scenario{
  background: var(--card2);
  border:1px solid var(--line);
  border-radius: 14px;
  padding:12px 12px;
  line-height:1.45;
}
.question{
  font-weight:950;
  font-size:16px;
  line-height:1.35;
  margin:10px 0 0;
}
.options{display:grid;gap:10px;margin-top:10px;}
.opt{
  display:flex; gap:10px; align-items:flex-start;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
  user-select:none;
}
.opt:hover{transform: translateY(-1px); border-color: rgba(45,91,255,.35); background: rgba(45,91,255,.04);}
.opt input{margin-top:2px; accent-color: var(--blue1);}
.opt .t{margin:0;font-weight:900;}
.opt .h{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.35;}

.btn{
  appearance:none;
  border:1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(45,91,255,.35); box-shadow: var(--shadow2);}
.btn:active{transform: translateY(0px);}
.btn.primary{
  border-color: rgba(45,91,255,.35);
  background: rgba(45,91,255,.08);
}
.btn.danger{
  border-color: rgba(255,77,109,.30);
  background: rgba(255,77,109,.08);
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
}

.reveal{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: var(--card2);
  padding:12px 12px;
  display:none;
}
.reveal.show{display:block;}
.chips{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:10px;}
.chip{
  display:inline-flex;gap:8px;align-items:center;
  padding:8px 10px;border-radius:999px;
  border:1px solid var(--chipLine);
  background: var(--chip);
  font-size:12px;
  font-weight:950;
}
.chip.ok{border-color: rgba(18,196,139,.25); background: rgba(18,196,139,.12); color: var(--text);}
.chip.bad{border-color: rgba(255,77,109,.25); background: rgba(255,77,109,.12); color: var(--text);}
.reveal ul{margin:8px 0 0 18px;color:var(--muted);}

.grid2{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:14px;
  align-items:start;
}
@media (max-width: 980px){
  .grid2{grid-template-columns: 1fr;}
}

.module{
  border:1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background: var(--card);
  box-shadow: var(--shadow2);
}
.module + .module{margin-top:12px;}
.module-h{
  padding:14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  user-select:none;
}
.module-h:hover{background: rgba(45,91,255,.04);}
.module-h .l{display:flex;align-items:center;gap:12px;}
.module-ic{
  width:44px;height:44px;border-radius:14px;
  background: rgba(45,91,255,.10);
  border:1px solid rgba(45,91,255,.18);
  display:grid;place-items:center;
}
.module-title{margin:0;font-weight:950;font-size:13px;}
.module-sub{margin:4px 0 0;color:var(--muted);font-size:12px;}
.chev{
  width:34px;height:34px;border-radius:12px;
  border:1px solid var(--line);
  background: var(--card);
  display:grid;place-items:center;
}
.module-b{padding:0 14px 14px;display:none;}
.module.open .module-b{display:block;}
.topic{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:12px 12px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background: var(--card);
  cursor:pointer;
}
.topic + .topic{margin-top:10px;}
.topic:hover{background: rgba(45,91,255,.04);border-color: rgba(45,91,255,.25);}
.topic .t{margin:0;font-weight:950;font-size:13px;}
.topic .m{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.35;}
.tag{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--chip);
  border:1px solid var(--chipLine);
  white-space:nowrap;
  font-family: var(--mono);
}
.tag.ok{background: rgba(18,196,139,.12); border-color: rgba(18,196,139,.22);}
.tag.bad{background: rgba(255,77,109,.12); border-color: rgba(255,77,109,.22);}

.badges{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.badge{
  border:1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow2);
  padding:12px 12px;
}
.badge .row{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.badge .name{font-weight:950;}
.badge .desc{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.35;}
.badge.locked{opacity:.55}
.badge .stamp{
  font-family:var(--mono);
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--chip);
  border:1px solid var(--chipLine);
}
.footer{
  margin-top:16px;
  color: var(--muted);
  font-size:12px;
  text-align:center;
}


/* --- Layout Adjustment: Move Daily Poll Down --- */
.main {
  margin-top: 40px;
}

/* --- Dark Theme Header Override --- */
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0b1120 100%);
}

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

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