/* Paper palette and local typefaces. */
:root {
  color-scheme: light dark;
  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --border: #E6E1D6;
  --text: #1F1D1A;
  --text-muted: #6B665C;
  --accent: #1E3A5F;
  --accent-subtle: #E5ECF5;
  --font-serif: "Source Serif 4", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  --font-sans: Inter, "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, system-ui, sans-serif;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1916;
    --surface: #2A2723;
    --border: #3A362F;
    --text: #EDE8DF;
    --text-muted: #A8A194;
    --accent: #9DB2F0;
    --accent-subtle: #2C3448;
  }
}

/* Shared column, text, and links. */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
.site-header, main, .site-footer {
  width: calc(100% - var(--gutter) - var(--gutter));
  max-width: 720px;
  min-width: 0;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 600;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.35;
}
h2 {
  margin: 48px 0 16px;
  font-size: 22px;
  line-height: 1.5;
}
h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}
p { margin: 0 0 16px; }
ul, ol {
  margin: 0 0 16px;
  padding-inline-start: 1.4em;
}
li + li { margin-top: 8px; }
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Quiet header and footer navigation. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  color: var(--text);
  font: 600 22px/1.4 var(--font-serif);
  text-decoration: none;
}
.site-header nav, .site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  min-width: 0;
}
.site-header nav { font-size: 13px; }
.site-header nav a, .site-footer nav a { color: var(--text-muted); }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--accent); }

/* Introduction and feature cards. */
.hero { padding-block: 32px 8px; }
.lead {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 17px;
}
.status {
  display: inline-block;
  margin-bottom: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 13px;
}
.feature-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  list-style: none;
}
.feature-list li {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.feature-list h3 {
  margin-top: 0;
  font-family: var(--font-serif);
}
.feature-list p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 15px;
}
.notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--accent-subtle);
  font-size: 14px;
}

/* Policy text, contents, and definitions. */
.policy { padding-top: 32px; }
.policy h1 {
  margin-bottom: 12px;
  font-size: 30px;
}
.policy p, .policy li { font-size: 15px; }
.policy .meta {
  color: var(--text-muted);
  font-size: 13px;
}
.policy .notice { font-size: 14px; }
.policy section h2 {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.policy h3 { font-family: var(--font-sans); }
.toc {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.toc ol, .toc li { font-size: 14px; }
.toc ol { margin-bottom: 0; }
dl { margin: 16px 0; }
dt { font-weight: 600; }
dd { margin: 0 0 12px; }

/* Wide tables scroll inside the reading column. */
.table-wrap {
  max-width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 10px 12px;
  /* Let columns size around whole words such as "Google" on narrow screens. */
  overflow-wrap: break-word;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { text-align: left; font-weight: 600; }
thead th { background: var(--surface); }
tbody tr:last-child > * { border-bottom: 0; }
.site-footer {
  margin-top: 64px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer p { margin-bottom: 8px; }

/* Roomier screens and ink-friendly printing. */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero { padding-top: 56px; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  :root {
    color-scheme: light;
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --border: #000000;
    --text: #000000;
    --text-muted: #000000;
    --accent: #000000;
    --accent-subtle: #FFFFFF;
  }
  .site-header nav, .site-footer nav { display: none; }
  .table-wrap { overflow: visible; }
}
