*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c0f14;
  color: #f3f3f3;
}

body.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a {
  color: #ffd56b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #252934;
  background: #12151d;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sigil-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  color: #b2b5c3;
}

.top-nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.nav-link {
  font-size: 0.95rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-link.active,
.nav-link:hover {
  border-color: #ffd56b;
  background: rgba(255, 213, 107, 0.06);
}

.page-main {
  max-width: 800px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1rem;
}

.hero {
  background: radial-gradient(circle at top left, #1a2030, #070910);
  padding: 1.6rem 1.4rem;
  border-radius: 1rem;
  border: 1px solid #2b3242;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.hero h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.hero p {
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn.primary {
  background: #ffd56b;
  color: #1b1b1b;
}

.btn.primary:hover {
  background: #ffdf8c;
}

.btn.secondary {
  background: transparent;
  color: #ffd56b;
  border-color: #ffd56b;
}

.btn.secondary:hover {
  background: rgba(255, 213, 107, 0.08);
}

.btn.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  border-color: #444;
  color: #aaa;
}

.info-section,
.support-section,
.toc-section {
  margin-top: 2rem;
  padding: 1.3rem 1.4rem;
  border-radius: 1rem;
  border: 1px solid #252934;
  background: #10131b;
}

.info-section h3,
.support-section h3,
.toc-section h2 {
  margin-top: 0;
}

.tier-list {
  padding-left: 1.2rem;
}

.toc-section .chapter-list {
  padding-left: 1.2rem;
}

.toc-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #a0a4b5;
}

/* Chapter layout */

.chapter h2 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.chapter-meta {
  font-size: 0.85rem;
  color: #9b9fb1;
  margin-bottom: 1.2rem;
}

.chapter-content {
  line-height: 1.7;
  font-size: 1rem;
}

.chapter-content p {
  margin: 0.6rem 0;
}

.chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #252934;
}

.chapter-nav-center {
  text-align: center;
}

.chapter-nav .nav-link {
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid #252934;
  padding: 0.8rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #8b8fa0;
  background: #090b11;
}

/* Responsive tweaks */

@media (max-width: 600px) {
  .site-header {
    align-items: flex-start;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .chapter-nav {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Sigil image styling */
.sigil-container {
  text-align: center;
  margin: 20px 0;
}

.sigil-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  opacity: 0.95;
}
