:root {
  color-scheme: dark;
  --bg: #061014;
  --bg-2: #0a161a;
  --panel: rgba(13, 25, 30, 0.86);
  --panel-soft: rgba(13, 25, 30, 0.62);
  --line: rgba(117, 210, 188, 0.2);
  --line-strong: rgba(117, 210, 188, 0.44);
  --text: #edf7f4;
  --muted: #94aaa6;
  --green: #75d2bc;
  --gold: #f3c969;
  --orange: #ff9f43;
  --rose: #ff8c9f;
  --blue: #8fc6ff;
  --violet: #b69cff;
  --ink: #071114;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(6, 16, 20, 0.16), var(--bg) 620px),
    linear-gradient(90deg, rgba(6, 16, 20, 0.42), rgba(6, 16, 20, 0.76)),
    url("../../shared-assets/ed-style-colony-qq-card-bg.png") center top / cover fixed,
    var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(117, 210, 188, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(117, 210, 188, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

a {
  color: inherit;
}

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

.page {
  min-height: 100vh;
  background: rgba(6, 16, 20, 0.72);
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(117, 210, 188, 0.14);
  background: rgba(6, 16, 20, 0.9);
  backdrop-filter: blur(16px);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(117, 210, 188, 0.1);
  flex: 0 0 auto;
}

.top-actions,
.chips,
.stat-grid,
.quick-grid,
.flow,
.subpage-grid,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn,
.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(117, 210, 188, 0.08);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.btn {
  padding: 9px 12px;
  font-size: 13px;
}

.btn:hover,
.chip:hover,
.btn.active {
  border-color: var(--line-strong);
  background: rgba(117, 210, 188, 0.15);
  transform: translateY(-1px);
}

.btn.active {
  color: #d7fff5;
}

.chip {
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted);
}

.progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.hero {
  padding: 58px 0 24px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-top: 13px;
  max-width: 900px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  margin-top: 18px;
  max-width: 820px;
  color: #c9dad6;
  font-size: 16px;
  line-height: 1.78;
}

.source-strip {
  margin-top: 18px;
  border: 1px solid rgba(243, 201, 105, 0.2);
  border-radius: 8px;
  background: rgba(243, 201, 105, 0.08);
  color: #ffe3a1;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.source-strip a {
  color: #fff1bf;
}

.stat-grid {
  margin-top: 24px;
}

.stat {
  min-width: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 30, 0.76);
  padding: 14px 16px;
}

.stat strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.hero-panel,
.card,
.content-section,
.toc,
.note,
.flow-node,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  padding: 22px;
  background: linear-gradient(145deg, rgba(13, 25, 30, 0.9), rgba(6, 16, 20, 0.75));
}

.hero-panel h2,
.content-section h2 {
  color: var(--gold);
  font-size: 20px;
}

.hero-panel p,
.card p,
.note p,
.content-section p,
.flow-node span,
.toc a {
  color: var(--muted);
  line-height: 1.65;
}

.quick-grid {
  margin-top: 16px;
}

.quick-grid .chip {
  color: #d7fff5;
}

main {
  padding: 28px 0 70px;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.toc {
  position: sticky;
  top: 74px;
  padding: 16px;
  min-width: 0;
}

.toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 13px;
}

.toc a {
  display: block;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.toc a:hover,
.toc a.active {
  background: rgba(117, 210, 188, 0.1);
  color: var(--text);
}

.content-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.content-section {
  padding: 22px;
  min-width: 0;
}

.content-section h3 {
  margin-top: 18px;
  color: var(--text);
  font-size: 16px;
}

.content-section > p {
  margin-top: 12px;
  font-size: 14px;
}

.subpage-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.card {
  padding: 16px;
  background: rgba(13, 25, 30, 0.78);
}

.card strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.card p {
  margin-top: 8px;
  font-size: 13px;
}

.card a {
  display: inline-flex;
  margin-top: 14px;
  color: #d7fff5;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.flow {
  margin-top: 16px;
  align-items: stretch;
}

.flow-node {
  position: relative;
  flex: 1 1 145px;
  min-height: 116px;
  padding: 15px;
  background: rgba(6, 16, 20, 0.58);
}

.flow-node::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--line-strong);
}

.flow-node:last-child::after {
  display: none;
}

.flow-node b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(117, 210, 188, 0.13);
  color: var(--green);
  font-size: 13px;
}

.flow-node strong {
  display: block;
  margin-top: 11px;
  color: var(--text);
  font-size: 14px;
}

.flow-node span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.note {
  margin-top: 16px;
  padding: 15px;
  background: rgba(243, 201, 105, 0.07);
  border-color: rgba(243, 201, 105, 0.22);
}

.note strong {
  color: #ffe3a1;
}

.note p {
  margin-top: 6px;
  font-size: 13px;
}

.table-wrap {
  margin-top: 16px;
  max-width: 100%;
  overflow: auto;
  background: rgba(6, 16, 20, 0.48);
}

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

th,
td {
  border-bottom: 1px solid rgba(117, 210, 188, 0.12);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #d7e5e1;
  line-height: 1.55;
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  border-radius: 8px;
  background: rgba(117, 210, 188, 0.1);
  color: #d7fff5;
  padding: 5px 8px;
  font-size: 12px;
}

.tag.gold {
  background: rgba(243, 201, 105, 0.12);
  color: var(--gold);
}

.tag.rose {
  background: rgba(255, 140, 159, 0.12);
  color: var(--rose);
}

.tag.violet {
  background: rgba(182, 156, 255, 0.12);
  color: var(--violet);
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.check {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(6, 16, 20, 0.46);
  padding: 12px;
}

.check i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(117, 210, 188, 0.12);
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.check strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.check span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.footer {
  padding: 28px 0 44px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .hero-layout,
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .toc a {
    border: 1px solid rgba(117, 210, 188, 0.12);
  }

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

@media (max-width: 680px) {
  .topbar .shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero {
    padding-top: 38px;
  }

  h1 {
    font-size: 34px;
  }

  .stat {
    flex: 1 1 138px;
  }

  .subpage-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .flow-node::after {
    display: none;
  }
}
