/* Anatomy Lab legal pages — mobile-first, GitHub Pages friendly */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  color: #1a1a1a;
  background: #f7f8fa;
}

a {
  color: #0b6e6a;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.site-header,
.content,
.site-footer {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.site-header {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.brand {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9375rem;
}

.nav a[aria-current="page"] {
  font-weight: 700;
  color: #084c49;
}

.content {
  padding-top: 24px;
  padding-bottom: 40px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.1rem;
}

p,
ol {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.5rem;
}

.meta {
  color: #5b6470;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.site-footer {
  padding-top: 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid #e5e7eb;
  color: #5b6470;
  font-size: 0.875rem;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #e8eaed;
    background: #0f1115;
  }

  .site-header,
  .site-footer {
    background: #151922;
    border-color: #2a3040;
  }

  a {
    color: #5fd1c9;
  }

  .nav a[aria-current="page"] {
    color: #9aeee8;
  }

  .meta,
  .site-footer {
    color: #9aa3b2;
  }
}
