/* ───────────────────────────────────────────
   Base theme + layout
   ─────────────────────────────────────────── */
:root {
  --bg:#ffffff;
  --fg:#111114;
  --link:#0366d6;
  --card:#f5f7fa;
  --muted:#666;
}

html[data-theme="dark"] {
  --bg:#333333;
  --fg:#ffffff;
  --link:#58a6ff;
  --card:#2a2a2a;
  --muted:#aaa;
}

body {
  font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,sans-serif;
  margin:0;
  line-height:1.4;
  background:var(--bg);
  color:var(--fg);
}

.content {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
  text-align:center;
}

h2 {
  margin-top: 2em;
}

h3 {
  margin-top: 1.5em;
}

a {
  color: var(--link);
}

.hidden {
  display:none;
}

/* ───────────────────────────────────────────
   Footer
   ─────────────────────────────────────────── */
.footer {
  margin-top:24px;
  border-top:1px solid #ccc;
  padding-top:24px;
  text-align:center;
  font-size:10px;
  position:fixed;
  bottom:5px;
  width:100%;
  left:0;
}

.footer .initiative {
  font-style: italic;
  margin-top: 16px;
  color: var(--muted);
}

.footer h4 {
  text-align:center;
  font-size:12px;
  color:var(--fg);
  font-weight:normal;
  margin: 0;
}

.disbtn {
  display:inline-block;
  max-width:120px;
  padding:2px 20px 10px;
  border-radius:35px;
  background:white;
}

.disbtn:hover img {
  filter: contrast(220%) hue-rotate(30deg);
}

/* ───────────────────────────────────────────
   Device select + firmware radios
   ─────────────────────────────────────────── */
.sel_device {
  width:100%;
  max-width:300px;
  margin:0 auto;
  padding:5px 10px;
  font-size:18px;
  border-radius:10px;
}

.hiddenradio {
  display:inline-block;
  padding:5px;
}

.hiddenradio [type=radio]{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}

.hiddenradio [type=radio] + img {
  cursor:pointer;
  display:inline-block;
  width:80px;
  border-radius:12px;
  border:2px solid gray;
  background:black;
  padding:4px;
}

.hiddenradio [type=radio]:checked + img {
  outline:3px solid #f00;
  filter:brightness(1.15);
}

.hiddenradio label span{
  display:block;
  width:100%;
  text-align:center;
  cursor:pointer;
}

.hiddenradio [type=radio]:checked ~ span {
  text-shadow:1px 1px 3px rgba(0,0,0,.5);
  color:#a8fff4;
}

/* ───────────────────────────────────────────
   Theme toggle
   ─────────────────────────────────────────── */
.theme-toggle {
  position:absolute;
  right:16px;
  top:16px;
  border:1px solid #999;
  background:var(--card);
  color:var(--fg);
  border-radius:12px;
  padding:6px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.theme-toggle img {
  width:22px;
  height:22px;
  display:block;
}

.theme-toggle:focus {
  outline:2px solid var(--link);
  outline-offset:2px;
}

/* ───────────────────────────────────────────
   Driver helper banner
   ─────────────────────────────────────────── */
.driver-banner {
  margin: 12px auto;
  max-width: 600px;
  background:#075;
  color:#def;
  padding:10px;
  border-radius:10px;
  border:1px solid #0aa;
}

html[data-theme="light"] .driver-banner {
  background:#0b5;
  color:#021;
}
