:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #121a2f;
  --muted: #9fb0d0;
  --text: #eef4ff;
  --line: #253251;
  --accent: #62d6ff;
  --danger: #ff7a90;
  --ok: #7dffa7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1c3766 0, transparent 32rem), var(--bg);
  color: var(--text);
}

main {
  width: min(1080px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.hero { margin-bottom: 1.5rem; }

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: .95;
  margin-bottom: 1rem;
}

h2 { margin-bottom: 0; }

.hero p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 20px 70px rgb(0 0 0 / .25);
}

.support {
  margin-bottom: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.support.ok { color: var(--ok); }
.support.bad { color: var(--danger); }

label {
  display: grid;
  gap: .45rem;
  color: var(--muted);
  font-size: .9rem;
}

select, input, button {
  min-height: 2.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d1426;
  color: var(--text);
  font: inherit;
  padding: 0 .8rem;
}

button {
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

button.primary {
  border-color: #2c8fb5;
  background: #14506b;
}

button.danger {
  border-color: #a43e55;
  background: #642332;
}

button.success {
  border-color: #228948;
  background: #146334;
}

.actions {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin: 1rem 0;
}

.connect-stack {
  display: grid;
  gap: .75rem;
}

.connect-stack > button {
  justify-self: start;
}

.picker-row,
.wifi-row {
  display: grid;
  grid-template-columns: minmax(160px, .45fr) minmax(240px, 1fr);
  gap: 1rem;
}

.softap-toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.softap-toggle input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.flash-stack {
  display: flex;
  align-items: end;
  gap: .75rem;
}

.flash-stack label {
  min-width: 130px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.status-grid div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .75rem;
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .35rem;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

progress {
  width: min(220px, 100%);
  vertical-align: middle;
}

pre {
  min-height: 14rem;
  max-height: 28rem;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 14px;
  background: #050812;
  border: 1px solid #172039;
  color: #d5e7ff;
  white-space: pre-wrap;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.release {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.release:first-child { border-top: 0; padding-top: 0; }

.release h3 {
  margin: 0 0 .35rem;
}

.release small { color: var(--muted); }

.assets {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .7rem;
}

.asset {
  display: inline-block;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: .85rem;
}

@media (max-width: 760px) {
  main { padding: 2rem 0; }
  .actions, .picker-row, .wifi-row, .status-grid { grid-template-columns: 1fr; }
  .flash-stack { align-items: stretch; }
}
