:root {
  --bg: #eee8fb;
  --bg-deep: #ddd2f6;
  --card: rgba(247, 243, 255, 0.9);
  --card-strong: #f4eeff;
  --ink: #221840;
  --muted: #5f4f84;
  --line: rgba(65, 31, 135, 0.14);
  --teal: #7147d4;
  --teal-deep: #411f87;
  --orange: #9361f5;
  --orange-deep: #784099;
  --gold: #9361f5;
  --success: #4f8f78;
  --danger: #a64f79;
  --shadow: 0 20px 60px rgba(43, 25, 82, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Lexend", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(147, 97, 245, 0.34), transparent 28rem),
    radial-gradient(circle at top right, rgba(113, 71, 212, 0.22), transparent 24rem),
    linear-gradient(180deg, #f4efff 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

.page-shell {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0 1rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--teal);
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.02;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  max-width: 10ch;
}

.hero-text {
  margin: 1rem 0 0;
  max-width: 54ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.release-pill {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(244, 238, 255, 0.95);
  border: 1px solid rgba(37, 24, 62, 0.08);
  box-shadow: var(--shadow);
}

.release-pill span {
  color: var(--muted);
  font-size: 0.92rem;
}

.release-pill i {
  color: var(--orange-deep);
}

.release-pill strong {
  color: var(--teal-deep);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: 34px;
  background:
    linear-gradient(160deg, rgba(113, 71, 212, 0.2), rgba(255, 255, 255, 0.62)),
    rgba(241, 233, 255, 0.78);
  border: 1px solid rgba(37, 24, 62, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.device-image {
  width: min(280px, 80%);
  max-height: 84%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 36px rgba(53, 30, 104, 0.3));
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.info-panel,
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.info-panel {
  position: sticky;
  top: 1rem;
  padding: 1.3rem;
  border-radius: var(--radius-xl);
}

.info-panel h2 {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}

.info-panel h2 i,
.step-head h2 i,
.advanced-panel summary i {
  margin-right: 0.45rem;
  color: var(--teal);
}

.tip-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.tip-list i {
  width: 1.15rem;
  margin-right: 0.4rem;
  color: var(--teal);
}

.tip-list li + li {
  margin-top: 0.45rem;
}

.cable-figure {
  margin: 1rem 0 0;
  padding: 0.7rem;
  border-radius: var(--radius-lg);
  background: rgba(244, 238, 255, 0.86);
  border: 1px solid rgba(37, 24, 62, 0.1);
}

.cable-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.cable-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.browser-note,
.status-box {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(113, 71, 212, 0.1);
  border: 1px solid rgba(113, 71, 212, 0.18);
  color: var(--teal-deep);
  line-height: 1.55;
}

.browser-note.is-warning,
.status-box.is-warning {
  background: rgba(147, 97, 245, 0.14);
  border-color: rgba(147, 97, 245, 0.22);
  color: var(--orange-deep);
}

.browser-note.is-danger,
.status-box.is-danger {
  background: rgba(187, 90, 56, 0.12);
  border-color: rgba(187, 90, 56, 0.18);
  color: var(--danger);
}

.browser-note.is-success,
.status-box.is-success,
.success-box {
  background: rgba(43, 138, 103, 0.12);
  border-color: rgba(43, 138, 103, 0.18);
  color: var(--success);
}

.advanced-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.advanced-copy {
  color: var(--muted);
  line-height: 1.65;
}

.log-output {
  margin: 0;
  padding: 0.9rem;
  max-height: 220px;
  overflow: auto;
  border-radius: var(--radius-md);
  background: #1e1730;
  color: #ece3ff;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.steps {
  display: grid;
  gap: 1rem;
}

.step-card {
  position: relative;
  padding: 1.3rem;
  border-radius: var(--radius-xl);
}

.step-card.is-locked {
  opacity: 0.58;
}

.step-card.is-complete {
  background: rgba(239, 229, 255, 0.92);
  border-color: rgba(113, 71, 212, 0.32);
}

.step-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.step-head h2 {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.step-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #271950;
  font-weight: 800;
  font-size: 1.05rem;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.primary-btn,
.ghost-btn,
.install-btn::part(button) {
  font: inherit;
}

.primary-btn i,
.ghost-btn i,
.install-btn i {
  margin-right: 0.45rem;
}

.primary-btn,
.ghost-btn,
.install-btn,
esp-web-install-button::part(button) {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.15rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: white;
  box-shadow: 0 18px 28px rgba(65, 31, 135, 0.3);
}

.install-btn,
esp-web-install-button::part(button) {
  background: linear-gradient(135deg, var(--orange), var(--teal));
  color: #f8f2ff;
  box-shadow: 0 14px 24px rgba(65, 31, 135, 0.24);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.ghost-btn {
  background: rgba(37, 24, 62, 0.07);
  color: var(--ink);
}

esp-web-install-button {
  --esp-tools-button-color: #7147d4;
  --esp-tools-button-text-color: #f4eeff;
  --esp-tools-button-border-radius: 999px;
}

.install-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(244, 238, 255, 0.84);
  border: 1px dashed rgba(113, 71, 212, 0.34);
}

.install-note {
  margin: 0 0 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 260px;
  }

  .info-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
  }

  .hero {
    padding-top: 0.75rem;
  }

  h1 {
    max-width: 12ch;
  }

  .step-head h2 {
    font-size: 1.7rem;
  }

  .step-card,
  .info-panel {
    padding: 1rem;
    border-radius: 22px;
  }
}
