@font-face {
  font-family: Inter;
  src: url("../dist/assets/inter-latin-400-normal-C38fXH4l.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("../dist/assets/inter-latin-600-normal-LgqL8muc.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("../dist/assets/inter-latin-700-normal-Yt3aPRUw.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../dist/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../dist/assets/space-grotesk-latin-600-normal-DjKNqYRj.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color: #171817;
  background: #f7f6f2;
  font-family: Inter, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #f7f6f2;
  --paper-deep: #efede7;
  --ink: #171817;
  --night: #181917;
  --muted: #73736e;
  --line: rgba(23, 24, 23, .16);
  --orange: #f35b1f;
  --orange-dark: #cf4914;
  --green: #72b64b;
  --red: #a8352d;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

[hidden],
.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.updater-page {
  min-height: 100vh;
  overflow: hidden;
  background: var(--paper);
}

.updater-page > .zectrix-site-header {
  background: var(--paper) !important;
}

.updater-shell {
  height: calc(100vh - 92px);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(315px, 29.2vw) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.stage-panel {
  grid-row: 1 / 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 4.1vw, 66px) clamp(28px, 3.2vw, 52px) 36px;
  overflow: hidden;
  background: var(--night);
  color: #f2f0ea;
}

.stage-kicker,
.screen-eyebrow,
.stage-name,
.stepper strong {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  letter-spacing: .105em;
}

.stage-kicker {
  margin: 0;
  color: #8d8e89;
  font-size: 10px;
}

.stage-number {
  margin: clamp(54px, 7vh, 92px) 0 10px;
  color: var(--orange);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(150px, 16vw, 244px);
  font-weight: 500;
  letter-spacing: -.085em;
  line-height: .7;
}

.stage-name {
  margin: 38px 0 0;
  color: var(--orange);
  font-size: 14px;
}

.stage-copy {
  max-width: 350px;
  margin-top: 28px;
  color: #deddd8;
  font-size: 16px;
  line-height: 1.7;
}

.stage-copy p {
  margin: 0 0 22px;
}

.stage-bottom {
  padding-top: 44px;
}

.device-state {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.device-state-mark {
  width: 54px;
  height: 54px;
  position: relative;
  flex: 0 0 54px;
  border: 1px solid #75766f;
  border-radius: 50%;
}

.device-state-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #75766f;
  transform: translate(-50%, -50%);
}

.device-state.is-connecting .device-state-mark {
  border-color: var(--orange);
  animation: pulse 1.1s ease-in-out infinite;
}

.device-state.is-connecting .device-state-mark::after {
  background: var(--orange);
}

.device-state.is-connected .device-state-mark {
  border-color: var(--green);
}

.device-state.is-connected .device-state-mark::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 18px;
  width: 18px;
  height: 10px;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: rotate(-45deg);
}

.device-state.is-connected .device-state-mark::after {
  display: none;
}

.device-state strong,
.device-state small {
  display: block;
}

.device-state strong {
  font-size: 16px;
  font-weight: 600;
}

.device-state small {
  margin-top: 6px;
  color: #a5a59f;
  font-size: 13px;
}

.trouble-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #c8c7c2;
  font-size: 13px;
}

.trouble-link span {
  color: var(--orange);
  font-size: 22px;
  line-height: 1;
}

.workspace {
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 42px clamp(42px, 5.3vw, 86px) 28px;
  background: radial-gradient(circle at 42% 30%, rgba(255, 255, 255, .88), rgba(247, 246, 242, .72) 54%, rgba(239, 237, 231, .72));
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 28px 24px;
  color: #8f8f8a;
}

.stepper li::after {
  content: "";
  position: absolute;
  right: calc(-50% + 15px);
  bottom: 10px;
  left: 31px;
  height: 1px;
  background: rgba(23, 24, 23, .17);
}

.stepper li:last-child::after {
  display: none;
}

.stepper span {
  font-size: 12px;
}

.stepper strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stepper i {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  display: block;
  border: 1px solid #aaa9a4;
  border-radius: 50%;
  background: var(--paper);
}

.stepper .is-active,
.stepper .is-complete {
  color: var(--ink);
}

.stepper .is-active span {
  color: var(--orange);
}

.stepper .is-active i {
  border: 2px solid var(--orange);
}

.stepper .is-complete i {
  border-color: var(--ink);
  background: var(--ink);
}

.stepper .is-complete i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 9px;
  height: 5px;
  border-bottom: 1px solid white;
  border-left: 1px solid white;
  transform: rotate(-45deg);
}

.screen-stack {
  width: min(100%, 790px);
  margin-top: clamp(52px, 7vh, 90px);
}

.updater-screen {
  animation: screen-in 260ms ease-out both;
}

.screen-eyebrow {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 10px;
}

.updater-screen h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(45px, 4.2vw, 68px);
  font-weight: 600;
  letter-spacing: -.058em;
  line-height: .98;
}

.screen-lead {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.connection-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 34px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.connection-instruction {
  min-height: 170px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 24px 26px 24px 0;
}

.connection-instruction + .connection-instruction {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}

.instruction-number {
  color: var(--orange);
  font: 600 10px/1 "Space Grotesk", sans-serif;
}

.connection-instruction strong,
.connection-instruction p {
  display: block;
}

.connection-instruction strong {
  font-size: 15px;
}

.connection-instruction p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.connection-card > .primary-action {
  grid-column: 1 / 3;
  margin: 0 0 20px;
}

.serial-monitor-option {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.serial-monitor-option strong,
.serial-monitor-option small {
  display: block;
}

.serial-monitor-option strong {
  font-size: 13px;
}

.serial-monitor-option small {
  max-width: 500px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.serial-monitor-option .secondary-action {
  min-width: 205px;
  font-size: 12px;
}

.connection-card > .text-action {
  grid-column: 1 / 3;
  justify-self: start;
  margin-bottom: 20px;
}

.browser-note {
  display: flex;
  gap: 10px;
  margin-top: 19px;
  color: var(--muted);
  font-size: 11px;
}

.browser-note strong {
  color: var(--ink);
}

.primary-action,
.secondary-action,
.text-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  border: 0;
  padding: 0 22px;
  font-weight: 600;
}

.primary-action {
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #111;
}

.primary-action:hover:not(:disabled) {
  border-color: var(--orange-dark);
  background: var(--orange-dark);
  color: white;
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.secondary-action {
  border: 1px solid var(--ink);
  background: transparent;
}

.secondary-action:hover {
  background: var(--ink);
  color: white;
}

.text-action {
  min-height: 34px;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0;
  background: transparent;
  font-size: 12px;
}

.drop-zone {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  border: 1px dashed rgba(23, 24, 23, .38);
  background: rgba(255, 255, 255, .32);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--orange);
  background: rgba(255, 255, 255, .66);
}

.drop-zone.has-file {
  border-style: solid;
}

.file-badge {
  display: grid;
  min-width: 52px;
  min-height: 62px;
  margin-bottom: 18px;
  place-items: end center;
  border: 1px solid #8d8d88;
  padding: 0 6px 7px;
  color: var(--orange);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.drop-zone strong {
  font-size: 14px;
}

.drop-zone > span:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.selected-file strong,
.selected-file small {
  display: block;
}

.selected-file strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.selected-file small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.privacy-note {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.setting-choice {
  display: grid;
  grid-template-columns: 24px 28px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 36px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  cursor: pointer;
}

.setting-choice input {
  position: absolute;
  opacity: 0;
}

.setting-check {
  width: 24px;
  height: 24px;
  grid-column: 2;
  position: relative;
  border: 1px solid var(--ink);
}

.setting-choice input:focus-visible + .setting-check {
  outline: 3px solid rgba(243, 91, 31, .34);
  outline-offset: 3px;
}

.setting-choice input:checked + .setting-check {
  border-color: var(--orange);
  background: var(--orange);
}

.setting-choice input:checked + .setting-check::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 11px;
  height: 6px;
  border-bottom: 2px solid white;
  border-left: 2px solid white;
  transform: rotate(-45deg);
}

.setting-choice > span:last-child {
  grid-column: 3;
}

.setting-choice strong,
.setting-choice small {
  display: block;
}

.setting-choice strong {
  font-size: 16px;
}

.setting-choice small {
  max-width: 620px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.wifi-panel {
  margin-top: 18px;
  padding: 24px;
  background: rgba(23, 24, 23, .045);
}

.wifi-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wifi-heading span {
  color: var(--orange);
  font: 600 9px/1 "Space Grotesk", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wifi-panel > p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.wifi-panel label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
}

.wifi-panel input,
.advanced-panel input,
.advanced-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 12px;
  background: var(--paper);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
}

.password-row input {
  border-right: 0;
}

.password-row button {
  border: 1px solid var(--line);
  padding: 0 15px;
  background: var(--paper);
  font-size: 11px;
}

.wifi-panel .memory-note {
  margin-bottom: 0;
}

.review-list {
  margin: 34px 0 0;
  border-top: 1px solid var(--ink);
}

.review-list div {
  min-height: 58px;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.review-list dt {
  color: var(--muted);
  font-size: 11px;
}

.review-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.install-warning {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-top: 20px;
  padding: 18px 20px;
  background: rgba(243, 91, 31, .09);
  font-size: 11px;
}

.install-warning span {
  max-width: 470px;
  color: var(--muted);
  line-height: 1.55;
}

.installation-status {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
  padding-top: 28px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: rgba(23, 24, 23, .13);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 240ms ease;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
}

.progress-copy span {
  color: var(--orange);
}

.result-list {
  display: grid;
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.result-list li {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.result-list li span {
  width: 18px;
  height: 18px;
  position: relative;
  border: 1px solid #aaa9a4;
  border-radius: 50%;
}

.result-list li.is-complete {
  color: var(--ink);
}

.result-list li.is-complete span {
  border-color: var(--green);
  background: var(--green);
}

.result-list li.is-complete span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 4px;
  border-bottom: 1px solid white;
  border-left: 1px solid white;
  transform: rotate(-45deg);
}

.firmware-behavior-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.completion-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.advanced-wrap {
  width: min(100%, 790px);
  margin-top: auto;
  padding-top: 34px;
}

.advanced-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.advanced-trigger[aria-expanded="true"] span:last-child {
  transform: rotate(180deg);
}

.advanced-panel {
  padding: 22px 0 6px;
}

.advanced-panel > p {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.advanced-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.advanced-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.advanced-files {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.advanced-file-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 10px;
}

.advanced-file-picker {
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: var(--paper);
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced-file-row .text-action {
  align-self: center;
}

.workspace-actions {
  width: min(100%, 790px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  padding-top: 20px;
}

.workspace-actions .text-action {
  margin-right: auto;
}

.workspace-actions .primary-action {
  min-width: 180px;
}

.log-drawer {
  height: 52px;
  max-height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #f0efeb;
}

.log-drawer.is-open {
  height: min(var(--log-drawer-height, 300px), 100%);
}

.log-resize-handle {
  height: 14px;
  position: relative;
  z-index: 3;
  flex: 0 0 14px;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.log-drawer:not(.is-open) .log-resize-handle {
  display: none;
}

.log-resize-handle::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: #aaa9a4;
  transform: translateX(-50%);
  transition: width 140ms ease, background 140ms ease;
}

.log-resize-handle:hover::after,
.log-resize-handle:focus-visible::after,
body.is-resizing-log .log-resize-handle::after {
  width: 72px;
  background: var(--orange);
}

body.is-resizing-log {
  cursor: ns-resize;
  user-select: none;
}

.log-toolbar {
  min-height: 52px;
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
}

.log-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  padding: 0;
  background: transparent;
}

.log-toggle strong {
  font-size: 12px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 10px;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.live-indicator.is-idle {
  color: #8b8b86;
}

.live-indicator.is-reconnecting {
  color: var(--orange);
}

.live-indicator.is-reconnecting i {
  animation: pulse 1.1s ease-in-out infinite;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.log-actions button,
.log-search button {
  min-height: 34px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  font-size: 10px;
}

.log-actions button:hover,
.log-search button:hover {
  background: rgba(23, 24, 23, .06);
}

.log-actions .log-reboot {
  min-height: 30px;
  margin-right: 6px;
  border: 1px solid rgba(243, 91, 31, .42);
  border-radius: 999px;
  color: var(--orange);
  font-weight: 700;
}

.log-actions .log-reboot:disabled {
  border-color: rgba(23, 24, 23, .14);
  color: #9a9a94;
  cursor: not-allowed;
  opacity: .68;
}

.log-actions .log-reboot:disabled:hover {
  background: transparent;
}

.log-panel {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 14px 14px;
}

.log-search {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  padding: 8px 0;
}

.log-search input {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 0 10px;
  background: #111;
  color: white;
}

#terminal {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
  padding: 12px 10px;
  background: #111;
}

#terminal .xterm-viewport {
  overflow-y: scroll !important;
  pointer-events: auto !important;
  scrollbar-color: #777772 #20211f;
  scrollbar-width: auto;
}

#terminal .xterm-screen {
  width: calc(100% - 15px) !important;
  max-width: calc(100% - 15px) !important;
  overflow: hidden;
}

#terminal .xterm-viewport::-webkit-scrollbar {
  width: 15px;
}

#terminal .xterm-viewport::-webkit-scrollbar-track {
  background: #20211f;
}

#terminal .xterm-viewport::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 3px solid #20211f;
  border-radius: 999px;
  background: #777772;
}

#terminal .xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: #aaa9a4;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  background: var(--night);
  color: white;
  font-size: 12px;
  box-shadow: 0 16px 44px rgba(23, 24, 23, .22);
}

.toast.is-error {
  background: var(--red);
}

dialog {
  width: min(620px, calc(100% - 40px));
  border: 0;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}

dialog::backdrop {
  background: rgba(13, 14, 13, .76);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

dialog form {
  position: relative;
  padding: 42px;
}

dialog h2,
.blocking-message h2 {
  margin: 0;
  font: 600 38px/.98 "Space Grotesk", sans-serif;
  letter-spacing: -.045em;
}

dialog p,
dialog li,
.blocking-message p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

dialog ol {
  margin: 24px 0;
  padding-left: 22px;
}

dialog li + li {
  margin-top: 9px;
}

.dialog-close {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 20px;
  right: 20px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 23px;
}

.dialog-note {
  margin: 24px 0;
  padding: 18px;
  background: var(--paper-deep);
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 28px;
}

.official-links a {
  border-bottom: 1px solid currentColor;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 600;
}

.decision-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.decision-actions .text-action {
  justify-self: center;
  margin-top: 4px;
}

.blocking-message {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(247, 246, 242, .98);
}

.blocking-message > div {
  width: min(480px, 100%);
  text-align: center;
}

.blocking-message .secondary-action {
  margin-top: 18px;
}

:focus-visible {
  outline: 3px solid rgba(243, 91, 31, .38);
  outline-offset: 3px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .68; }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  .updater-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .workspace {
    padding-right: 36px;
    padding-left: 36px;
  }

  .stepper strong {
    display: none;
  }

  .stepper li {
    grid-template-rows: auto 24px;
  }

  .stepper li::after {
    bottom: 10px;
  }

  .stage-number {
    font-size: 150px;
  }
}

@media (max-width: 760px) {
  .updater-page > .zectrix-site-header {
    width: 100% !important;
  }

  .updater-shell {
    height: auto;
    min-height: auto;
    display: block;
    overflow: visible;
    border-top: 0;
  }

  .stage-panel {
    min-height: 360px;
    padding: 34px 20px 28px;
  }

  .stage-number {
    margin-top: 38px;
    font-size: 112px;
  }

  .stage-name {
    margin-top: 24px;
  }

  .stage-copy {
    margin-top: 18px;
    font-size: 14px;
  }

  .stage-copy p:nth-child(2) {
    display: none;
  }

  .stage-bottom {
    padding-top: 18px;
  }

  .device-state {
    min-height: 82px;
  }

  .device-state-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .device-state.is-connected .device-state-mark::before {
    top: 11px;
    left: 14px;
  }

  .trouble-link {
    margin-top: 24px;
  }

  .workspace {
    min-height: 720px;
    padding: 30px 20px 22px;
  }

  .stepper {
    gap: 8px;
  }

  .stepper li {
    min-width: 0;
  }

  .stepper li::after {
    right: calc(-50% + 4px);
    left: 24px;
  }

  .stepper span {
    font-size: 10px;
  }

  .stepper i {
    width: 18px;
    height: 18px;
  }

  .screen-stack {
    margin-top: 48px;
  }

  .updater-screen h1 {
    font-size: clamp(42px, 13vw, 56px);
  }

  .connection-card {
    grid-template-columns: 1fr;
  }

  .connection-instruction {
    min-height: 130px;
    grid-template-columns: 30px 1fr;
    padding: 22px 0;
  }

  .connection-instruction + .connection-instruction {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-left: 0;
  }

  .connection-card > .primary-action,
  .serial-monitor-option,
  .connection-card > .text-action {
    grid-column: 1;
  }

  .serial-monitor-option {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .serial-monitor-option .secondary-action {
    width: 100%;
  }

  .browser-note,
  .install-warning,
  .completion-actions {
    flex-direction: column;
  }

  .drop-zone {
    min-height: 200px;
  }

  .review-list div {
    grid-template-columns: 110px 1fr;
  }

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

  .advanced-file-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .advanced-file-row .text-action {
    grid-column: 2;
    justify-self: end;
  }

  .workspace-actions {
    gap: 18px;
  }

  .workspace-actions .primary-action {
    min-width: 140px;
  }

  .log-toolbar {
    gap: 8px;
    padding: 0 14px;
  }

  .log-toggle {
    min-width: 0;
    gap: 8px;
  }

  .log-drawer,
  .log-drawer.is-open {
    height: auto;
    max-height: none;
  }

  .log-resize-handle {
    display: none;
  }

  .log-actions button:not(#hide-log):not(#reboot-log) {
    display: none;
  }

  #terminal {
    min-height: 220px;
    flex: 0 0 220px;
    height: 220px;
  }

  dialog form {
    padding: 34px 24px;
  }

  dialog h2,
  .blocking-message h2 {
    font-size: 32px;
  }
}

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