:root {
  color-scheme: dark light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body[data-theme="dark"] {
  --bg: #0b0b0b;
  --panel: #111;
  --panel-soft: #151515;
  --text: #eaeaea;
  --muted: #9a9a9a;
  --border: #2a2a2a;
  --link: #f2f2f2;
}

body[data-theme="light"] {
  --bg: #f5f5f2;
  --panel: #ffffff;
  --panel-soft: #f0f0ec;
  --text: #171717;
  --muted: #666;
  --border: #d8d8d2;
  --link: #111;
}

.doc-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.doc-header {
  margin-bottom: 36px;
}

.doc-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.doc-back:hover {
  color: var(--text);
}

.doc-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.doc-title {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.doc-lead,
.doc-note {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.doc-section {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.section-title {
  margin: 0 0 18px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-list p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  line-height: 1.55;
  border-radius: 10px;
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.doc-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--link);
  text-decoration: none;
  background: var(--panel);
}

.doc-links a:hover {
  background: var(--panel-soft);
}

.doc-footer {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 560px) {
  .doc-page {
    width: min(100% - 28px, 860px);
    padding-top: 32px;
  }

  .doc-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .notice-list p {
    padding: 12px 13px;
  }
}

.doc-topline a {
  color: inherit;
  text-decoration: none;
}

.doc-topline a:hover {
  text-decoration: underline;
}

.center-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.center-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.center-card:hover {
  background: var(--panel-soft);
}

.center-card-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.center-card strong {
  font-size: 1.05rem;
}

.center-card small {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .center-grid {
    grid-template-columns: 1fr;
  }
}

.doc-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
}

.doc-pill:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.doc-pill:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.doc-links-spaced {
  margin-top: 18px;
}

.doc-links-centered {
  justify-content: center;
}
