@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap");

:root {
  color-scheme: dark;
  --ink: #e6edf3;
  --muted: #8b949e;
  --quiet: #6e7681;
  --paper: #0d1117;
  --surface: #161b22;
  --surface-soft: #11161d;
  --line: rgba(255, 255, 255, .1);
  --green: #3fb996;
  --green-dark: #3fb996;
  --green-hover: #26876b;
  --green-soft: rgba(63, 185, 150, .12);
  --orange: #3fb996;
  --orange-dark: #26876b;
  --red: #ff6b73;
  --red-soft: rgba(255, 66, 77, .12);
  --shadow: 0 18px 50px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 50% 7rem, rgba(63, 185, 150, .1), transparent 34rem), var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
.site-header, main, footer { width: min(900px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
}
.brand > span { display: flex; align-items: baseline; gap: 6px; }
.brand small { color: var(--green); font-size: 12px; font-weight: 600; }
.brand img {
  width: 44px;
  height: 44px;
  padding: 3px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.source-link { color: var(--muted); font-size: 14px; font-weight: 650; }
.source-link:hover { color: var(--green); }
main { padding: 68px 0 78px; }
.hero { max-width: 760px; margin-bottom: 52px; }
.eyebrow, .step-kicker, .summary-label {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2, h3, p { letter-spacing: -.012em; }
h1 { margin: 0; max-width: 690px; font-size: clamp(42px, 7vw, 67px); line-height: 1.03; letter-spacing: -.045em; }
.hero > p:not(.eyebrow) { max-width: 680px; margin: 20px 0 0; color: var(--muted); font-size: 19px; }
.support-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22, 27, 34, .76);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.support-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--quiet); }
.support-pill.supported { color: var(--green); border-color: rgba(63, 185, 150, .38); background: var(--green-soft); }
.support-pill.supported span { background: var(--green); }
.support-pill.unsupported { color: var(--red); border-color: rgba(255, 107, 115, .35); background: var(--red-soft); }
.support-pill.unsupported span { background: var(--red); }
.installer-flow {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.flow-step { padding: 30px; }
.flow-step + .flow-step { border-top: 1px solid var(--line); }
.step-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.step-number {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}
.step-kicker { margin: 0 0 2px; color: var(--muted); }
h2 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.choice-card:hover { border-color: rgba(63, 185, 150, .65); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.choice-card:focus-visible, .flash-button:focus-visible, summary:focus-visible { outline: 3px solid rgba(63, 185, 150, .4); outline-offset: 3px; }
.choice-card.selected { border: 2px solid var(--green); background: linear-gradient(145deg, var(--green-soft), var(--surface) 70%); box-shadow: 0 0 0 3px rgba(63, 185, 150, .1); }
.card-check {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.choice-card.selected .card-check { display: grid; }
.device-card { min-height: 264px; padding: 18px 20px 20px; }
.device-art { height: 126px; display: grid; place-items: center; margin-bottom: 8px; }
.device-art svg { width: 174px; max-width: 75%; height: 114px; fill: none; stroke: #69736e; stroke-width: 2; }
.device-art .screen { fill: #20272f; stroke: #59636e; }
.device-art path { stroke-linecap: round; }
.device-art .button-dot { fill: #69736e; }
.device-art .device-button { fill: #20272f; stroke: #69736e; }
.device-art .side-buttons { stroke-width: 3; }
.selected .device-art svg { stroke: var(--green-dark); }
.selected .device-art .screen { fill: rgba(63, 185, 150, .14); stroke: var(--green); }
.selected .device-art .button-dot { fill: var(--green-dark); }
.selected .device-art .device-button { fill: rgba(63, 185, 150, .14); stroke: var(--green); }
.card-copy { display: flex; flex-direction: column; }
.card-copy strong { font-size: 17px; }
.card-copy span { margin-top: 2px; color: var(--muted); font-size: 14px; }
.card-copy small { margin-top: 7px; color: var(--quiet); font-size: 12px; }
.firmware-card {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  cursor: default;
}
.firmware-card:hover { transform: none; }
.release-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.latest-badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.flash-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.flash-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 22px;
}
.summary-label { color: var(--orange-dark); }
.flash-summary p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.flash-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(38, 135, 107, .24);
}
.flash-button:hover:not(:disabled) { background: var(--green-hover); }
.flash-button:disabled { background: #30363d; color: #6e7681; cursor: not-allowed; box-shadow: none; }
.flash-button svg { width: 18px; height: 18px; fill: currentColor; }
.flash-note { margin: 0; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--quiet); font-size: 13px; }
.progress-panel { padding: 30px; border-top: 1px solid var(--line); background: var(--surface-soft); scroll-margin-top: 20px; }
.progress-panel[hidden] { display: none; }
.progress-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.progress-header .step-kicker { color: var(--green-dark); }
#progress-percent { color: var(--green-dark); font-size: 18px; }
.progress-track { height: 9px; margin: 18px 0 22px; overflow: hidden; border-radius: 999px; background: #242c34; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .18s ease; }
.progress-steps { list-style: none; margin: 0; padding: 0; }
.progress-steps li { display: flex; align-items: center; gap: 14px; min-height: 57px; border-top: 1px solid var(--line); color: var(--quiet); }
.progress-steps li:first-child { border-top: 0; }
.progress-steps li div { display: flex; flex-direction: column; }
.progress-steps li strong { color: inherit; font-size: 14px; }
.progress-steps li small { margin-top: 1px; color: var(--quiet); }
.status-icon { width: 18px; height: 18px; flex: 0 0 auto; border: 1.5px solid #aab1ad; border-radius: 50%; }
.progress-steps li.running { color: var(--ink); }
.progress-steps li.running .status-icon { border: 2px solid #30363d; border-top-color: var(--green); animation: spin .8s linear infinite; }
.progress-steps li.done { color: var(--green-dark); }
.progress-steps li.done .status-icon { display: grid; place-items: center; border-color: var(--green); background: var(--green); color: #fff; }
.progress-steps li.done .status-icon::after { content: "✓"; font-size: 11px; font-weight: 900; }
.progress-steps li.error { color: var(--red); }
.progress-steps li.error .status-icon { display: grid; place-items: center; border-color: var(--red); background: var(--red); color: #fff; }
.progress-steps li.error .status-icon::after { content: "!"; font-size: 11px; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-message { margin-top: 18px; padding: 14px 16px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark); font-size: 14px; font-weight: 650; }
.result-message[hidden] { display: none; }
.result-message.error { background: var(--red-soft); color: var(--red); }
.information-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.information-grid article { display: flex; gap: 15px; padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: rgba(22, 27, 34, .72); }
.info-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 900; }
.information-grid h2 { font-size: 16px; }
.information-grid p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
details { margin-top: 24px; padding: 0 3px 16px; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-size: 14px; font-weight: 750; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
footer { min-height: 86px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 700px) {
  .site-header, main, footer { width: min(100% - 26px, 900px); }
  main { padding: 44px 0 58px; }
  h1 { font-size: 43px; }
  .hero > p:not(.eyebrow) { font-size: 17px; }
  .flow-step, .progress-panel { padding: 22px 18px; }
  .device-grid, .information-grid { grid-template-columns: 1fr; }
  .device-card { min-height: 210px; display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; }
  .device-art { height: 120px; margin: 0; }
  .device-art svg { width: 128px; max-width: 100%; }
  .flash-summary { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .flash-button { width: 100%; }
  .flash-note { padding-inline: 18px; }
}

@media (max-width: 460px) {
  .site-header { min-height: 72px; }
  .source-link { font-size: 12px; }
  h1 { font-size: 37px; }
  .device-card { min-height: 0; grid-template-columns: 90px 1fr; padding: 15px; }
  .device-art { height: 96px; }
  .device-art svg { width: 94px; height: 88px; }
  .firmware-card { grid-template-columns: auto 1fr; }
  .latest-badge { display: none; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
