:root {
  --bg: #ffffff;
  --text: #000000;
  --border: #eaeaea;
  --link: #0070f3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e5e5e5;
    --border: #333333;
    --link: #4da6ff;
  }
}

[data-theme="light"] {
  --bg: #ffffff;
  --text: #000000;
  --border: #eaeaea;
  --link: #0070f3;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #e5e5e5;
  --border: #333333;
  --link: #4da6ff;
}

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

html, body {
  padding: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

a { color: var(--link); }
a:hover, a:focus { text-decoration: underline; }

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lang-switcher a {
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text);
}

.lang-switcher a:hover {
  background: var(--border);
}

.lang-switcher a.active {
  font-weight: bold;
  color: var(--link);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.2rem 0.5rem;
  line-height: 1.5;
}

.main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 0.5rem;
}

.description {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
  opacity: 0.8;
}

dl { margin: 0; }

.o-term {
  font-style: italic;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0;
}

.o-description {
  margin-left: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.o-also-in {
  display: none;
  margin-left: 0;
  margin-top: 0.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted, color-mix(in srgb, var(--text) 60%, transparent));
}

body.show-translations .o-also-in {
  display: block;
}

body.show-translations .o-description {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.translations-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.7;
}

.translations-toggle:hover {
  opacity: 1;
}

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .main { padding: 1rem 0.75rem; }
  .lang-switcher a { font-size: 0.8rem; }
}
