:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
}

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

html {
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

.container {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 0.375rem 0.375rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 0.375rem;
}

.site-name {
  font-weight: 700;
  font-size: 1.125rem;
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.125rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.section p {
  margin-bottom: 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

.section ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.section li {
  margin-bottom: 0.5rem;
}

.section li:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--accent);
  transition: color 0.15s ease;
}

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

/* Safety boundaries */
.boundaries {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
}

.boundaries dt {
  font-weight: 700;
  margin-top: 1rem;
  color: var(--text);
}

.boundaries dt:first-child {
  margin-top: 0;
}

.boundaries dd {
  margin-top: 0.25rem;
  margin-left: 0;
  color: var(--muted);
}

/* Resources */
.resource-list {
  list-style: none;
  padding-left: 0;
}

.resource-list li {
  margin-bottom: 0.5rem;
}

.note {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.footer-note {
  font-size: 0.8125rem;
}

/* 404 page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 2rem 1rem;
}

.error-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.error-link {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease;
}

.error-link:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

/* Focus styles */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 480px) {
  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.25rem;
  }

  .boundaries {
    padding: 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}