:root {
  --black: #0A0A0A;
  --ivory: #E8E0D5;
  --gold: #C9A96E;
  --muted: #555555;
  --dim: #333333;
  --font: "SF Mono", "Fira Code", "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

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

::selection {
  background: var(--gold);
  color: var(--black);
}

html, body {
  height: 100%;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Nav --- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  border-bottom: 1px solid var(--dim);
}

.nav-logo {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

/* --- Layout --- */

.container {
  display: flex;
  min-height: calc(100vh - 57px);
}

/* --- Page (single-column sub-pages) --- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 60px;
  min-height: calc(100vh - 57px);
}

.page-title {
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 48px;
}

.page-content h2 {
  color: var(--ivory);
  font-size: 15px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}

.page-content h3 {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 8px;
}

.page-content p {
  color: var(--ivory);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-content .muted {
  color: var(--muted);
}

.page-content code {
  color: var(--gold);
  font-size: 13px;
}

.page-content pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dim);
  border-radius: 2px;
  padding: 16px 20px;
  margin: 12px 0 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ivory);
}

.page-content .endpoint {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.page-content .method {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  min-width: 56px;
}

.page-content .path {
  color: var(--ivory);
  font-size: 14px;
}

.page-content .endpoint-desc {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.faq-item {
  margin-bottom: 32px;
}

.faq-q {
  color: var(--ivory);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* --- Panels --- */

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 80px 60px;
}

.left {
  justify-content: flex-start;
}

.right {
  justify-content: flex-start;
}

.divider {
  width: 1px;
  background: var(--dim);
  flex-shrink: 0;
}

.spacer {
  height: 48px;
}

/* --- Logo --- */

.logo {
  margin-bottom: 16px;
}

.logo-line {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  line-height: 1.2;
}

/* --- Tagline --- */

.tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
  margin-bottom: 48px;
}

/* --- Description --- */

.description p {
  color: var(--ivory);
  font-size: 15px;
  line-height: 1.8;
}

/* --- Email --- */

.email-section {
  margin-top: auto;
}

.email-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.email-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-line {
  position: relative;
  flex: 1;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 4px;
  transition: border-color 0.2s;
  cursor: text;
}

.input-line:focus-within {
  border-color: var(--gold);
}

.email-input {
  background: none;
  border: none;
  color: var(--ivory);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  width: 100%;
  caret-color: transparent;
}

.email-input::placeholder {
  color: transparent;
}

.input-line:not(:focus-within) .email-input::placeholder {
  color: var(--dim);
}

.input-measure {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  white-space: pre;
  font-family: var(--font);
  font-size: 14px;
  pointer-events: none;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--gold);
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}

#emailCursor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  display: none;
  pointer-events: none;
}

.input-line:focus-within #emailCursor {
  display: block;
}

@keyframes blink {
  50% { opacity: 0; }
}

.submit-btn {
  background: none;
  border: 1px solid var(--dim);
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  padding: 4px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.email-success {
  color: var(--gold);
  font-size: 12px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.email-success.show {
  opacity: 1;
}

/* --- Terminal / Right Panel --- */

.terminal-block {
  margin-bottom: 8px;
}

.command {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dim);
  border-radius: 2px;
  transition: border-color 0.2s;
  position: relative;
}

.command:hover {
  border-color: var(--gold);
}

.prompt {
  color: var(--muted);
}

.ssh-cmd {
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
}

.copy-hint {
  color: var(--muted);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: 8px;
}

.copy-hint.show {
  opacity: 1;
}

/* --- Pieces --- */

.section-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}

.piece {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(85, 85, 85, 0.2);
}

.piece-name {
  color: var(--ivory);
  font-size: 14px;
}

.piece-price {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}

.piece-meta {
  color: var(--muted);
  font-size: 11px;
  padding: 4px 0 12px;
}

/* --- Bottom prompt --- */

.prompt-section {
  margin-top: auto;
}

.prompt-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.prompt-input-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 4px;
  transition: border-color 0.2s;
  cursor: text;
}

.prompt-input-line:focus-within {
  border-color: var(--gold);
}

.prompt-input {
  background: none;
  border: none;
  color: var(--ivory);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  width: 100%;
  caret-color: transparent;
}

.prompt-input::placeholder {
  color: transparent;
}

.prompt-input-line:not(:focus-within) .prompt-input::placeholder {
  color: var(--dim);
}

.prompt-input-line .input-measure {
  left: 22px;
}

#promptCursor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 22px;
  display: none;
  pointer-events: none;
}

.prompt-input-line:focus-within #promptCursor {
  display: block;
}

.prompt-response {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  min-height: 1.4em;
}

/* --- Mobile --- */

@media (max-width: 768px) {
  .site-nav {
    padding: 16px 32px;
  }

  .nav-links {
    gap: 20px;
  }

  .container {
    flex-direction: column;
    min-height: calc(100vh - 49px);
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  .panel {
    padding: 48px 32px;
  }

  .page {
    padding: 48px 32px;
  }

  .left {
    min-height: auto;
  }

  .logo-line {
    font-size: 22px;
  }

  .tagline {
    margin-bottom: 32px;
  }

  .spacer {
    height: 32px;
  }

  .command {
    width: 100%;
    justify-content: center;
  }

  .prompt-section {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 16px 20px;
  }

  .panel {
    padding: 32px 20px;
  }

  .page {
    padding: 32px 20px;
  }

  .email-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .submit-btn {
    text-align: center;
  }
}
