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

:root {
  --bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --accent: #1a1a1a;
  --border: #cccccc;
  --surface: #f9f9f9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --text-primary: #e0e0e0;
    --text-secondary: #c0c0c0;
    --text-tertiary: #888888;
    --accent: #e0e0e0;
    --border: #444444;
    --surface: #1a1a1a;
  }
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: Georgia, 'Times New Roman', Times, serif;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 48px;
  line-height: 1.8;
}

.subtitle strong {
  color: var(--text-primary);
}

h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 40px 0 12px;
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  margin: 24px 0 8px;
}

p {
  margin-bottom: 16px;
  text-align: justify;
  font-size: 14px;
  color: var(--text-secondary);
}

ol, ul {
  margin: 4px 0 16px 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

ol li, ul li {
  margin-bottom: 6px;
  padding-left: 4px;
}

ol { list-style-type: decimal; }
ul { list-style-type: disc; }

ol ol, ul ul, ol ul, ul ol {
  margin: 4px 0 4px 20px;
  font-size: 13.5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

thead {
  border-bottom: 1.5px solid var(--text-primary);
}

th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  text-align: left;
  color: var(--text-primary);
}

td {
  padding: 8px 14px;
  vertical-align: top;
  color: var(--text-secondary);
  border-bottom: 0.5px solid var(--border);
}

td:first-child {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.table-section td {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 14px 14px 6px;
  border-bottom: 0.5px solid var(--border);
  background: none;
}

.status-required, .status-optional, .status-auto {
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
}

.status-required { color: #555; }
.status-optional { color: #777; }
.status-auto { color: #888; }

@media (prefers-color-scheme: dark) {
  .status-required { color: #aaa; }
  .status-optional { color: #999; }
  .status-auto { color: #888; }
}

hr {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 40px 0;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text-tertiary);
}

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 0.5px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 4px;
}

/* ── Index / listing page ── */
.doc-list {
  margin: 32px 0;
}

.doc-item {
  padding: 18px 20px;
  margin-bottom: 12px;
  background: var(--surface);
  border-left: 3px solid var(--text-primary);
}

.doc-item .doc-code {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.doc-item .doc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.doc-item .doc-title a {
  color: inherit;
  text-decoration: none;
}

.doc-item .doc-title a:hover {
  text-decoration: underline;
}

.doc-item .doc-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
  text-align: left;
}
