:root {
  --bg: #1c1714;
  --bg-soft: #241d18;
  --text: #f4e7d2;
  --text-dim: #b8a68f;
  --accent: #875731;
  --line: #3a2f26;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--accent);
  z-index: 10;
}

/* Hero */

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 120px 24px 72px;
  display: flex;
  align-items: center;
  gap: 56px;
}

.mark {
  width: 180px;
  height: 165px;
  flex-shrink: 0;
  object-fit: contain;
}

.hero-text {
  max-width: 560px;
}

h1 {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sentence {
  margin-top: 12px;
  font-size: 22px;
}

.hero-detail {
  margin-top: 12px;
  color: var(--text-dim);
}

.actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
}

.btn.secondary {
  border: 1px solid var(--text);
  color: var(--text);
}

.btn .icon {
  width: 17px;
  height: 17px;
  vertical-align: -3px;
  margin-right: 7px;
  transition: transform 0.2s ease;
}

.btn:hover .icon {
  transform: translateY(2px);
}

.btn.secondary .icon {
  transition: transform 0.25s ease;
}

.btn.secondary:hover .icon {
  transform: translateX(2px) scale(1.08);
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.meta {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-dim);
}

.meta a {
  color: var(--text);
}

/* Content */

/* Stat row: key facts under the hero */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 700px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}

.toc a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
}

.toc a:hover {
  color: var(--text);
}

section {
  margin-bottom: 64px;
}

h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 28px 0 12px;
}

p {
  margin-bottom: 14px;
}

ul,
ol {
  margin: 0 0 14px 22px;
}

li {
  margin-bottom: 10px;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* FAQ */

details {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--bg-soft);
}

summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 44px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  padding: 0 18px 14px;
  margin: 0;
  color: var(--text-dim);
}

details a {
  color: var(--text);
}

/* Footer */

.discord-card {
  max-width: 720px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.discord-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.discord-card-main > img { flex-shrink: 0; }
.discord-card-main > div { flex: 1; min-width: 0; }
.discord-card-main strong { font-size: 17px; font-weight: 500; }
.discord-card-main p { margin: 2px 0 0; color: var(--text-dim); font-size: 14px; }
.discord-card-main .btn { white-space: nowrap; }

.discord-live {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}

.discord-live[hidden] { display: none; }
.discord-online { color: var(--text); white-space: nowrap; }
.online-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #3ba55c; vertical-align: 1px; }

@media (max-width: 640px) {
  .discord-card-main { flex-wrap: wrap; }
  .discord-card-main .btn { width: 100%; }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.footer-credit {
  width: 100%;
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

.footer-credit svg { width: 20px; height: 19px; flex-shrink: 0; }
.footer-credit a { color: var(--text); }

/* Mobile */

@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 88px 24px 48px;
  }

  .mark {
    width: 120px;
    height: 110px;
  }

  h1 {
    font-size: 40px;
  }

  .sentence {
    font-size: 19px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .footer {
    flex-direction: column;
  }

  .footer .btn {
    width: 100%;
    text-align: center;
  }

  .footer .btn:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Sidebar */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 232px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.mark-sm { width: 26px; height: 26px; flex-shrink: 0; object-fit: contain; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 8px 4px 22px;
}

.sidebar-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px 6px 22px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  margin-left: 0;
}

.sidebar-nav a:hover { color: var(--text); background: var(--bg); }

.sidebar-nav a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--bg);
}

.sidebar-foot {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
}

@media (min-width: 961px) {
  .shell { margin-left: 232px; }
  .sidebar-scrim { display: none; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
}

/* Activity */

.dim { color: var(--text-dim); font-size: 14px; }

.activity-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 18px;
  max-width: 720px;
}

.activity-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 14px;
}

.activity-head a { color: var(--text); text-decoration: none; }
.activity-head a:hover { text-decoration: underline; }

.activity-total { margin-left: auto; color: var(--text-dim); font-size: 13px; font-weight: 400; }

.activity-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  background: #2b2119;
}

.cell.l1 { background: #55391f; }
.cell.l2 { background: #875731; }
.cell.l3 { background: #b07a41; }
.cell.l4 { background: #e0a45c; }

a.cell:hover { outline: 1px solid var(--text); }

.activity-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  color: var(--text-dim);
  font-size: 12px;
  margin: 6px 0 12px;
}

.activity-list {
  list-style: none;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.activity-list a {
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list a:hover { text-decoration: underline; }

/* Changelog timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.release {
  position: relative;
  padding: 0 0 24px 26px;
  border-left: 1px solid var(--line);
}

.release:first-child .release-dot { background: var(--accent); }

.release:last-child { border-left-color: transparent; }

.release-dot {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.release-tag {
  font-size: 15px;
  font-weight: 600;
}

.release-tag a {
  color: var(--text);
  text-decoration: none;
}

.release-tag a:hover { color: var(--accent); }

.release-date {
  font-size: 13px;
  color: var(--text-dim);
  margin-left: 8px;
}

.release-notes {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-dim);
  white-space: pre-line;
}

/* Proximity dash minimap (right edge) */
.proximity {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 25;
  padding: 4px;
}

.proximity .dash {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--text-dim);
  opacity: 0.4;
  width: 14px;
  transform-origin: right center;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.proximity .dash[data-kind="title"] { width: 26px; opacity: 0.9; background: var(--text); }
.proximity .dash[data-kind="subtitle"] { width: 20px; opacity: 0.65; }
.proximity .dash[data-kind="section"] { width: 16px; }
.proximity .dash[data-kind="body"] { width: 10px; opacity: 0.3; }
.proximity .dash.active { background: var(--accent); opacity: 1; }

@media (min-width: 961px) {
  .proximity { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .proximity .dash { transition: none; }
}
