@font-face {
  font-family: 'Geist';
  src: url('https://musechain.io/fonts/geist/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-page: #0b0c0e;
  --bg-surface: #121418;
  --bg-card: #181b21;
  --bg-subtle: #20242c;
  --border-dim: #262a34;
  --border-focus: #ccff00;
  --accent-lime: #ccff00;
  --accent-lime-dim: rgba(204, 255, 0, 0.12);
  --accent-blue: #58a6ff;
  --accent-blue-dim: rgba(88, 166, 255, 0.12);
  --accent-orange: #ff9d00;
  --accent-orange-dim: rgba(255, 157, 0, 0.12);
  --accent-red: #ff5252;
  --accent-red-dim: rgba(255, 82, 82, 0.14);
  --text-main: #f0f3f6;
  --text-muted: #8b949e;
  --text-dim: #555e6d;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

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

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(11, 12, 14, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 9999px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s ease;
}

.brand-badge:hover {
  border-color: var(--accent-lime);
}

.dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-lime);
}

.divider {
  color: var(--text-dim);
}

.studio-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent-lime);
}

/* Container */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* Hero Section */
.hero-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 14px;
  padding: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-dim);
  display: block;
}

.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-lime);
  margin-bottom: 0.5rem;
}

.hero-content h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.subtitle code {
  background: var(--bg-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-lime);
}

/* Input Form */
.lookup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-row {
  display: flex;
  gap: 0.75rem;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.input-wrapper input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.15s ease;
}

.input-wrapper input:focus {
  border-color: var(--accent-lime);
  box-shadow: 0 0 0 1px var(--accent-lime);
  background: #14171d;
}

.btn-primary {
  background: var(--accent-lime);
  color: #000;
  border: none;
  padding: 0 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: scale(0.98);
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.preset-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
}

/* Status Panel */
.status-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  border: 1px solid transparent;
}

.status-box.error {
  background: var(--accent-red-dim);
  border-color: rgba(255, 82, 82, 0.4);
  color: #ff9999;
}

.status-box.error h4 {
  color: var(--accent-red);
}

.status-box.info {
  background: var(--accent-blue-dim);
  border-color: rgba(88, 166, 255, 0.4);
  color: #b3d7ff;
}

.status-box.info h4 {
  color: var(--accent-blue);
}

.status-icon {
  margin-top: 2px;
}

.status-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.status-body p {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Metadata Bar */
.meta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  padding: 1.25rem 1.75rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.meta-main {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.font-mono {
  font-family: var(--font-mono);
}

.meta-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-link:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  background: var(--bg-subtle);
}

/* Capabilities Grid & Cards */
.capabilities-container {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.section-header {
  margin-bottom: 1.25rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.5rem;
}

.tag-read {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.tag-read .tag-dot {
  background: var(--accent-blue);
}

.tag-write {
  background: var(--accent-lime-dim);
  color: var(--accent-lime);
  border: 1px solid rgba(204, 255, 0, 0.3);
}

.tag-write .tag-dot {
  background: var(--accent-lime);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.count-pill {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

/* Capability Card */
.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.cap-card:hover {
  border-color: rgba(204, 255, 0, 0.4);
  transform: translateY(-2px);
}

.cap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.func-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.mutability-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-dim);
}

.signature-box {
  background: #0d0f12;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-lime);
  word-break: break-all;
  margin-bottom: 1rem;
}

.args-section {
  margin-bottom: 1rem;
}

.args-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.arg-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
}

.arg-table td {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.arg-name {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.arg-type {
  font-family: var(--font-mono);
  color: #79c0ff;
  text-align: right;
}

.no-args {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Blueprint Payload Section */
.blueprint-box {
  background: #0d0f12;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.blueprint-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.65rem;
  background: #14171d;
  border-bottom: 1px solid var(--border-dim);
}

.blueprint-method {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-lime);
  font-weight: 600;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: #fff;
  border-color: var(--accent-lime);
  background: rgba(204, 255, 0, 0.1);
}

.blueprint-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #d2a8ff;
  padding: 0.65rem;
  margin: 0;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-dim);
  background: var(--bg-surface);
  padding: 2.5rem 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-col strong {
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

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

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

.footer-col.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-size: 0.78rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #ccff00;
  color: #0b0c0e;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 260px;
    margin: 0 auto;
  }
  .meta-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-col.right {
    align-items: flex-start;
  }
}