:root {
  --bg: #0f1419;
  --bg-elevated: #161d24;
  --border: #24303a;
  --text: #e7eef4;
  --text-muted: #8b9aab;
  --text-faint: #5c6b7a;
  --accent: #2ec9b3;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

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

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

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: -0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.brand-site {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

.lang button {
  font: inherit;
  color: var(--text-faint);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  color: var(--text);
  font-weight: 600;
}

.lang button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.meta {
  margin: 0 0 1.75rem;
  color: var(--text-faint);
  font-size: 13px;
}

h3 {
  margin: 1.6rem 0 0.45rem;
  font-size: 15px;
  font-weight: 600;
}

p,
li {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
}

.back {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 13px;
}

.legal-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

.legal-nav a {
  color: var(--text-muted);
}

.legal-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

main.licenses {
  max-width: 48rem;
}

.copyright {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 14px;
}

.pkg-meta {
  margin: 0 0 0.55rem;
  color: var(--text-faint);
  font-size: 13px;
}

pre.license {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  margin: 0 0 0.25rem;
}

section.notice {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

section.notice h3 {
  margin: 0 0 0.45rem;
}

@media (max-width: 640px) {
  .topbar-title {
    display: none;
  }
}
