* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #1a1a1a;
  --text-secondary: #555;
  --bg: #fafaf8;
  --card-bg: #fff;
  --border: #e5e5e3;
  --accent: #2a6ef5;
  --accent-light: #eef3ff;
  --code-bg: #f3f3f0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav .nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

nav .nav-logo {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

nav a.nav-link:hover { color: var(--text); }

nav a.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 7px 18px;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.15s;
}

nav a.nav-cta:hover { opacity: 0.85; }

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger .icon-menu { display: block; }
.hamburger .icon-close { display: none; }
nav.open .hamburger .icon-menu { display: none; }
nav.open .hamburger .icon-close { display: block; }

.mobile-only { display: none; }
.mobile-cta { display: none; }

/* Header */
header {
  max-width: 640px;
  margin: 0 auto;
  padding: 100px 24px 0;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 32px;
}

.back-link:hover { text-decoration: underline; }

.connection-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.connection-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.connection-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  pointer-events: none;
}

.connection-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.connection-icon.large {
  width: 80px;
  height: 80px;
  border-radius: 18px;
}

.connection-icon.large::after {
  border-radius: 18px;
}

header h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

header .subtitle {
  font-size: 17px;
  color: var(--text-secondary);
}

/* Main */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

section {
  margin-bottom: 48px;
}

section h2 {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

section p:last-child { margin-bottom: 0; }

section a {
  color: var(--accent);
  text-decoration: none;
}

section a:hover { text-decoration: underline; }

/* Used by tags */
.used-by {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.skill-tag:hover {
  background: #dde6ff;
  text-decoration: none;
}

/* Steps */
.step {
  margin-bottom: 32px;
}

.step:last-child { margin-bottom: 0; }

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Ordered steps list */
.steps-list {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.steps-list li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
  counter-increment: step-counter;
}

.steps-list > li::before {
  content: counter(step-counter) ".";
  position: absolute;
  left: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.steps-list li ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 8px;
  counter-reset: none;
}

.steps-list li ul li {
  padding-left: 0;
  counter-increment: none;
}

.steps-list li ul li::before {
  content: none;
}

/* Code blocks */
.code-block {
  background: #1a1a1a;
  color: #e0e0e0;
  font-family: var(--mono);
  font-size: 14px;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 12px 0 16px;
  overflow-x: auto;
  user-select: all;
  line-height: 1.7;
  position: relative;
}

.code-block .prompt { color: #888; user-select: none; }
.code-block .command { color: #e0e0e0; }
.code-block .comment { color: #666; user-select: none; }
.code-block .highlight { color: #7cc5ff; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  color: #888;
  font-size: 12px;
  font-family: var(--mono);
  transition: all 0.15s;
  user-select: none;
}

.copy-btn:hover { background: rgba(255,255,255,0.2); color: #ccc; }
.copy-btn.copied { color: #4ade80; }

/* Inline code */
code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--code-bg);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Note box */
.note {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

/* Platform grid (Beeper) */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.platform {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
}

.platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Footer */
footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
  header { padding: 40px 20px 0; }
  header h1 { font-size: 26px; }
  main { padding: 36px 20px 60px; }
  .connection-header { gap: 14px; }
  header { padding-top: 80px; }
  .connection-icon { width: 44px; height: 44px; border-radius: 10px; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  nav .nav-links { display: none; }
  nav .nav-cta { display: none; }
  nav .hamburger { display: flex; }
  nav.open { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: 8px 24px 20px;
    gap: 0;
    overflow-y: auto;
    z-index: 200;
  }
  nav.open .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
  }
  nav.open .nav-links .mobile-only { display: block; }
  nav.open .nav-links .mobile-cta {
    display: block;
    margin-top: 16px;
    padding: 10px 0;
    text-align: center;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: none;
  }
}
