:root {
  --bg: #0b0908;
  --surface: #15100d;
  --surface-2: #201711;
  --surface-3: #2a1c13;
  --line: #4b2f1f;
  --line-hot: #8f4b21;
  --text: #f4e9d9;
  --muted: #b8a693;
  --orange: #ff7a1a;
  --amber: #ffc057;
  --red: #e4482b;
  --green: #89d58a;
  --shadow: 0 28px 80px rgb(0 0 0 / 42%);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 2%, rgb(220 70 19 / 18%), transparent 30rem),
    radial-gradient(circle at 12% 24%, rgb(255 132 32 / 8%), transparent 24rem),
    linear-gradient(180deg, #100b08 0, var(--bg) 34rem);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(255 192 87 / 72%);
  outline-offset: 3px;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 40px));
  min-height: 80px;
  margin: 0 auto;
  border-bottom: 1px solid rgb(255 192 87 / 18%);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-hot);
  color: var(--amber);
  background: linear-gradient(145deg, #3a1d0e, #140e0b);
  box-shadow: inset 0 0 18px rgb(255 105 20 / 18%);
  font: 900 24px/1 Impact, "Arial Narrow", sans-serif;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  color: #fff1d4;
  font: 900 22px/0.9 Impact, "Arial Narrow", sans-serif;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.browser-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgb(12 9 8 / 68%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.browser-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.browser-badge.is-ready {
  color: var(--green);
  border-color: rgb(137 213 138 / 28%);
}

.browser-badge.is-error {
  color: #ff8c70;
  border-color: rgb(228 72 43 / 35%);
}

.language-switch {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #665547;
  font-size: 11px;
  font-weight: 800;
}

.language-switch button {
  padding: 8px 3px;
  border: 0;
  color: #7d6d5e;
  background: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"] {
  color: var(--amber);
}

main,
.footer {
  width: min(1440px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
  min-height: 590px;
  padding: 64px 0 70px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: #fff2dc;
  font: 900 clamp(52px, 7vw, 104px)/0.87 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.012em;
  text-wrap: balance;
  text-transform: uppercase;
  text-shadow: 0 8px 35px rgb(0 0 0 / 48%);
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 28px;
  color: #cdbba7;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 9px 12px;
  border: 1px solid rgb(255 192 87 / 16%);
  border-radius: 3px;
  color: #bda992;
  background: rgb(24 15 11 / 72%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.hero-facts li::before {
  margin-right: 8px;
  color: var(--orange);
  content: "+";
}

.hero-art {
  position: relative;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line-hot);
  background: #080706;
  box-shadow: var(--shadow), 0 0 80px rgb(190 47 14 / 15%);
}

.hero-art::before,
.hero-art::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.hero-art::before {
  inset: -12px 20px;
  border: 1px solid rgb(255 122 26 / 16%);
}

.hero-art::after {
  inset: 15% -34px;
  border-block: 1px solid rgb(255 122 26 / 12%);
}

.hero-art img {
  display: block;
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  object-fit: contain;
  background: #000;
}

.hero-art figcaption {
  padding: 11px 2px 0;
  color: #a08b76;
  font: 10px/1.2 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.installer {
  padding: 50px clamp(18px, 3.5vw, 54px) 54px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgb(255 122 26 / 5%), transparent 30%),
    rgb(18 13 10 / 92%);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin-bottom: 22px;
  color: #f8e8d1;
  font: 800 clamp(30px, 4vw, 48px)/1 "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
}

.setup-column {
  display: grid;
  gap: 22px;
}

.step-card,
.operation-card {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #38261b;
  background: linear-gradient(145deg, rgb(38 25 18 / 92%), rgb(18 13 10 / 96%));
}

.step-card::before,
.operation-card::before {
  position: absolute;
  top: -1px;
  left: 34px;
  width: 64px;
  height: 2px;
  content: "";
  background: var(--orange);
  box-shadow: 0 0 16px rgb(255 122 26 / 60%);
}

.operation-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    radial-gradient(circle at 90% 10%, rgb(201 48 20 / 15%), transparent 14rem),
    linear-gradient(150deg, #2b1a12, #120d0a 66%);
}

.step-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  margin-bottom: 26px;
}

.step-number {
  color: var(--orange);
  font: 800 13px/1 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.08em;
}

.step-heading h3 {
  margin-bottom: 7px;
  color: #f4e7d5;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.1;
}

.step-heading p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.device-row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 17px;
  border: 1px solid #3e2c20;
  background: rgb(8 7 6 / 42%);
}

.device-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.device-copy strong {
  overflow: hidden;
  color: #f4e7d5;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-copy span {
  color: #8f7b68;
  font: 10px/1.3 ui-monospace, "Cascadia Mono", monospace;
}

.button {
  display: inline-flex;
  min-height: 46px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.4;
}

.button-secondary {
  flex: 0 0 auto;
  border-color: #684328;
  color: #efc492;
  background: #2b1c13;
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--orange);
  background: #382116;
}

.select-label {
  display: block;
  margin: 0 0 8px;
  color: #8d7965;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  content: "";
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

select {
  width: 100%;
  min-height: 52px;
  padding: 0 46px 0 16px;
  appearance: none;
  border: 1px solid #5c3b26;
  border-radius: 2px;
  color: #f4e7d5;
  background: #110d0a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.validation {
  min-height: 21px;
  margin: 10px 0 18px;
  color: #a89380;
  font-size: 11px;
  line-height: 1.45;
}

.validation.is-loading::before,
.validation.is-valid::before,
.validation.is-error::before {
  margin-right: 7px;
  content: "•";
}

.validation.is-loading::before {
  color: var(--amber);
}

.validation.is-valid {
  color: var(--green);
}

.validation.is-error {
  color: #ff8c70;
}

.release-facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin: 0;
  border-top: 1px solid #38261b;
  border-left: 1px solid #38261b;
}

.release-facts > div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid #38261b;
  border-bottom: 1px solid #38261b;
}

.release-facts .hash-row {
  grid-column: 1 / -1;
}

.release-facts dt {
  margin-bottom: 5px;
  color: #7d6b5a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.release-facts dd {
  margin: 0;
  overflow: hidden;
  color: #d6c4af;
  font: 11px/1.4 ui-monospace, "Cascadia Mono", monospace;
  text-overflow: ellipsis;
}

.release-facts .hash-row dd {
  overflow-wrap: anywhere;
  color: #9ccf9c;
  text-overflow: initial;
}

.release-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 15px;
  color: #cfa26c;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.release-link:hover {
  color: var(--amber);
}

.progress-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 13px 0 10px;
}

.progress-heading strong {
  color: #f4e7d5;
  font-size: 15px;
}

.progress-heading span {
  color: var(--amber);
  font: 800 23px/1 ui-monospace, "Cascadia Mono", monospace;
}

progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: #0b0807;
}

progress::-webkit-progress-bar {
  background: #0b0807;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
  box-shadow: 0 0 14px rgb(255 122 26 / 55%);
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
}

.stages {
  display: grid;
  gap: 0;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.stages li {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 13px;
  min-height: 58px;
  color: #716153;
}

.stages li:not(:last-child)::after {
  position: absolute;
  top: 17px;
  bottom: -4px;
  left: 5px;
  width: 1px;
  content: "";
  background: #3a291e;
}

.stage-marker {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #594233;
  border-radius: 50%;
  background: #1d130f;
}

.stages strong,
.stages small {
  display: block;
}

.stages strong {
  margin-bottom: 4px;
  color: #917b67;
  font-size: 12px;
}

.stages small {
  font-size: 10px;
}

.stages li.is-active .stage-marker {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 15px rgb(255 122 26 / 72%);
}

.stages li.is-active strong {
  color: #f5d7b2;
}

.stages li.is-complete .stage-marker {
  border-color: var(--green);
  background: var(--green);
}

.action-zone {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #4a2e1d;
}

.consent-row {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 11px;
  align-items: start;
  color: #bca995;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}

.consent-row input {
  position: absolute;
  opacity: 0;
}

.custom-check {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid #6f4930;
  background: #100c09;
}

.consent-row input:checked + .custom-check {
  border-color: var(--orange);
  background: var(--orange);
}

.consent-row input:checked + .custom-check::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #160b05;
  border-left: 2px solid #160b05;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.consent-row input:focus-visible + .custom-check {
  outline: 3px solid rgb(255 192 87 / 72%);
  outline-offset: 3px;
}

.consent-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.45;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.button-primary {
  min-height: 56px;
  flex: 1;
  color: #1d0c04;
  background: linear-gradient(105deg, #e64b21, var(--orange) 55%, var(--amber));
  box-shadow: 0 12px 32px rgb(211 69 22 / 22%);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(105deg, #f1582c, #ff8d32 55%, #ffd078);
}

.button-danger {
  border-color: #9b3c2c;
  color: #ffb19e;
  background: #331511;
}

.power-warning {
  display: grid;
  grid-template-columns: 19px 1fr;
  gap: 9px;
  align-items: start;
  margin: 15px 0 0;
  color: #9c7761;
  font-size: 10px;
  line-height: 1.45;
}

.power-warning > span:first-child {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #743322;
  border-radius: 50%;
  color: #ef7558;
  font-size: 10px;
  font-weight: 900;
}

.power-warning > span:last-child {
  width: auto;
}

.next-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  margin: 24px 0;
  padding: 24px 28px;
  border: 1px solid #3d2a1f;
  background: #15100d;
}

.next-icon {
  display: grid;
  width: 46px;
  height: 54px;
  place-items: center;
  border: 2px solid #76604c;
  border-radius: 4px 4px 10px 4px;
  color: var(--amber);
  font: 800 11px/1 ui-monospace, monospace;
}

.next-card h2 {
  margin-bottom: 5px;
  font-size: 18px;
}

.next-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.next-card a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #d49b60;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.log-panel {
  margin-bottom: 42px;
  border: 1px solid #30231b;
  background: rgb(13 10 8 / 84%);
}

.log-panel summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  color: #a6917d;
  font-size: 11px;
}

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

.log-panel summary > span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.log-preview {
  overflow: hidden;
  color: #706052;
  font: 10px/1.3 ui-monospace, "Cascadia Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-preview.is-error {
  color: #ef7558;
}

.log-toggle {
  color: #b48254;
  font-weight: 800;
  text-transform: uppercase;
}

.when-open,
.log-panel[open] .when-closed {
  display: none;
}

.log-panel[open] .when-open {
  display: inline;
}

.log-content {
  position: relative;
  max-height: 290px;
  overflow: auto;
  padding: 15px 16px;
  border-top: 1px solid #30231b;
}

.log-content > button {
  position: sticky;
  top: 0;
  float: right;
  padding: 4px 8px;
  border: 1px solid #3e2c20;
  color: #a48469;
  background: #15100d;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.operation-log {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 60px 0 0;
  list-style: none;
}

.log-line {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  color: #998575;
  font: 10px/1.5 ui-monospace, "Cascadia Mono", monospace;
}

.log-line time {
  color: #5e5045;
}

.log-line.is-success span {
  color: var(--green);
}

.log-line.is-warning span {
  color: var(--amber);
}

.log-line.is-error span {
  color: #ff8063;
}

.footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 78px;
  border-top: 1px solid #2f2119;
  color: #938270;
  font-size: 10px;
}

.footer > span:first-child {
  color: #c5966c;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer > span:nth-child(2) {
  text-align: center;
}

.footer nav {
  display: flex;
  gap: 15px;
}

.footer a {
  color: #9f8269;
  text-decoration: none;
}

.footer a:hover,
.next-card a:hover {
  color: var(--amber);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 60px;
  }

  .hero-copy {
    text-align: center;
  }

  h1,
  .hero-lede {
    margin-inline: auto;
  }

  .hero-facts {
    justify-content: center;
  }

  .hero-art {
    width: min(100%, 430px);
  }

  .install-grid {
    grid-template-columns: 1fr;
  }

  .operation-card {
    min-height: 620px;
  }
}

@media (max-width: 700px) {
  .topbar,
  main,
  .footer {
    width: min(100% - 24px, 1440px);
  }

  .topbar {
    min-height: 68px;
  }

  .browser-badge {
    display: none;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .hero {
    gap: 40px;
    padding: 45px 0 55px;
  }

  h1 {
    font-size: clamp(46px, 15vw, 74px);
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-art {
    padding: 8px;
  }

  .installer {
    padding: 32px 14px 16px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .step-card,
  .operation-card {
    padding: 21px 16px;
  }

  .device-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-secondary {
    width: 100%;
  }

  .release-facts {
    grid-template-columns: 1fr 1fr;
  }

  .release-facts > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .operation-card {
    min-height: auto;
  }

  .next-card {
    grid-template-columns: auto 1fr;
    padding: 20px 16px;
  }

  .next-card a {
    grid-column: 1 / -1;
  }

  .log-panel summary {
    grid-template-columns: 1fr auto;
  }

  .log-preview {
    display: none;
  }

  .footer {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 24px 0;
  }

  .footer > span:nth-child(2) {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
