@import '/common-web/tokens.css';

:root {
  --bg: var(--rb-bg);
  --bg-surface: var(--rb-surface);
  --text: var(--rb-text);
  --text-muted: var(--rb-text-muted);
  --accent: var(--rb-accent);
  --font-mono: var(--rb-font-mono);
}

html {
  background-color: var(--bg);
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem 6rem;
  box-sizing: border-box;
}

.container {
  max-width: 800px;
  width: 100%;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #000000;
  margin: 0 0 2rem 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] h1 {
  color: var(--accent);
}

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

h1 a:hover {
  text-decoration: underline;
}

.cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.9em;
  margin-left: 0.12em;
  background: #000000;
  vertical-align: baseline;
  transform: translateY(0.12em);
  animation: cursor-blink 1.2s steps(2, start) infinite;
}

[data-theme="dark"] .cursor {
  background: var(--accent);
}

@keyframes cursor-blink {
  to {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem 0;
}

[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #ffffff;
}

p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin: 0 0 1.5rem 0;
}

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

a:hover {
  text-decoration: none;
}

ul {
  font-size: 1.125rem;
  line-height: 1.8;
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

.back {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text-muted);
  text-decoration: none;
}

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

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  z-index: 2;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  transition: opacity 0.2s ease, filter 0.2s ease;
  padding: 0;
  z-index: 100;
}
