:root {
  --bg: #fcfbf9;
  --surface: #ffffff;
  --surface-2: #f6eff9;
  --border: rgba(60, 20, 80, 0.1);
  --text: #1c1022;
  --muted: #65566d;
  --faint: #9a8aa2;
  --pink: #b13fcf;
  --tint: rgba(192, 78, 224, 0.1);
  --grad: linear-gradient(110deg, #e170f5 0%, #c04ee0 40%, #9b3fd4 75%, #6d4be0 100%);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }
code { font: 600 0.88em ui-monospace, Menlo, monospace; color: var(--pink); background: var(--tint); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }

nav { position: fixed; inset: 0 0 auto; z-index: 20; transition: background 0.3s, box-shadow 0.3s; }
nav.scrolled { background: rgba(252, 251, 249, 0.82); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: 0 1px 0 var(--border); }
.nav-inner { width: min(1180px, 100% - 48px); margin-inline: auto; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-left { display: flex; align-items: center; gap: 36px; }
.logo { display: flex; align-items: center; gap: 9px; font: 700 19px var(--display); letter-spacing: -0.02em; }
.logo-mark { width: 24px; height: 24px; flex: none; background: var(--grad); -webkit-mask: url(/logo.png) center / contain no-repeat; mask: url(/logo.png) center / contain no-repeat; }
.nav-links { display: flex; gap: 26px; font: 500 15px var(--display); letter-spacing: -0.01em; color: rgba(28, 16, 34, 0.72); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nbtn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9px; font: 600 14px var(--display); letter-spacing: -0.01em; white-space: nowrap; transition: background 0.2s; }
.nbtn-line { background: #fff; border: 1px solid rgba(28, 16, 34, 0.14); }
.nbtn-line:hover { background: var(--surface-2); }
.nbtn-dark { background: var(--text); color: #fff; }
.nbtn-dark:hover { background: #33203d; }

.page-head { position: relative; isolation: isolate; overflow: hidden; padding: 150px 0 64px; }
.page-head::before { content: ""; position: absolute; z-index: -1; width: 120%; height: 70%; left: -10%; top: 46%; border-radius: 50%; filter: blur(70px); opacity: 0.32; background: radial-gradient(40% 60% at 20% 50%, #8d7dff, transparent 70%), radial-gradient(40% 60% at 60% 60%, #f374d8, transparent 70%), radial-gradient(30% 50% at 90% 40%, #ff4f9e, transparent 70%); }
.page-head::after { content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: 45%; background: linear-gradient(rgba(252, 251, 249, 0), var(--bg)); }
h1 { font: 800 clamp(38px, 6vw, 64px)/1.03 var(--display); letter-spacing: -0.035em; margin: 0 0 18px; max-width: 14em; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 36em; margin: 0; }
.lead a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(177, 63, 207, 0.4); text-underline-offset: 3px; }
.updated { margin-top: 22px; font-size: 14px; color: var(--faint); }

.doc { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; padding-bottom: 40px; }
.toc { position: sticky; top: 96px; display: grid; gap: 2px; font: 500 14px var(--display); }
.toc a { padding: 6px 12px; border-radius: 8px; color: var(--muted); transition: background 0.2s, color 0.2s; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a.active { background: var(--tint); color: var(--text); }
article { min-width: 0; max-width: 720px; }
article section { padding-top: 8px; margin-bottom: 52px; }
article h2 { font: 700 clamp(24px, 2.6vw, 30px)/1.15 var(--display); letter-spacing: -0.03em; margin: 0 0 14px; }
article h3 { font: 700 18px/1.3 var(--display); letter-spacing: -0.02em; margin: 26px 0 8px; }
article p, article li { color: var(--muted); }
article p { margin: 0 0 14px; }
article ul { margin: 0 0 14px; padding-left: 20px; }
article li { margin-bottom: 8px; }
article li::marker { color: var(--faint); }
article p.big { font-size: 19px; line-height: 1.6; color: var(--text); }
article strong { color: var(--text); font-weight: 600; }
article a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: rgba(177, 63, 207, 0.4); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
article a:not(.btn):hover { text-decoration-color: var(--pink); }

.items { margin-top: 8px; border-bottom: 1px solid var(--border); }
.item { padding: 20px 0; border-top: 1px solid var(--border); }
.item h3 { margin: 0 0 6px; }
.item p { margin: 0; font-size: 15px; }
.item p.meta { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--text); }

article .contact a.mail { font: 700 clamp(22px, 2.4vw, 28px) var(--display); letter-spacing: -0.02em; }

footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 48px 0 56px; color: var(--faint); font-size: 14px; border-top: 1px solid var(--border); }
footer a:hover { color: var(--text); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand .logo-mark { width: 20px; height: 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .doc { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 680px) {
  .wrap { width: min(1080px, 100% - 32px); }
  .nav-inner { width: calc(100% - 32px); height: 58px; }
  .page-head { padding: 120px 0 44px; }
  footer .wrap { flex-direction: column; gap: 8px; padding: 36px 0 44px; }
}
@media (max-width: 440px) {
  .nbtn-line { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
