:root {
  --bg: #020203;
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(5, 5, 7, 0.48);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(80, 80, 100, 0.18), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

a { color: var(--text); text-underline-offset: 3px; }
a:hover { opacity: 0.85; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  padding: 10px 12px 10px 20px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand img {
  height: 34px;
  width: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.topbar-nav a:hover,
.topbar-nav a[aria-current="page"] {
  color: var(--text);
}

.wrap {
  width: min(760px, calc(100% - 40px));
  margin: 48px auto 116px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.notice {
  margin-bottom: 36px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
}

.toc {
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

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

article section {
  margin-bottom: 36px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

article h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 28px 0 12px;
}

article p,
article li {
  color: #d6d6dc;
  font-size: 15px;
  margin-bottom: 12px;
}

article ul,
article ol {
  margin: 0 0 16px 1.2rem;
}

article li { margin-bottom: 8px; }

article strong { color: var(--text); font-weight: 600; }

.foot {
  position: fixed;
  z-index: 6;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 0;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
}

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

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

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .topbar-nav { gap: 12px; }
}
