.athena-cms {
  --cms-bg: #100e13;
  --cms-panel: #211a20;
  --cms-panel-deep: #151217;
  --cms-line: #745642;
  --cms-gold: #edc586;
  --cms-muted: #d0b9a9;
  --cms-text: #f7eee6;
  --cms-serif: "Cinzel", Georgia, serif;
  color: var(--cms-text);
  background-color: var(--cms-bg);
}

.athena-cms .reference-header {
  background: linear-gradient(180deg, #291a25, #110d14);
  border-bottom: 1px solid var(--cms-line);
}

.athena-cms .reference-navigation nav a {
  color: var(--cms-text);
}

.athena-cms .reference-navigation nav a:is(:hover, [aria-current="page"]) {
  color: var(--cms-gold);
}

.athena-cms a:focus-visible,
.athena-cms button:focus-visible {
  outline: 2px solid var(--cms-gold);
  outline-offset: 3px;
}

.athena-cms .reference-site-layout {
  column-gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}

.athena-cms .reference-page-content,
.athena-cms .reference-sidebar {
  min-width: 0;
}

.athena-cms .reference-board,
.athena-cms .section.wiki-page,
.athena-cms .athena-cms-quicklinks a {
  border: 1px solid var(--cms-line);
  background: linear-gradient(155deg, var(--cms-panel), var(--cms-panel-deep));
  box-shadow: 0 12px 32px #0c081133;
}

.athena-cms .reference-board-heading {
  background: linear-gradient(90deg, #44252c, #231921);
  border-bottom: 1px solid var(--cms-line);
  color: var(--cms-gold);
}

.athena-cms :is(.reference-news-tabs, .wiki-tabs) :is(a, button) {
  color: var(--cms-muted);
}

.athena-cms :is(.reference-news-tabs, .wiki-tabs) :is(a, button):is(:hover, [aria-current="page"], [aria-selected="true"]) {
  color: var(--cms-gold);
}

.athena-cms-quicklinks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 18px 26px;
}

.athena-cms-quicklinks a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: var(--cms-gold);
  line-height: 1.25;
  text-decoration: none;
}

.athena-cms-quicklinks a:hover {
  border-color: var(--cms-gold);
}

.athena-cms-quicklinks img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.athena-cms-quicklinks span {
  display: block;
  color: var(--cms-muted);
  font-size: .82rem;
  margin-top: 4px;
}

.athena-systems {
  width: 100%;
  padding: clamp(14px, 3vw, 30px);
}

.athena-systems-intro {
  padding: clamp(1.25rem, 4vw, 2.75rem);
  border: 1px solid var(--cms-line);
  background: radial-gradient(ellipse at top right, #442b33, #1e1721 70%);
  margin-bottom: 28px;
}

.athena-systems h2,
.athena-systems h3 {
  font-family: var(--cms-serif);
  color: var(--cms-gold);
  line-height: 1.23;
  margin: 0 0 12px;
}

.athena-systems h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.65rem);
}

.athena-systems h3 {
  border-bottom: 1px solid var(--cms-line);
  padding-bottom: 10px;
  font-size: clamp(1.22rem, 2.6vw, 1.72rem);
}

.athena-systems h4 {
  color: var(--cms-gold);
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.athena-systems p {
  color: var(--cms-text);
  line-height: 1.65;
  margin: 0;
}

.athena-systems a {
  color: var(--cms-gold);
}

.athena-systems-intro nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.athena-systems-intro nav a {
  border: 1px solid var(--cms-line);
  background: #211923;
  padding: 9px 12px;
  text-decoration: none;
}

.athena-systems-intro nav a:hover {
  border-color: var(--cms-gold);
}

.athena-system-chapter {
  margin: 0 0 30px;
  scroll-margin-top: 7rem;
}

.athena-system-article,
.athena-system-grid article {
  background: linear-gradient(145deg, #271d24, #19151c);
  border: 1px solid var(--cms-line);
  padding: clamp(12px, 2vw, 22px);
  overflow-wrap: anywhere;
  scroll-margin-top: 7rem;
}

.athena-system-article + .athena-system-article {
  margin-top: 12px;
}

.athena-armor-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.athena-armor-stages > div {
  background: var(--cms-panel-deep);
  border: 1px solid var(--cms-line);
  padding: 10px 6px;
  text-align: center;
}

.athena-armor-stages dt {
  color: var(--cms-gold);
  font-weight: 700;
}

.athena-armor-stages dd {
  margin: 4px 0 0;
  color: var(--cms-muted);
  font-size: .83rem;
}

.athena-systems h4.athena-subfeature {
  margin-top: 16px;
}

.athena-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.athena-system-grid article > a {
  display: inline-block;
  margin-top: 10px;
}

.athena-cms .reference-footer {
  border-top: 1px solid var(--cms-line);
  background-color: var(--cms-panel-deep);
}

@media (max-width: 600px) {
  .athena-system-grid,
  .athena-cms-quicklinks {
    grid-template-columns: 1fr;
  }

}
