:root {
  --bg: #070707;
  --surface: #101010;
  --surface-2: #171717;
  --surface-3: #202020;
  --text: #f4f1e8;
  --muted: #a5a09a;
  --soft: #d1c9ba;
  --gold: #b8944d;
  --gold-strong: #d8b46a;
  --gold-soft: rgba(184, 148, 77, 0.18);
  --line: rgba(255, 255, 255, 0.1);
  --line-gold: rgba(216, 180, 106, 0.32);
  --green: #8fbf9a;
  --amber: #cba45d;
  --danger: #a66c65;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@view-transition {
  navigation: auto;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(184, 148, 77, 0.14), transparent 28rem),
    linear-gradient(145deg, #030303 0%, #0b0b0b 45%, #141313 100%);
  color: var(--text);
  min-height: 100vh;
  animation: page-enter 420ms ease both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
}

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

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 7, 7, 0.74);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  padding: 16px clamp(20px, 4vw, 64px);
  position: sticky;
  right: 0;
  top: 0;
  transition: border-color 180ms ease, background 180ms ease;
  z-index: 20;
}

.site-header[data-elevated="true"] {
  background: rgba(7, 7, 7, 0.92);
  border-color: var(--line-gold);
}

.brand,
.site-footer div {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  font-family: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand img,
.site-footer img {
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  height: 38px;
  width: 38px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--soft);
  font-size: 14px;
  padding: 9px 12px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  color: var(--text);
}

.site-nav a.active {
  background: var(--gold-soft);
  border-color: var(--line-gold);
  color: #efd99d;
}

.header-actions,
.hero-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.solid-button,
.ghost-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.solid-button {
  background: linear-gradient(135deg, var(--gold-strong), #9d7b3d);
  border: 1px solid rgba(255, 231, 168, 0.45);
  color: #111;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--text);
}

.solid-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.large {
  min-height: 48px;
  padding-inline: 20px;
}

.nav-toggle {
  display: none;
}

main {
  position: relative;
  z-index: 1;
}

.page-main {
  min-height: calc(100vh - 95px);
}

.hero-section {
  align-items: center;
  display: grid;
  gap: clamp(28px, 4vw, 72px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  min-height: calc(100vh - 73px);
  overflow: hidden;
  padding: clamp(72px, 10vw, 136px) clamp(20px, 6vw, 96px) clamp(48px, 8vw, 92px);
  position: relative;
}

.hero-backdrop {
  inset: 0;
  opacity: 0.13;
  overflow: hidden;
  position: absolute;
}

.hero-backdrop img {
  filter: sepia(1) saturate(1.8) hue-rotate(352deg);
  max-width: 760px;
  position: absolute;
  right: -112px;
  top: 42px;
  width: 54vw;
}

.hero-content {
  max-width: 790px;
  position: relative;
}

.eyebrow {
  color: var(--gold-strong);
  font-family: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(104px, 18vw, 248px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.78;
  margin-bottom: 30px;
  text-shadow: 0 0 34px rgba(216, 180, 106, 0.2);
}

.page-title {
  font-family: inherit;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.08;
  margin-bottom: 18px;
  text-shadow: 0 0 24px rgba(216, 180, 106, 0.12);
}

.hero-copy {
  color: var(--soft);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.8;
  margin-bottom: 34px;
  max-width: 650px;
}

.portal-panel,
.registry-shell,
.post-card,
.process-list article,
.rule-list article,
.structure-grid article,
.admin-section,
.feature-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portal-panel {
  padding: 24px;
}

.panel-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 18px;
}

.panel-heading span,
.panel-heading strong {
  color: var(--muted);
  font-family: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.panel-heading strong {
  color: var(--gold-strong);
}

.status-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin: 22px 0 0;
}

.status-grid div {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 0;
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 6vw, 96px);
}

.section-heading {
  margin-bottom: 28px;
  max-width: 760px;
}

.section-heading.split {
  align-items: end;
  display: flex;
  justify-content: space-between;
  max-width: none;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0;
  line-height: 1.12;
  margin-bottom: 16px;
}

h3 {
  font-size: 19px;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.section-heading p,
.text-block p,
.archive-copy p,
.feature-card p,
.process-list p,
.rule-list p,
.structure-grid p,
.post-card p,
.admin-section p {
  color: var(--muted);
  line-height: 1.8;
}

.feature-grid,
.structure-grid,
.rule-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.rule-list article,
.structure-grid article {
  padding: 22px;
}

.page-link-grid .feature-card {
  color: inherit;
  display: block;
  min-height: 220px;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.page-link-grid .feature-card:hover {
  background: linear-gradient(180deg, rgba(184, 148, 77, 0.12), rgba(255, 255, 255, 0.03));
  border-color: var(--line-gold);
  transform: translateY(-2px);
}

.feature-card span,
.process-list span,
.timeline span {
  color: var(--gold-strong);
  display: inline-block;
  font-family: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  margin-bottom: 18px;
}

.search-box {
  min-width: min(320px, 100%);
}

.search-box label,
.intel-search label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

input {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  outline: none;
  padding: 0 14px;
  width: 100%;
}

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

.registry-shell {
  overflow: hidden;
}

.registry-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding: 16px;
}

.registry-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
}

.registry-tabs button.active {
  background: var(--gold-soft);
  border-color: var(--line-gold);
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

td {
  color: var(--soft);
}

.tag,
.access-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.064);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  padding: 0 10px;
}

.tag.gold,
.access-pill {
  background: var(--gold-soft);
  border-color: var(--line-gold);
  color: #efd99d;
}

.tag.silver {
  background: rgba(220, 220, 220, 0.1);
}

.tag.green {
  color: var(--green);
}

.tag.amber {
  color: var(--amber);
}

.tag.dark {
  color: var(--text);
}

.permission-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 16px 20px 20px;
}

.two-column,
.archive-section,
.admin-section {
  align-items: center;
  display: grid;
  gap: clamp(24px, 5vw, 72px);
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
}

.text-block {
  max-width: 580px;
}

.process-list,
.posts,
.timeline {
  display: grid;
  gap: 14px;
}

.process-list article,
.post-card {
  padding: 22px;
}

.rules-board {
  background: rgba(255, 255, 255, 0.018);
  border-block: 1px solid var(--line);
}

.publicity-section {
  background:
    linear-gradient(90deg, rgba(184, 148, 77, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.014);
  border-bottom: 1px solid var(--line);
}

.publicity-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.publicity-main,
.publicity-list article {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.publicity-main {
  min-height: 320px;
  padding: clamp(24px, 5vw, 44px);
}

.publicity-main h3 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.18;
  margin-top: 72px;
}

.publicity-main p,
.publicity-list p {
  color: var(--muted);
  line-height: 1.8;
}

.publicity-list {
  display: grid;
  gap: 14px;
}

.publicity-list article {
  padding: 22px;
}

.rule-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.board-section {
  padding-top: clamp(64px, 8vw, 112px);
}

.post-card {
  display: grid;
  gap: 12px;
}

.post-card > div,
.post-meta {
  align-items: center;
  display: flex;
  gap: 10px;
}

.post-date,
.post-meta {
  color: var(--muted);
  font-size: 13px;
}

.post-card.locked {
  opacity: 0.72;
}

.structure-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-copy {
  max-width: 620px;
}

.timeline {
  border-left: 1px solid var(--line-gold);
  padding-left: 24px;
}

.timeline article {
  position: relative;
}

.timeline article::before {
  background: var(--gold-strong);
  border-radius: 50%;
  content: "";
  height: 9px;
  left: -29px;
  position: absolute;
  top: 6px;
  width: 9px;
}

.admin-section {
  background:
    linear-gradient(135deg, rgba(184, 148, 77, 0.13), rgba(255, 255, 255, 0.03)),
    var(--surface);
  margin: clamp(40px, 6vw, 80px) clamp(20px, 6vw, 96px);
  padding: clamp(24px, 5vw, 44px);
}

.intel-search div {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 28px clamp(20px, 6vw, 96px);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  .nav-toggle span {
    background: var(--text);
    display: block;
    height: 2px;
    width: 18px;
  }

  .site-nav,
  .header-actions {
    display: none;
  }

  .site-header.nav-open .site-nav,
  .site-header.nav-open .header-actions {
    display: flex;
    grid-column: 1 / -1;
  }

  .site-header.nav-open .site-nav {
    align-items: stretch;
    background:
      linear-gradient(180deg, rgba(184, 148, 77, 0.14), rgba(255, 255, 255, 0.04)),
      rgba(10, 10, 10, 0.96);
    border: 1px solid var(--line-gold);
    border-radius: 8px;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav a {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text);
    display: flex;
    min-height: 44px;
  }

  .site-header.nav-open .site-nav a.active {
    background: var(--gold-soft);
    border-color: var(--line-gold);
    color: #ffe7ad;
  }

  .site-header.nav-open .header-actions {
    justify-content: stretch;
  }

  .site-header.nav-open .header-actions button {
    flex: 1;
  }

  .hero-section,
  .two-column,
  .archive-section,
  .admin-section,
  .publicity-layout {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .structure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-section {
    min-height: auto;
    padding-top: 72px;
  }

  .hero-actions,
  .section-heading.split,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a,
  .site-footer {
    width: 100%;
  }

  .portal-panel {
    padding: 18px;
  }

  .status-grid,
  .feature-grid,
  .rule-list,
  .structure-grid,
  .intel-search div {
    grid-template-columns: 1fr;
  }

  .registry-tabs {
    overflow-x: auto;
  }

  h1 {
    font-size: clamp(88px, 32vw, 132px);
  }
}