/* SaTeX のサイト共通の見た目。スクリプトは使わない（_headers の CSP で禁止している）。 */
:root {
  --ink: #15202b;
  --muted: #5b6672;
  --line: #dde3e8;
  --paper: #ffffff;
  --wash: #f4f7f8;
  --accent: #0f6e63;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf1;
    --muted: #a3adb7;
    --line: #2e3a44;
    --paper: #12181d;
    --wash: #1a2229;
    --accent: #4fd1bd;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

header.site .inner,
main,
footer.site .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site .inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 14px;
}

header.site .brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

header.site .tagline {
  color: var(--muted);
  font-size: 13px;
}

main { padding-top: 28px; padding-bottom: 48px; }

h1 { font-size: 26px; line-height: 1.4; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 36px 0 8px; padding-top: 4px; }
h3 { font-size: 16px; margin: 24px 0 6px; }

.updated { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
p, ul, ol, dl { margin: 0 0 14px; }
li { margin: 2px 0; }
a { color: var(--accent); }

nav.toc {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  margin: 0 0 24px;
  font-size: 14px;
}

nav.toc ol { margin: 0; padding-left: 1.4em; }

table.facts {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 15px;
}

table.facts th,
table.facts td {
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

table.facts tr:last-child th,
table.facts tr:last-child td { border-bottom: 1px solid var(--line); }

table.facts th {
  width: 32%;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 560px) {
  table.facts th, table.facts td { display: block; width: auto; }
  table.facts th { border-top: 1px solid var(--line); padding-bottom: 0; }
  table.facts td { border-top: none; padding-top: 4px; }
  table.facts tr:last-child th { border-bottom: none; }
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  margin: 10px 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.example {
  display: inline-block;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 15px;
}

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer.site .inner { padding-top: 18px; padding-bottom: 28px; }
footer.site nav a { margin-right: 14px; }
