/* デジタル庁デザインシステム β — Std-17N-170 ベース（既定テーマ） */

:root {
  color-scheme: light;
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: "Noto Serif JP", serif;
  --font-mono: "Noto Sans Mono", monospace;
  --text: #1a1a1c;
  --muted: #626264;
  --link: #0017c1;
  --border: #d8d8db;

  --weight-body: 450;
  --weight-compact: 475;
  --weight-emphasis: 600;
  --weight-heading: 700;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: var(--weight-body);
  line-height: 1.7;
  letter-spacing: 0.02em;
  max-width: 45rem;
  margin: 2rem auto;
  padding: 0 1.5rem;
  color: var(--text);
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: var(--weight-heading);
  line-height: 1.5;
}

.font-serif,
.font-serif h1,
.font-serif h2,
.font-serif h3 {
  font-family: var(--font-heading);
}

a {
  color: var(--link);
}

code, pre {
  font-family: var(--font-mono);
}

.article-meta {
  color: var(--muted);
  font-size: 16px;
  font-weight: var(--weight-compact);
}

.article-list {
  padding-left: 1.25rem;
}

article pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

article table {
  border-collapse: collapse;
  width: 100%;
}

article th,
article td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: var(--font-body);
  font-weight: var(--weight-heading);
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.site-header-end {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: flex-end;
  min-width: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.95rem;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.search-input {
  flex: 1 1 16rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.search-facet {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.search-submit {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  color: #fff;
  background: var(--link);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.search-status:empty {
  display: none;
}

.search--header {
  position: relative;
  width: min(16rem, 100%);
}

.search--header .search-form {
  gap: 0.35rem;
  margin: 0;
}

.search--header .search-input {
  flex: 1 1 8rem;
  font-size: 0.875rem;
  min-width: 0;
  padding: 0.35rem 0.6rem;
}

.search--header .search-submit {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.search--header .search-results {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 8%);
  list-style: none;
  margin: 0.35rem 0 0;
  max-height: min(70vh, 24rem);
  overflow-y: auto;
  padding: 0.25rem 0.5rem;
  position: absolute;
  right: 0;
  top: 100%;
  width: min(24rem, 90vw);
  z-index: 20;
}

.search--header .search-results:empty {
  display: none;
}

.search--header .search-hit {
  padding: 0.5rem 0;
}

.search--header .search-hit-meta,
.search--header .search-hit-snippet {
  font-size: 0.75rem;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.search-hit {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.search-hit-title {
  font-weight: var(--weight-emphasis);
}

.search-hit-meta {
  margin: 0.2rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.search-hit-snippet {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

/* --- Docs site layout --- */
body.docs-site {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.docs-site .site-header,
body.docs-site .site-footer {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 72rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.skip-link {
  background: var(--link);
  color: #fff;
  left: 0;
  padding: 0.5rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

.docs-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0 auto;
  max-width: 72rem;
  padding: 1.5rem;
}

@media (min-width: 960px) {
  .docs-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.docs-sidebar {
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 960px) {
  .docs-sidebar {
    position: sticky;
    top: 5rem;
    width: 14rem;
  }
}

.docs-nav-toggle {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}

.docs-nav-toggle summary {
  cursor: pointer;
  font-weight: var(--weight-emphasis);
}

.docs-sidebar-desktop {
  display: none;
}

@media (min-width: 960px) {
  .docs-nav-toggle {
    display: none;
  }

  .docs-sidebar-desktop {
    display: block;
  }
}

.docs-nav-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.docs-nav-item + .docs-nav-item {
  margin-top: 0.25rem;
}

.docs-nav-link {
  border-radius: 4px;
  color: var(--text);
  display: block;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
}

.docs-nav-link:hover {
  background: #f4f4f5;
  color: var(--link);
}

.docs-nav-link[aria-current="page"] {
  background: #eef3ff;
  color: var(--link);
  font-weight: var(--weight-emphasis);
}

.docs-main {
  flex: 1;
  min-width: 0;
}

.docs-page h1,
.docs-index h1 {
  margin-top: 0;
}

.page-toc {
  background: #f8f8fb;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 1.25rem 0 2rem;
  padding: 0.75rem 1rem;
}

.page-toc-title {
  font-size: 0.9rem;
  font-weight: var(--weight-emphasis);
  margin: 0 0 0.5rem;
}

.page-toc-list {
  font-size: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-toc-list li + li {
  margin-top: 0.25rem;
}

.page-toc-depth-3 {
  padding-left: 1rem;
}

.page-toc-depth-4 {
  padding-left: 2rem;
}

.docs-content h2,
.docs-content h3,
.docs-content h4 {
  scroll-margin-top: 5rem;
}

.heading-anchor {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.35rem;
  text-decoration: none;
}

.heading-anchor:hover {
  color: var(--link);
}

.docs-pager {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.docs-pager-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.docs-pager-card:hover {
  border-color: var(--link);
  color: var(--link);
}

.docs-pager-label {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
}

.docs-pager-title {
  display: block;
  font-weight: var(--weight-emphasis);
  margin-top: 0.2rem;
}

.docs-pager-next {
  text-align: right;
}

.docs-pager-spacer {
  display: block;
}

.docs-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-index-item + .docs-index-item {
  margin-top: 0.5rem;
}

.docs-index-link {
  font-weight: var(--weight-emphasis);
  text-decoration: none;
}

.docs-index-link:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}

.ai-disclosure {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
}

.ai-disclosure-icon {
  flex-shrink: 0;
}

.ai-disclosure-title {
  font-weight: var(--weight-emphasis);
  margin: 0;
}

.ai-disclosure-detail,
.ai-disclosure-meta,
.ai-disclosure-policy {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.ai-disclosure-compact {
  vertical-align: middle;
  margin-left: 0.35rem;
}

figure[role="img"] {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
}

figure[role="img"] svg {
  max-width: 100%;
  height: auto;
}

pre code.language-mermaid,
pre code.language-d2,
pre code.language-graphviz,
pre code.language-dot {
  font-size: 0.85em;
}

figure.diagram img {
  max-width: 100%;
  height: auto;
}