:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --text: #18202b;
  --muted: #667085;
  --line: #d7dee8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #0f766e;
  --green-dark: #115e59;
  --amber: #f59e0b;
  --shadow: 0 18px 55px rgba(24, 32, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.11), transparent 34%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.13), transparent 38%),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.installer {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 222, 232, 0.9);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 42px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(24, 32, 43, 0.14);
}

.eyebrow,
.card-kicker,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  margin-top: 4px;
}

.system-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
}

.system-row strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.segment {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: var(--text);
  color: #ffffff;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.actions.single-action {
  grid-template-columns: minmax(0, 1fr);
}

.install-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.single-action .install-card {
  min-height: 220px;
}

.install-card.accent {
  border-color: rgba(15, 118, 110, 0.34);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.07), #ffffff 62%);
}

.card-copy {
  min-height: 58px;
  margin: 14px 0 0;
  color: #3f4b5b;
  line-height: 1.65;
}

.package-meta {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.primary-action {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.primary-action:hover {
  background: var(--blue-dark);
}

.primary-action.secondary {
  background: var(--green);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.2);
}

.primary-action.secondary:hover {
  background: var(--green-dark);
}

.primary-action:disabled,
.segment:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.button-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
}

.button-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-panel {
  min-height: 52px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: #f5f9ff;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
  flex: 0 0 auto;
  margin-top: 7px;
}

.status-copy {
  display: grid;
  gap: 10px;
}

.status-panel p {
  margin: 0;
  color: #394657;
  line-height: 1.5;
}

#statusText {
  color: #183153;
  font-size: 17px;
  font-weight: 800;
}

.status-help {
  display: grid;
  gap: 8px;
}

.status-help p {
  color: #243b63;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.status-help strong {
  display: inline-flex;
  min-width: 82px;
  justify-content: center;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
}

.token-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #172554, #0f766e);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.token-banner .card-kicker,
.token-banner p {
  color: rgba(255, 255, 255, 0.82);
}

.token-banner h2 {
  margin-top: 4px;
  font-size: clamp(22px, 2.2vw, 28px);
}

.token-banner p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.token-link,
.guide-download {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.token-link {
  background: #ffffff;
  color: #172554;
}

.guide-section {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.guide-download {
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: var(--blue-dark);
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-step {
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.guide-step span {
  display: inline-flex;
  width: 36px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #dbeafe;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

.guide-step strong {
  display: block;
  color: #18202b;
  font-size: 17px;
}

.guide-step p {
  margin: 8px 0 0;
  color: #4a5568;
  line-height: 1.55;
  font-size: 14px;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.support-copy .card-copy {
  min-height: 0;
  margin-top: 10px;
}

.support-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.support-id span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.support-id strong {
  font-size: 18px;
  letter-spacing: 0;
}

.support-qr {
  width: min(280px, 100%);
  height: auto;
  object-fit: contain;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 560px);
    padding: 10px 0;
    align-items: start;
  }

  .installer {
    padding: 18px;
  }

  .brand {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .system-row,
  .actions {
    grid-template-columns: 1fr;
  }

  .system-row {
    display: grid;
  }

  .install-card {
    min-height: 0;
    padding: 18px;
  }

  .card-copy {
    min-height: 0;
  }

  .token-banner,
  .guide-head {
    grid-template-columns: 1fr;
  }

  .token-banner {
    padding: 18px;
  }

  .token-link,
  .guide-download {
    width: 100%;
  }

  .guide-head {
    display: grid;
  }

  .guide-steps {
    grid-template-columns: 1fr;
  }

  .support-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .support-qr {
    width: min(260px, 100%);
    justify-self: center;
  }
}
