:root {
  color-scheme: dark;
  --ink: #f3f5ef;
  --muted: #a5aea7;
  --dim: #68716a;
  --ground: #0b0d0c;
  --panel: #111411;
  --line: #2a302b;
  --acid: #b8ff31;
  --amber: #ffb629;
  --danger: #ff6d4d;
  --max: 1440px;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, Pretendard, "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(184, 255, 49, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 255, 49, 0.028) 1px, transparent 1px),
    var(--ground);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, rgba(184, 255, 49, 0.04), transparent 36%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  overflow-wrap: anywhere;
}

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

.skip-link:focus-visible,
a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  background: var(--acid);
  color: #071000;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(calc(100% - 48px), var(--max));
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.wordmark-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--acid);
  color: #081000;
  font-family: var(--mono);
  font-weight: 900;
}

.header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.header-links a,
.footer-links a {
  color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.header-links a:hover,
.header-links a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--acid);
}

.release-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--acid);
  white-space: nowrap;
}

.release-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

main,
footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 690px;
  grid-template-columns: minmax(0, 1.16fr) minmax(380px, 0.84fr);
  align-items: stretch;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  padding: 100px 6.2vw 80px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 28px;
  font-size: clamp(3.1rem, 6.2vw, 6.6rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-lede,
.hero-fact,
.hero-boundary {
  max-width: 760px;
  color: var(--muted);
  word-break: keep-all;
}

.hero-lede {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.3vw, 1.24rem);
}

.hero-fact {
  margin-bottom: 14px;
}

.hero-boundary {
  margin-bottom: 40px;
}

.jump-link {
  display: inline-flex;
  min-width: 210px;
  padding: 17px 20px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.jump-link:hover,
.jump-link:focus-visible {
  background: var(--acid);
  color: #081000;
}

.hero-instrument {
  display: grid;
  min-width: 0;
  border-left: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 10px
    ),
    #0d100e;
  grid-template-rows: auto 1fr auto;
}

.instrument-top {
  display: flex;
  padding: 20px 24px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.signal-field {
  position: relative;
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
}

.signal-field::before,
.signal-field::after {
  position: absolute;
  background: rgba(184, 255, 49, 0.12);
  content: "";
}

.signal-field::before {
  width: 1px;
  height: 100%;
}

.signal-field::after {
  width: 100%;
  height: 1px;
}

.signal-orbit {
  position: absolute;
  border: 1px solid rgba(184, 255, 49, 0.2);
  border-radius: 50%;
}

.orbit-one {
  width: 300px;
  height: 300px;
}

.orbit-two {
  width: 440px;
  height: 440px;
  border-style: dashed;
  opacity: 0.5;
  animation: spin 28s linear infinite;
}

.signal-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 150px;
  height: 150px;
  place-content: center;
  border: 1px solid var(--acid);
  background: rgba(184, 255, 49, 0.035);
  box-shadow: 0 0 70px rgba(184, 255, 49, 0.1);
  text-align: center;
}

.signal-core::before,
.signal-core::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--acid);
  content: "";
}

.signal-core::before {
  top: -1px;
  left: -1px;
  border-top: 3px solid;
  border-left: 3px solid;
}

.signal-core::after {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid;
  border-bottom: 3px solid;
}

.signal-core span {
  font-family: var(--mono);
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.signal-core small {
  color: var(--acid);
  font-family: var(--mono);
  letter-spacing: 0.28em;
}

.signal-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--acid);
  background: var(--ground);
  box-shadow: 0 0 12px rgba(184, 255, 49, 0.7);
}

.dot-one {
  top: 24%;
  left: 22%;
}

.dot-two {
  right: 19%;
  bottom: 30%;
}

.dot-three {
  top: 34%;
  right: 27%;
  width: 5px;
  height: 5px;
}

.instrument-stats {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.instrument-stats div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.instrument-stats div:last-child {
  border-right: 0;
}

.instrument-stats dt,
.instrument-stats dd {
  font-family: var(--mono);
}

.instrument-stats dt {
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.instrument-stats dd {
  margin: 0;
  font-size: 0.74rem;
}

.runtime-strip {
  display: grid;
  border: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.runtime-item {
  display: grid;
  min-height: 76px;
  padding: 18px 22px;
  align-items: center;
  border-right: 1px solid var(--line);
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.runtime-item:last-child {
  border-right: 0;
}

.runtime-item span:not(.status-lamp),
.runtime-item strong {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.runtime-item span:not(.status-lamp) {
  color: var(--dim);
}

.runtime-item strong {
  grid-column: 2;
  font-size: 0.76rem;
}

.status-lamp {
  width: 9px;
  height: 9px;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(255, 182, 41, 0.5);
}

.status-lamp.ready {
  background: var(--acid);
  box-shadow: 0 0 14px rgba(184, 255, 49, 0.5);
}

.status-lamp.blocked {
  background: var(--danger);
  box-shadow: 0 0 14px rgba(255, 109, 77, 0.45);
}

.installer-section,
.procedure-section {
  padding: 118px 0;
}

.section-heading {
  display: flex;
  margin-bottom: 54px;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.section-heading h2,
.procedure-copy h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 4.8vw, 5.1rem);
  letter-spacing: 0;
  line-height: 1;
}

.section-heading > p {
  max-width: 520px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.93rem;
  text-align: right;
  word-break: keep-all;
}

.installer-console {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(184, 255, 49, 0.07), transparent 36%),
    var(--panel);
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
}

.installer-console::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--acid);
  content: "";
}

.target-picker,
.flash-panel {
  min-width: 0;
  padding: clamp(30px, 4vw, 62px);
}

.target-picker {
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 10px
    );
}

.target-picker > label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.select-shell {
  position: relative;
}

.select-shell select {
  width: 100%;
  min-height: 64px;
  padding: 0 58px 0 18px;
  appearance: none;
  border: 1px solid var(--acid);
  border-radius: 0;
  outline: 0;
  background: #0b0f0c;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 750;
}

.select-shell select:focus-visible {
  box-shadow: 0 0 0 3px rgba(184, 255, 49, 0.22);
}

.select-shell > span {
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 1.4rem;
  transform: translateY(-56%);
  pointer-events: none;
}

.field-help {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 0.78rem;
  word-break: keep-all;
}

.target-facts {
  display: grid;
  margin: 44px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.target-facts div {
  min-height: 92px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.target-facts dt {
  margin-bottom: 10px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.target-facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.flash-panel {
  display: flex;
  flex-direction: column;
}

.flash-panel-head {
  display: flex;
  margin-bottom: 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.panel-kicker {
  margin-bottom: 8px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.flash-panel h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1;
}

.verified-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 6px 9px;
  align-items: center;
  border: 1px solid rgba(184, 255, 49, 0.45);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.flash-panel > p:not(.panel-kicker) {
  max-width: 680px;
  margin-bottom: 30px;
  color: var(--muted);
  word-break: keep-all;
}

.action-warning {
  display: grid;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #574317;
  background: rgba(255, 182, 41, 0.04);
  gap: 4px;
}

.action-warning strong {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
}

.action-warning span {
  color: #d7c497;
  font-size: 0.82rem;
}

.action-warning.danger {
  border-color: rgba(255, 109, 77, 0.5);
  background: rgba(255, 109, 77, 0.045);
}

.action-warning.danger strong {
  color: var(--danger);
}

.action-warning.danger span {
  color: #e0a99b;
}

.flash-route {
  display: grid;
  margin-bottom: 30px;
  align-items: center;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 12px;
}

.flash-route span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.07em;
}

.flash-route i {
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--acid));
}

esp-web-install-button {
  display: block;
  margin-top: auto;
}

.install-button {
  display: flex;
  width: 100%;
  min-height: 64px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--acid);
  border-radius: 0;
  background: var(--acid);
  color: #091000;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.install-button:hover,
.install-button:focus-visible {
  box-shadow: 6px 6px 0 #426000;
  transform: translate(-2px, -2px);
}

.installer-message {
  display: block;
  padding: 13px;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.8rem;
}

.build-proof {
  display: flex;
  margin-top: 14px;
  justify-content: space-between;
  gap: 20px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.scope-note {
  display: flex;
  margin-top: 16px;
  padding: 18px 20px;
  gap: 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.scope-note > span {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: var(--mono);
  font-weight: 800;
}

.scope-note p {
  margin: 0;
}

.procedure-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 6vw;
  border-top: 1px solid var(--line);
}

.procedure-copy > p:not(.eyebrow) {
  max-width: 540px;
  margin: 28px 0 36px;
  color: var(--muted);
  word-break: keep-all;
}

.compatibility-note {
  display: flex;
  max-width: 560px;
  padding: 18px;
  gap: 14px;
  border: 1px solid #574317;
  background: rgba(255, 182, 41, 0.04);
  color: #d7c497;
  font-size: 0.82rem;
}

.compatibility-note > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 800;
}

.compatibility-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--amber);
}

.guided-grid {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.flow-section {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(17, 20, 17, 0.72);
}

.flow-index {
  margin: 0 0 18px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.flow-section h3 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: 0;
  line-height: 1.15;
}

.flow-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  word-break: keep-all;
}

.flow-section a {
  color: var(--ink);
}

code {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.9em;
}

.troubleshooting-table {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: rgba(17, 20, 17, 0.72);
  font-size: 0.86rem;
}

.troubleshooting-table th,
.troubleshooting-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.troubleshooting-table th {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.troubleshooting-table td {
  color: var(--muted);
}

footer {
  display: flex;
  min-height: 180px;
  padding: 36px 0;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
}

footer > div:first-child {
  display: flex;
  align-items: center;
  gap: 18px;
}

footer p {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.68rem;
}

.noscript {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  padding: 16px;
  background: var(--danger);
  color: #170500;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .orbit-two {
    animation: none;
  }

  .install-button,
  .jump-link {
    transition: none;
  }
}

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

  .hero-instrument {
    min-height: 560px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .installer-console {
    grid-template-columns: 1fr;
  }

  .target-picker {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .procedure-section {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .guided-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 28px), var(--max));
  }

  .site-header {
    min-height: 76px;
    align-items: flex-start;
    padding: 18px 0;
    flex-direction: column;
  }

  .wordmark {
    font-size: 0.68rem;
  }

  .wordmark-mark {
    width: 36px;
    height: 36px;
  }

  .header-links {
    width: 100%;
    justify-content: flex-start;
    gap: 12px 16px;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy {
    padding: 74px 22px 60px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 4.2rem);
  }

  .hero-instrument {
    min-height: 490px;
  }

  .signal-field {
    min-height: 340px;
  }

  .orbit-one {
    width: 240px;
    height: 240px;
  }

  .orbit-two {
    width: 330px;
    height: 330px;
  }

  .instrument-stats dd {
    font-size: 0.62rem;
  }

  .runtime-strip {
    grid-template-columns: 1fr;
  }

  .runtime-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .runtime-item:last-child {
    border-bottom: 0;
  }

  .installer-section,
  .procedure-section {
    padding: 82px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 22px;
    text-align: left;
  }

  .target-picker,
  .flash-panel {
    padding: 28px 20px;
  }

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

  .flash-panel-head,
  .build-proof {
    align-items: flex-start;
    flex-direction: column;
  }

  .verified-badge {
    white-space: normal;
  }

  .flash-route {
    gap: 7px;
  }

  .flash-route span {
    font-size: 0.56rem;
  }

  .flow-section {
    padding: 20px;
  }

  .troubleshooting-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  footer {
    display: block;
    padding: 42px 0;
  }

  footer > div:first-child {
    align-items: flex-start;
  }

  footer p {
    max-width: 260px;
  }

  .footer-links {
    margin-top: 28px;
    justify-content: flex-start;
    gap: 14px 20px;
  }
}
