:root {
  --bg: #05070a;
  --bg-soft: rgba(10, 14, 20, 0.84);
  --panel: rgba(13, 18, 24, 0.86);
  --panel-strong: rgba(18, 24, 31, 0.94);
  --line: rgba(201, 162, 39, 0.22);
  --line-strong: rgba(201, 162, 39, 0.42);
  --text: #f2ecdf;
  --muted: #b8ab91;
  --cyan: #82dfff;
  --gold: #cfac4f;
  --gold-soft: rgba(207, 172, 79, 0.18);
  --red: #8a2727;
  --red-soft: rgba(138, 39, 39, 0.18);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.72;
  background:
    radial-gradient(circle at 16% 0%, rgba(207, 172, 79, 0.14), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(130, 223, 255, 0.1), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(138, 39, 39, 0.15), transparent 32%),
    linear-gradient(180deg, #0c1014 0%, #07090c 44%, #05070a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 86%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.brief-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(6, 10, 15, 0.78);
  border-bottom: 1px solid rgba(130, 223, 255, 0.14);
}

.brief-topbar-inner {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brief-brand {
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: 1.15rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brief-brand::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.28), transparent 34%),
    url("./assets/brand/blacktide-avatar-512.png") center / cover no-repeat,
    linear-gradient(180deg, rgba(230,205,140,0.98), rgba(154,112,18,0.96));
  border: 1px solid rgba(205,165,62,0.36);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 10px 24px rgba(0,0,0,0.24);
}

.brief-brand::after {
  content: none;
}

.brief-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.brief-nav a {
  text-decoration: none;
  color: #d8ebf7;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.88;
}

.brief-nav a:hover {
  opacity: 1;
  color: #fff;
}

.brief-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 32px));
  margin: 28px auto 72px;
}

.hero-panel,
.brief-section,
.quick-nav {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 19, 25, 0.92), rgba(9, 12, 17, 0.96));
  box-shadow: var(--shadow);
}

.hero-panel::before,
.brief-section::before,
.quick-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 34%, rgba(255,255,255,0.04) 50%, transparent 64%);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 26px;
  padding: 28px;
  min-height: 520px;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 240px at 12% 0%, rgba(207, 172, 79, 0.12), transparent 72%),
    radial-gradient(360px 220px at 100% 18%, rgba(130, 223, 255, 0.14), transparent 74%);
}

.hero-copy,
.hero-plate {
  position: relative;
  z-index: 1;
}

.eyebrow,
.mini-kicker,
.status-tag {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-copy h1,
.section-head h2 {
  margin: 10px 0 0;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.hero-lead {
  margin: 20px 0 0;
  font-size: clamp(1.06rem, 2.4vw, 1.34rem);
  color: #fff6dc;
}

.hero-text {
  margin: 16px 0 0;
  max-width: 720px;
  color: #d3c7ae;
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-signals span,
.quick-nav a,
.cta {
  border-radius: 999px;
}

.hero-signals span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(130, 223, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: #d7edf8;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
  border: 1px solid rgba(130, 223, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #edf7ff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cta.primary {
  border-color: rgba(207, 172, 79, 0.4);
  background: linear-gradient(180deg, rgba(207, 172, 79, 0.28), rgba(122, 89, 14, 0.34));
  color: #fff6dd;
}

.cta:hover,
.quick-nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.hero-plate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.hero-image-frame {
  position: relative;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(130, 223, 255, 0.18);
  background: #0a0d12;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04) brightness(0.9);
}

.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,10,15,0.06), rgba(6,10,15,0.7));
}

.plate-note {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(207, 172, 79, 0.2);
  background: linear-gradient(180deg, rgba(35, 25, 8, 0.34), rgba(14, 12, 10, 0.84));
}

.plate-note span {
  display: block;
  color: #d3b66e;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.plate-note strong {
  display: block;
  margin-top: 10px;
  color: #f6edd8;
  font-size: 1rem;
  line-height: 1.68;
}

.quick-nav {
  margin-top: 18px;
  padding: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-nav a {
  text-decoration: none;
  padding: 8px 14px;
  color: #d9ebf8;
  border: 1px solid rgba(130, 223, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  font-weight: 700;
}

.brief-section {
  margin-top: 18px;
  padding: 26px;
}

.tone-deep {
  background:
    linear-gradient(180deg, rgba(8, 14, 20, 0.96), rgba(7, 11, 16, 0.98)),
    linear-gradient(135deg, rgba(130, 223, 255, 0.06), transparent 56%);
}

.tone-red {
  background:
    linear-gradient(180deg, rgba(18, 11, 11, 0.92), rgba(8, 10, 14, 0.98)),
    linear-gradient(135deg, rgba(138, 39, 39, 0.08), transparent 56%);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.story-grid,
.doctrine-grid,
.loop-grid,
.rule-grid,
.economy-grid,
.status-grid {
  display: grid;
  gap: 14px;
}

.story-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.story-card,
.doctrine-card,
.loop-card,
.rule-card,
.economy-card,
.status-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(130, 223, 255, 0.14);
  background: linear-gradient(180deg, rgba(17, 23, 30, 0.88), rgba(10, 14, 18, 0.94));
  padding: 18px;
}

.story-card.wide {
  grid-column: span 1;
}

.story-card strong,
.doctrine-card strong,
.rule-card strong,
.economy-card strong,
.status-card h3 {
  display: block;
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #f5eedf;
}

.story-card p,
.doctrine-card p,
.zone-card p,
.loop-card p,
.rule-card p,
.economy-card p,
.status-card li,
.closing-note {
  color: #d0c5b0;
}

.doctrine-grid,
.economy-grid,
.status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zone-stack {
  display: grid;
  gap: 12px;
}

.zone-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(207, 172, 79, 0.16);
  background: linear-gradient(180deg, rgba(16, 19, 23, 0.92), rgba(10, 12, 15, 0.96));
}

.zone-card h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
  color: #f5eedf;
}

.zone-index {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 1px solid rgba(130, 223, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
}

.zone-card.spill .zone-index {
  color: #77e4d2;
}

.zone-card.rift .zone-index {
  color: #82dfff;
}

.zone-card.abyss .zone-index {
  color: #e07a7a;
}

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

.loop-card span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(207, 172, 79, 0.3);
  color: var(--gold);
  font-weight: 900;
}

.loop-card h3 {
  margin: 14px 0 8px;
  font-size: 1.16rem;
}

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

.rule-card.emphasis {
  border-color: rgba(207, 172, 79, 0.28);
  background:
    linear-gradient(180deg, rgba(39, 30, 10, 0.5), rgba(12, 13, 17, 0.96)),
    linear-gradient(135deg, rgba(207, 172, 79, 0.08), transparent 54%);
}

.rule-card code {
  color: #fff0ba;
  font-family: inherit;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(207, 172, 79, 0.16);
  background: linear-gradient(180deg, rgba(18, 17, 14, 0.68), rgba(9, 10, 12, 0.92));
}

.flow-node {
  min-height: 86px;
  min-width: 140px;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(130, 223, 255, 0.14);
  background: rgba(255,255,255,0.03);
  font-size: 0.9rem;
  font-weight: 800;
  color: #edf7ff;
}

.flow-node.highlight {
  border-color: rgba(207, 172, 79, 0.3);
  color: #fff2c9;
  background: linear-gradient(180deg, rgba(55, 38, 7, 0.44), rgba(16, 14, 11, 0.9));
}

.flow-arrow {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 900;
}

.status-card.live {
  border-color: rgba(130, 223, 255, 0.22);
}

.status-card.next {
  border-color: rgba(207, 172, 79, 0.24);
}

.status-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.status-card ul {
  margin: 14px 0 0 18px;
  padding: 0;
}

.closing-note {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(130, 223, 255, 0.16);
  background: linear-gradient(180deg, rgba(11, 18, 24, 0.84), rgba(7, 10, 15, 0.94));
}

@media (max-width: 1100px) {
  .hero-panel,
  .story-grid,
  .loop-grid,
  .rule-grid,
  .doctrine-grid,
  .economy-grid,
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .story-card.wide,
  .hero-copy,
  .hero-plate,
  .loop-card,
  .rule-card,
  .status-card {
    grid-column: auto;
  }

  .flow-strip {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .flow-arrow {
    display: none;
  }

  .flow-node {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .brief-topbar-inner,
  .brief-shell {
    width: min(100vw - 20px, 100%);
  }

  .brief-topbar-inner {
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel,
  .story-grid,
  .doctrine-grid,
  .loop-grid,
  .rule-grid,
  .economy-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .brief-section {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-image-frame {
    min-height: 240px;
  }

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

  .zone-index {
    width: 64px;
    height: 64px;
  }
}
