:root {
  color-scheme: dark;
  --ink: #f3f7fa;
  --muted: #91a8b7;
  --panel: #0d202d;
  --line: rgba(108, 166, 194, .2);
  --green: #159cff;
  --blue: #159cff;
  --cyan: #1fe0df;
  --yellow: #ffd43b;
  --bg: #050d14;
  --bg-deep: #07131c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(16, 123, 184, .16), transparent 34rem),
    radial-gradient(circle at 28% 105%, rgba(20, 152, 255, .08), transparent 38rem),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; }
.site-header, main, footer { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,212,59,.28); border-radius: 13px; background: rgba(255,212,59,.08); }
.brand-mark svg { width: 27px; fill: var(--yellow); stroke: var(--yellow); stroke-width: 2.5; stroke-linecap: round; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.site-nav a:hover { color: var(--ink); }
.source-link { color: var(--muted); text-decoration: none; font-size: .9rem; }
.source-link:hover { color: var(--green); }

.hero { min-height: 620px; padding: 52px 0 64px; display: grid; grid-template-columns: 1.65fr .72fr; align-items: center; gap: 48px; }
.eyebrow { margin: 0 0 18px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(60,230,174,.11); }
h1 { margin: 0; font-size: clamp(3rem, 5.2vw, 4.85rem); line-height: .95; letter-spacing: -.06em; max-width: 850px; }
h1 em { color: var(--yellow); font-style: normal; }
.lede { max-width: 660px; margin: 28px 0 36px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.24rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.primary-link, .secondary-link { min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; text-decoration: none; font-weight: 800; }
.primary-link { color: #fff; background: var(--blue); box-shadow: 0 8px 28px rgba(21,156,255,.2); }
.primary-link:hover { background: #38adff; transform: translateY(-1px); }
.secondary-link { color: var(--ink); border: 1px solid var(--line); background: rgba(13,32,45,.5); }
.secondary-link:hover { color: var(--cyan); border-color: rgba(31,224,223,.45); }

.install-panel { max-width: 720px; overflow: hidden; border: 1px solid #1c4155; border-radius: 18px; background: rgba(12,29,41,.88); box-shadow: 0 28px 80px rgba(0,0,0,.28); backdrop-filter: blur(16px); }
.release-row { padding: 18px 20px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.release-row .label { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 4px; }
.chip { white-space: nowrap; color: var(--cyan); border: 1px solid rgba(31,224,223,.3); background: rgba(31,224,223,.07); padding: 7px 10px; border-radius: 999px; font: 700 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.install-action { padding: 20px; display: grid; grid-template-columns: minmax(190px, 250px) 1fr; align-items: center; gap: 19px; }
.install-action p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.install-button { width: 100%; min-height: 53px; border: 0; border-radius: 10px; cursor: pointer; color: #fff; background: var(--green); font: 800 1rem inherit; box-shadow: 0 8px 28px rgba(21,156,255,.22); }
.install-button:hover { background: #38adff; transform: translateY(-1px); }
esp-web-install-button { display: block; }
esp-web-install-button span { color: var(--yellow); font-size: .88rem; line-height: 1.4; }

.device-card { position: relative; min-height: 390px; padding: 22px; display: grid; place-items: center; overflow: hidden; border-radius: 26px; border: 1px solid #1c4155; background: linear-gradient(145deg, rgba(14,34,47,.94), rgba(8,24,35,.9)); }
.device-card::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; }
.device-image { position: relative; z-index: 1; display: block; width: 100%; max-width: 360px; height: auto; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.38)); }

.background-story { padding: 90px 0 110px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; border-top: 1px solid var(--line); }
.background-copy > p:first-child { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.source-note { margin: 24px 0 0; color: #6f8998; font-size: .8rem; line-height: 1.6; }
.source-note a { color: var(--blue); text-underline-offset: 3px; }

.hardware { padding: 90px 0 110px; border-top: 1px solid var(--line); }
.hardware > div:first-child { max-width: 760px; }
.section-intro { margin: 24px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.hardware-list { margin-top: 48px; display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.hardware-list article { min-height: 210px; padding: 27px 28px; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: rgba(10,25,36,.96); }
.hardware-list article > span { color: var(--blue); font: 700 .76rem ui-monospace, monospace; }
.hardware-list h3 { margin-bottom: 10px; }
.hardware-list p { margin: 0; color: var(--muted); line-height: 1.65; }
.hardware-list a { color: var(--cyan); text-underline-offset: 3px; }
.compatibility-warning { margin-top: 20px; padding: 23px 26px; display: grid; grid-template-columns: minmax(190px,.42fr) 1fr; gap: 28px; border-left: 5px solid var(--yellow); background: rgba(255,200,87,.075); }
.compatibility-warning strong { color: var(--yellow); }
.compatibility-warning p { margin: 0; color: #d8d1b9; line-height: 1.6; }

.installer-section { padding: 90px 0 46px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: end; border-top: 1px solid var(--line); }
.installer-heading > p:last-child { margin: 22px 0 0; color: var(--muted); line-height: 1.65; }
.installer-section .install-panel { width: 100%; }

.warning { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 25px 28px; margin-bottom: 105px; border: 1px solid rgba(255,200,87,.37); border-left: 5px solid var(--yellow); background: rgba(255,200,87,.075); border-radius: 8px; }
.warning-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #151108; background: var(--yellow); border-radius: 50%; font-weight: 900; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.05; letter-spacing: -.045em; }
.warning h2 { font-size: 1.05rem; letter-spacing: 0; }
.warning p { margin: 7px 0 0; color: #d8d1b9; line-height: 1.55; }
.warning p + p { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,200,87,.2); }

.steps, .details, .help { padding: 0 0 110px; }
.section-heading { max-width: 710px; margin-bottom: 44px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.steps li { padding: 30px 34px 15px 0; display: grid; grid-template-columns: 54px 1fr; gap: 14px; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 34px; }
.steps li:last-child { border-right: 0; }
.steps li > span { color: var(--green); font: 700 .8rem ui-monospace, monospace; }
.steps .eyebrow { color: var(--blue); }
h3 { margin: 0 0 12px; font-size: 1.3rem; }
.steps p, .details > div > p:last-child, .help li { color: var(--muted); line-height: 1.65; }
.steps p { margin: 0; }

.how-to-use { padding: 90px 0 110px; display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; border-top: 1px solid var(--line); }
.use-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.use-steps li { padding: 25px 0; display: grid; grid-template-columns: 48px 1fr; gap: 14px; border-bottom: 1px solid var(--line); }
.use-steps li > span { color: var(--blue); font: 700 .8rem ui-monospace, monospace; }
.use-steps h3 { margin-bottom: 9px; }
.use-steps p { margin: 0; color: var(--muted); line-height: 1.7; }
.use-steps a { color: var(--cyan); text-underline-offset: 3px; }

.details { display: grid; grid-template-columns: 1fr 1fr; column-gap: 80px; border-top: 1px solid var(--line); padding-top: 88px; }
.details > div > p:last-child { max-width: 550px; }
.details dl { margin: 0; border-top: 1px solid var(--line); }
.details dl div { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); }.details dd { margin: 0; text-align: right; }
code { font-size: .8rem; color: var(--green); }
.downloads { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 35px; }
.downloads a { padding: 11px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .82rem; }
.downloads a:hover { color: var(--green); border-color: var(--green); }

.help { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; padding-top: 90px; border-top: 1px solid var(--line); }
.help ul { margin: 0; padding-left: 20px; }.help li { padding: 7px 0 7px 8px; }
footer { min-height: 90px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
footer a { text-decoration: none; } footer a:hover { color: var(--green); }

@media (max-width: 860px) {
  .site-nav a:not(.source-link) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 62px; gap: 44px; }
  .device-card { min-height: 350px; }
  .background-story, .installer-section, .how-to-use { grid-template-columns: 1fr; gap: 42px; }
  .hardware-list { grid-template-columns: 1fr; }
  .compatibility-warning { grid-template-columns: 1fr; gap: 8px; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li, .steps li + li { border-right: 0; border-bottom: 1px solid var(--line); padding: 25px 0; }
  .details, .help { grid-template-columns: 1fr; gap: 42px; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 26px, 1160px); }
  .source-link { font-size: 0; }.source-link span { font-size: 1rem; }
  .hero { min-height: auto; padding-top: 50px; }
  h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .background-story, .hardware, .how-to-use { padding: 80px 0; }
  .hardware-list article { min-height: auto; padding: 24px 20px; grid-template-columns: 34px 1fr; }
  .installer-section { padding: 80px 0 36px; }
  .release-row, .install-action { grid-template-columns: 1fr; align-items: stretch; }
  .release-row { flex-direction: column; align-items: flex-start; }
  .chip { white-space: normal; }
  .device-card { min-height: 310px; padding: 20px; }
  .warning { margin-bottom: 80px; }
  .details, .help { padding-bottom: 80px; }
  .details dl div { display: block; }.details dd { margin-top: 6px; text-align: left; }
  footer { align-items: flex-start; justify-content: center; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
