/* DrifterStats — base theme
   Palette:
   --bg:        #0d1117   page background (near-black, slight blue tint)
   --surface:   #161b22   nav bar / raised surfaces
   --surface-2: #1c2128   hover state on raised surfaces
   --border:    #30363d   hairline dividers
   --text:      #e6edf3   primary text
   --text-dim:  #8b949e   secondary text
   --link:      #c9d1d9   nav link, slightly dimmer than text
*/

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --link: #c9d1d9;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ---------- Top navigation ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topnav__brand {
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text);
  padding: 0 20px 0 0;
  margin-right: 12px;
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
}

.topnav__links {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 1;
}

.topnav__spacer {
  flex: 1;
}

.topnav__link {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.topnav__link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.topnav__link.is-active {
  color: var(--text);
  border-bottom-color: var(--text-dim);
}

/* mobile nav toggle */
.topnav__toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  cursor: pointer;
  flex-shrink: 0;
}

.topnav__toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 720px) {
  .topnav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topnav__links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .topnav.is-open .topnav__links {
    display: flex;
  }

  .topnav__spacer {
    display: none;
  }

  .topnav__link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
  }

  .topnav__link.is-active {
    border-left-color: var(--text-dim);
  }
}

/* ---------- Page layout ---------- */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.page__title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.page__subtitle {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0 0 40px;
  max-width: 60ch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
}

.panel + .panel {
  margin-top: 16px;
}
