:root {
  --bg: #f4f8fa;
  --surface: #ffffff;
  --text: #1c2b33;
  --text-muted: #55707a;
  --accent: #0f7ea3;
  --accent-dark: #0a5c78;
  --border: #dde7ea;
  --shadow: 0 1px 3px rgba(20, 40, 50, 0.08), 0 1px 2px rgba(20, 40, 50, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a1e;
    --surface: #17262b;
    --text: #e6eef0;
    --text-muted: #9db2b9;
    --accent: #3fb6df;
    --accent-dark: #6ecbe9;
    --border: #24373d;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-title span { color: var(--accent); }

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

nav.site-nav a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

nav.site-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

nav.site-nav a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }
  aside.sidebar { order: 2; }
  main { order: 1; }
}

main { min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card h1, .card h2, .card h3 { margin-top: 0; }

h1 {
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  color: var(--accent-dark);
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

p { margin: 0 0 0.9rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

.card + .card { margin-top: 0; }

aside.sidebar .card {
  position: sticky;
  top: 5.5rem;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.doc-list {
  list-style: none;
  margin: 0.5rem 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doc-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.93rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.doc-list a:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.doc-list a::before {
  content: "";
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6H6zm7 1.5L18.5 9H13V3.5zM8 13h8v1.5H8V13zm0 3h8v1.5H8V16zm0-6h4v1.5H8V10z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6H6zm7 1.5L18.5 9H13V3.5zM8 13h8v1.5H8V13zm0 3h8v1.5H8V16zm0-6h4v1.5H8V10z'/%3E%3C/svg%3E") no-repeat center / contain;
}

blockquote {
  margin: 0 0 0.9rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.person-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.person-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.person-list li:last-child { border-bottom: none; }

.role { color: var(--text-muted); }
.name { font-weight: 600; }

footer.site-footer {
  text-align: center;
  padding: 2rem 1.25rem 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
