:root {
  --ink: #14251f;
  --muted: #607168;
  --paper: #f3f1e8;
  --panel: #fffdf7;
  --line: #d5d2c5;
  --lime: #c5f45d;
  --lime-deep: #84a83c;
  --orange: #f47a46;
  --shadow: 0 18px 45px rgb(20 37 31 / 12%);
  font-family: "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body { margin: 0; }

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  column-gap: 70px;
  align-items: end;
  padding-bottom: 64px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--lime-deep);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1, h2 { letter-spacing: -0.055em; }

h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 5.2vw, 5.8rem);
  font-weight: 750;
  line-height: 0.9;
}

h1 span { color: var(--orange); }

h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 0.95; }

.intro { max-width: 560px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.55; }

.notice {
  border-top: 3px solid var(--ink);
  padding-top: 17px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.notice strong { display: block; margin-bottom: 4px; }
.notice span { color: var(--muted); }

.firmware { border-top: 1px solid var(--line); padding-top: 33px; }

.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; }

.reload {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reload:hover, .reload:focus-visible { color: var(--panel); background: var(--ink); }

.status { margin: 27px 0 0; color: var(--muted); }
.status.error { color: #af2e18; }

.firmware-list { display: grid; gap: 16px; margin-top: 27px; }

.variant {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 4px 0 rgb(20 37 31 / 4%);
}

.variant summary {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  padding: 22px;
  cursor: pointer;
  list-style: none;
}

.variant summary::-webkit-details-marker { display: none; }

.variant-mark {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 13px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.variant-title { display: block; font-size: 1.22rem; font-weight: 800; }
.variant-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 0.88rem; }
.version-count { color: var(--muted); font-size: 0.84rem; font-weight: 700; }

.versions { border-top: 1px solid var(--line); }

.older-releases { border-top: 1px solid var(--line); }
.older-releases > .older-releases-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 17px 22px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
}
.older-releases-toggle::before { content: "+"; }
.older-releases[open] > .older-releases-toggle::before { content: "-"; }
.older-releases-toggle::-webkit-details-marker { display: none; }
.older-releases-toggle:hover, .older-releases-toggle:focus-visible { color: var(--ink); }

.version {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1.5fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 22px;
}

.version + .version { border-top: 1px solid var(--line); }
.version-label { font-weight: 800; }
.release-date, .image-kind { display: block; margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.image-kind { color: var(--lime-deep); font-weight: 700; }
.binary-name { overflow-wrap: anywhere; color: var(--muted); font: 0.8rem/1.4 ui-monospace, "Cascadia Code", monospace; }

esp-web-install-button {
  --esp-tools-button-color: var(--ink);
  --esp-tools-button-text-color: var(--panel);
  --esp-tools-button-border-radius: 999px;
}

.unsupported { color: #af2e18; font-size: 0.84rem; }

.steps { margin-top: 74px; padding: 34px; border-radius: 18px; background: var(--ink); color: var(--panel); }
.steps .eyebrow { color: var(--lime); }
.steps ol { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.steps li { color: #d3ddd6; line-height: 1.45; }
.steps li span { display: block; margin-bottom: 10px; color: var(--lime); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.1em; }
.footnote { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 20%); color: #a9bbb0; font-size: 0.86rem; }

.site-footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto 42px; color: var(--muted); font-size: 0.88rem; }
.site-footer a { color: inherit; font-weight: 700; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); }

@media (max-width: 720px) {
  main { width: min(100% - 28px, 1120px); padding-top: 42px; }
  .hero { display: block; padding-bottom: 48px; }
  .notice { margin-top: 38px; }
  .variant summary { grid-template-columns: 42px minmax(0, 1fr); padding: 17px; }
  .version-count { grid-column: 2; }
  .version { grid-template-columns: 1fr; gap: 10px; padding: 17px; }
  .steps { margin-top: 50px; padding: 26px 22px; }
}
