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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  background: #fff;
  padding: 24px 32px;
  max-width: 800px;
  margin: 0 auto;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 24px;
}

.home-link img {
  border-radius: 6px;
}

[id] {
  scroll-margin-top: 1.5rem;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: #1a1a1a;
}

h2 {
  font-size: 1.5em;
  margin-top: 2.5rem;
  margin-bottom: 1em;
  color: #1a1a1a;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 0.3em;
}

h3 {
  font-size: 1.2em;
  margin-top: 2rem;
  margin-bottom: 0.5em;
  color: #333;
}

h4 {
  font-size: 1.05em;
  margin-top: 1.5rem;
  margin-bottom: 0.4em;
  color: #333;
}

p {
  margin-bottom: 1em;
}

ul, ol {
  margin-bottom: 1em;
  padding-left: 2em;
}

li {
  margin-bottom: 0.5em;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.toc {
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
  margin: 2em 0;
  border-left: 4px solid #0066cc;
}

.toc h2 {
  margin-top: 0;
  border-bottom: none;
  font-size: 1.3em;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 0.5em;
}

.toc a {
  display: block;
  padding: 0.25em 0;
}

.toc-grouped > ul > li {
  margin-bottom: 0;
}

.toc-group-label {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  margin-top: 1.1em;
  margin-bottom: 0.2em;
}

.toc-group-label + ul {
  padding-left: 0.75em;
  border-left: 2px solid #e0e0e0;
  margin-bottom: 0;
}

.toc-group-label + ul li {
  margin-bottom: 0.2em;
}

.toc-grouped .toc a {
  padding: 0.2em 0;
}

.plain-english {
  background: #eef6ee;
  padding: 1.5em;
  border-radius: 8px;
  margin-bottom: 2em;
  border-left: 4px solid #2e7d32;
}

.plain-english h2 {
  margin-top: 0;
  border-bottom: none;
  font-size: 1.3em;
  color: #2e7d32;
}

.plain-english ul {
  list-style: none;
  padding-left: 0;
}

.plain-english li {
  margin-bottom: 0.5em;
  padding-left: 1.5em;
  position: relative;
}

.plain-english li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #2e7d32;
  font-weight: bold;
}

.summary-section {
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
  margin-bottom: 2em;
}

.category {
  margin-bottom: 1.5em;
}

.category-title {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5em;
}

.service {
  margin-bottom: 1em;
  padding-left: 1em;
}

.service-name {
  font-weight: 500;
}

.data-types {
  color: #666;
  font-size: 0.95em;
}

.category-note {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 0.75em;
}

.back-to-top {
  display: inline-block;
  margin-top: 1em;
  font-size: 0.9em;
  color: #0066cc;
}

hr {
  margin: 2em 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

.last-updated {
  color: #666;
  font-size: 0.9em;
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid #e0e0e0;
}

.contact-box {
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
  margin-top: 1em;
}

blockquote {
  background: #f8f9fa;
  padding: 1em;
  border-radius: 4px;
  font-style: italic;
  margin-bottom: 1em;
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  h1 {
    font-size: 1.75em;
  }

  h2 {
    font-size: 1.3em;
  }
}

@media (prefers-color-scheme: dark) {
  body { background: #111; color: #e8e8e8; }
  .plain-english { background: #1a2e1a; border-color: #3a7d3a; }
  .toc, .summary-section, .contact-box { background: #1a1a1a; }
  blockquote { background: #1a1a1a; color: #e8e8e8; }
  h1, h2, h3, h4, .category-title { color: #f0f0f0; }
  h2 { border-bottom-color: #333; }
  .plain-english h2 { color: #4caf50; }
  a { color: #a8c8ff; }
  .home-link { color: #f0f0f0; }
  .data-types, .category-note { color: #aaa; }
  table { color: #e8e8e8; }
  tr { border-color: #333 !important; }
  hr { border-top-color: #333; }
  .last-updated { color: #aaa; border-top-color: #333; }
  .toc-group-label { color: #999; }
  .toc-group-label + ul { border-left-color: #333; }
}
