:root {
  --accent: #FF2E4D;
  --accent-dim: #ff2e4d1f;
  --bg: #0B0B0B;
  --card-bg: #131313;
  --border: #232323;
  --text-primary: #FFFFFF;
  --text-secondary: #C9C9C9;
  --text-muted: #8A8A8A;
  --radius: 14px;
}

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

html, body { height: 100%; }

body {
  position: relative;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.dot-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand img { width: 24px; height: 24px; display: block; }

.brand .dot { color: var(--accent); }

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

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover { color: var(--text-primary); background: var(--card-bg); }

.nav-links a.active { color: var(--text-primary); background: var(--card-bg); }

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-footer {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer a:hover { color: var(--accent); }

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-visible { opacity: 1; transform: translateY(0); }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 64px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero h1 .dot { color: var(--accent); }

.actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #0B0B0B; border-color: var(--accent); }
.btn-primary:hover { opacity: 0.92; }

.btn-ghost { background: var(--card-bg); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent); }

.ledger {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.ledger-head {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
}

.ledger-head h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ledger-head p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

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

.entry {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.entry:hover { border-color: #3a3a3a; transform: translateY(-2px); }

.entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.entry-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.entry-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.entry h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.entry p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.entry li {
  font-size: 12.5px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.entry li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.7;
}

.entry-cta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}
.entry-cta:hover { color: var(--accent); }

.page-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 20px;
}

.page-center h1 {
  font-weight: 800;
  font-size: clamp(30px, 6vw, 44px);
  letter-spacing: -0.02em;
}
.page-center h1 .dot { color: var(--accent); }

.page-center p.sub { font-size: 14px; color: var(--text-muted); max-width: 420px; }

.code-box {
  width: 100%;
  max-width: 560px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: left;
}

.code-box pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.error-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(64px, 14vw, 120px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.icons-toolbar {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.search-bar { margin-top: 0; width: 100%; max-width: 380px; }
.search-bar input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.count { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.icon-grid {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.icon-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.icon-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.icon-glyphs { display: flex; gap: 10px; align-items: center; justify-content: center; }
.icon-glyph { font-family: 'BuilderIcons'; font-size: 24px; line-height: 1; color: var(--text-primary); }
.icon-glyph.filled { font-weight: bold; color: var(--accent); }

.icon-name {
  font-size: 10.5px;
  color: var(--text-secondary);
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}
.icon-card.copied .icon-name { color: var(--accent); }

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  transition: opacity 0.4s ease;
}
.intro-logo-wrap {
  opacity: 0;
  transform: scale(0.85);
  animation: intro-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  filter: drop-shadow(0 0 24px var(--accent-dim));
}
@keyframes intro-pop { to { opacity: 1; transform: scale(1); } }
.intro-status { font-size: 12.5px; color: var(--text-muted); letter-spacing: 0.02em; }
.intro-out { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
