:root {
  --background: #ffffff;
  --surface-card: #f5f7f9;

  --primary: #000000;
  --on-primary: #ffffff;

  --text-primary: #000000;
  --text-secondary: rgba(0, 0, 0, 0.72);
  --text-meta: rgba(0, 0, 0, 0.45);
  --text-faint: rgba(0, 0, 0, 0.35);

  --divider: rgba(0, 0, 0, 0.1);

  --radius-card: 1.5rem;
  --radius-sm: 0.75rem;
  --radius-full: 9999px;

  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Header --- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  display: block;
}

.brand-wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

nav.site-nav {
  display: flex;
  gap: 4px;
}

nav.site-nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

nav.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

nav.site-nav a.active {
  background: var(--surface-card);
  color: var(--text-primary);
}

/* --- Layout --- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 96px;
}

/* --- Home --- */

.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.hero img.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto;
  font-weight: 400;
}

.legal-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-primary);
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

.legal-item:hover {
  box-shadow: 0 2px 12px rgba(26, 28, 30, 0.08);
  text-decoration: none;
}

.legal-item .material-symbols-outlined.leading {
  font-size: 22px;
  color: var(--primary);
}

.legal-item-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.98rem;
}

.legal-item .material-symbols-outlined.trailing {
  font-size: 15px;
  color: var(--text-faint);
}

.contact-note {
  margin-top: 40px;
  text-align: center;
  color: var(--text-meta);
  font-size: 0.82rem;
}

/* --- Doc pages --- */

.doc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider);
}

.doc-header .back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  flex-shrink: 0;
}

.doc-header .back-link:hover {
  background: var(--surface-card);
  text-decoration: none;
}

.doc-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.doc-meta {
  color: var(--text-meta);
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0 0 24px;
}

section.doc-section {
  margin-bottom: 24px;
}

section.doc-section:last-child {
  margin-bottom: 0;
}

section.doc-section h2 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
}

.doc-section-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0 0 12px;
}

section.doc-section p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
}

section.doc-section ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
}

section.doc-section li {
  margin-bottom: 4px;
}

.state-message {
  color: var(--text-secondary);
  padding: 32px 0;
  text-align: center;
}

.state-message.error {
  color: #b3261e;
}

/* --- Footer --- */

footer.site-footer {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-meta);
  font-size: 0.78rem;
}

footer.site-footer a {
  color: var(--text-meta);
  text-decoration: underline;
}

/* --- Skeleton --- */

.skeleton {
  animation: pulse 1.4s ease-in-out infinite;
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  height: 14px;
  margin-bottom: 10px;
}

.skeleton.w-60 { width: 60%; }
.skeleton.w-80 { width: 80%; }
.skeleton.w-full { width: 100%; }

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
