/* ドキュメント（website/docs/）の外観。トップページ（../style.css）と色と書体をそろえる。
   プライバシーポリシー（../privacy/app.html）もこのファイルを借りる＝骨組みのクラスを変えたらそちらも確かめる。
   配信先の CSP は default-src 'self' なので、インラインの style 属性・style 要素・data URI の画像は使えない。
   見た目はすべてこのファイルに書き、画像は ../assets/docs/ から読む。 */
:root {
  --ink:#1c3f6e;
  --muted:#56657c;
  --paper:#f7f9fc;
  --card:#ffffff;
  --line:#dbe3ee;
  --highlight:#d3e3f7;
  --accent:#26619c;
  --deep:#0e2a4f;
  /* 枠を指したとき・区切りの強い線（style.css と同じ） */
  --line-strong:#778ca5
}
* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth;
  scroll-padding-top:90px
}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;
  line-height:1.9;
  -webkit-font-smoothing:antialiased
}
a {
  color:inherit
}
a:focus-visible {
  outline:3px solid #35669d;
  outline-offset:4px
}
.skip {
  position:absolute;
  left:-9999px
}
.skip:focus {
  left:16px;
  top:12px;
  background:var(--card);
  padding:8px 14px;
  z-index:20
}

/* ── ヘッダー ─────────────────────────────── */
.doc-header {
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  min-height:70px;
  padding:10px 4.5%;
  background:#f5f7f9f5;
  border-bottom:1px solid var(--line)
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none
}
/* ロゴの寸法は style.css の .brand-logo と同じ（最小サイズ＝横幅 160px） */
.brand-logo {
  display:block;
  height:58px;
  width:auto
}
.brand-reading {
  font-size:14px;
  /* 下寄せ：ロゴの ulminans の文字の下端（ロゴの高さの 86%＝下から約 8px）に読みの下端を揃える */
  align-self:flex-end;
  line-height:1;
  margin-bottom:7px;
  font-weight:500;
  letter-spacing:1.5px;
  color:var(--muted);
  border-left:1px solid #b5bcc4;
  padding-left:12px;
  margin-left:4px
}
.doc-header nav {
  display:flex;
  flex-wrap:wrap;
  gap:6px 22px;
  font-size:14px;
  font-weight:600
}
.doc-header nav a {
  text-decoration:none
}
.doc-header nav a:hover,.doc-header nav a[aria-current] {
  color:var(--accent)
}

/* ── 本文の骨組み（左に目次・右に本文） ───────────── */
.doc-layout {
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  /* 本文を先に書いてある（読み上げと狭い画面で本文から始まる）ので、置き場は名前で決める */
  grid-template-areas:"side main";
  gap:48px;
  max-width:1180px;
  margin:0 auto;
  padding:40px 4.5% 80px
}
.doc-side {
  grid-area:side;
  position:sticky;
  top:100px;
  align-self:start;
  font-size:14.5px;
  line-height:1.7
}
.doc-side h2 {
  font-size:13px;
  letter-spacing:1.6px;
  color:var(--muted);
  margin:0 0 10px;
  font-weight:650
}
.doc-side ul {
  list-style:none;
  margin:0 0 26px;
  padding:0
}
.doc-side li a {
  display:block;
  padding:5px 10px;
  border-left:2px solid var(--line);
  text-decoration:none
}
.doc-side li a:hover {
  border-left-color:var(--line-strong)
}
.doc-side li a[aria-current] {
  border-left-color:var(--accent);
  color:var(--accent);
  font-weight:650
}
.doc-main {
  grid-area:main;
  max-width:820px;
  min-width:0
}

/* ── 見出しと本文 ─────────────────────────── */
.doc-eyebrow {
  font-size:13px;
  font-weight:650;
  letter-spacing:1.7px;
  color:#3c6695;
  margin:0 0 10px
}
.doc-main h1 {
  font-size:clamp(28px,3.4vw,40px);
  line-height:1.5;
  letter-spacing:-1.2px;
  margin:0 0 14px
}
.doc-lead {
  font-size:15.5px;
  color:var(--muted);
  margin:0 0 22px
}
.doc-meta {
  font-size:13.5px;
  color:var(--muted);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:9px 0;
  margin:0 0 36px;
  display:flex;
  flex-wrap:wrap;
  gap:4px 22px
}
.doc-main h2 {
  font-size:23px;
  line-height:1.6;
  letter-spacing:-.6px;
  margin:56px 0 16px;
  padding-top:18px;
  border-top:1px solid var(--line)
}
.doc-main h3 {
  font-size:16.5px;
  margin:32px 0 10px
}
.doc-main p,.doc-main li {
  font-size:14.5px
}
.doc-main ul,.doc-main ol {
  padding-left:1.4em
}
.doc-main li {
  margin:4px 0
}
.doc-main strong {
  background:linear-gradient(transparent 62%,var(--highlight) 62%)
}
.doc-main code {
  font-size:14.5px;
  background:#e9edf1;
  padding:1px 6px;
  border-radius:4px
}

/* 目次（ページ内） */
.toc {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:7px;
  padding:16px 22px;
  margin:0 0 30px
}
.toc p {
  margin:0 0 6px;
  font-size:14px;
  font-weight:650;
  letter-spacing:1px;
  color:var(--muted)
}
.toc ol {
  margin:0;
  columns:2;
  column-gap:30px
}
.toc li {
  font-size:13.5px
}

/* 表 */
.table-wrap {
  overflow-x:auto;
  margin:14px 0 22px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--card)
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:13.5px;
  line-height:1.7
}
th,td {
  text-align:left;
  vertical-align:top;
  padding:10px 14px;
  border-bottom:1px solid var(--line)
}
thead th {
  background:#eaeef2;
  font-size:14px;
  letter-spacing:.5px
}
tbody tr:last-child td,tbody tr:last-child th {
  border-bottom:0
}
tbody th {
  white-space:nowrap;
  font-weight:650
}

/* 補足・注意 */
.note {
  background:#eaeff5;
  border-left:3px solid var(--line-strong);
  border-radius:0 6px 6px 0;
  padding:12px 18px;
  margin:18px 0
}
.note p {
  margin:0;
  font-size:13.5px
}
.note strong {
  background:none
}

/* 画面写真。クリックで原寸を開く */
figure {
  margin:22px 0 28px
}
figure a {
  display:block;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden;
  background:var(--card)
}
figure img {
  display:block;
  width:100%;
  height:auto
}
figcaption {
  font-size:14px;
  color:var(--muted);
  margin-top:8px
}
/* 拡大できる図（リンク付き）の説明の末尾に添える注記。文言はここ 1 か所＝各ページの HTML には書かない。
   説明より小さく、説明の後ろに続けて置く（折り返すときは注記ごと次の行へ） */
figure > a + figcaption::after {
  content:"※デモデータ：クリックで拡大";
  display:inline-block;
  margin-left:.8em;
  font-size:12px
}
/* 窓（ダイアログ）の写真は原寸より広げない＝本文幅いっぱいに引き伸ばすと文字が粗くなる */
figure.fig-narrow img {
  width:auto;
  max-width:100%
}
/* 2 枚を横に並べる（狭い画面では縦に積む） */
.fig-pair {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:start;
  margin:22px 0 28px
}
.fig-pair figure {
  margin:0
}

/* 流れ（→ でつなぐ短い段） */
.flow {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:14px 0 22px;
  padding:0;
  list-style:none
}
.flow li {
  position:relative;
  margin:0;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:5px;
  padding:6px 13px;
  font-size:15px;
  font-weight:600
}
.flow li+li {
  margin-left:22px
}
.flow li+li:before {
  content:"→";
  position:absolute;
  left:-23px;
  color:var(--line-strong);
  font-weight:400
}

/* 機能カード（総合ドキュメントのモジュール一覧・関連リンク） */
.card-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:18px 0 26px
}
.doc-card {
  display:block;
  background:var(--card);
  border:1px solid #d4dae1;
  border-radius:7px;
  padding:18px 20px;
  text-decoration:none;
  transition:border-color .2s,transform .2s
}
.doc-card:hover {
  border-color:var(--line-strong);
  transform:translateY(-2px)
}
.doc-card b {
  display:block;
  font-size:15px;
  margin-bottom:4px
}
.doc-card span {
  display:block;
  font-size:14.5px;
  color:var(--muted);
  line-height:1.75
}
.doc-card em {
  display:inline-block;
  font-style:normal;
  font-size:12.5px;
  color:#3c6695;
  letter-spacing:1px;
  margin-bottom:4px
}

/* 構成図（共通基盤とモジュール） */
.stack {
  margin:18px 0 26px;
  display:grid;
  gap:10px
}
.stack-row {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:10px
}
.stack-box {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:6px;
  padding:12px 14px;
  font-size:14.5px;
  line-height:1.6
}
.stack-box b {
  display:block;
  font-size:13.5px;
  margin-bottom:2px
}
.stack-base {
  background:var(--deep);
  color:#e6edf4;
  border-color:var(--deep)
}
.stack-base span {
  color:#b5c2d0
}
.stack-option {
  border-style:dashed
}
.stack-label {
  font-size:13px;
  letter-spacing:1.3px;
  color:var(--muted);
  font-weight:650
}

/* 前後のページ */
.pager {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:60px;
  padding-top:24px;
  border-top:1px solid var(--line)
}
.pager a {
  display:block;
  border:1px solid var(--line);
  border-radius:7px;
  padding:14px 18px;
  text-decoration:none;
  background:var(--card);
  font-size:14px;
  font-weight:600
}
.pager a:hover {
  border-color:var(--line-strong)
}
.pager small {
  display:block;
  font-size:13px;
  color:var(--muted);
  font-weight:400
}
.pager .next {
  text-align:right;
  grid-column:2
}

/* フッター */
.doc-footer {
  border-top:1px solid var(--line);
  padding:26px 4.5%;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
  color:var(--muted)
}
.doc-footer a {
  text-decoration:none
}

/* ── 狭い画面 ───────────────────────────── */
@media(max-width:960px) {
  .doc-layout {
    grid-template-columns:1fr;
    grid-template-areas:"main" "side";
    gap:0;
    padding-top:26px
  }
  .doc-side {
    position:static;
    border-top:1px solid var(--line);
    padding-top:24px;
    margin-top:50px
  }
}
@media(max-width:640px) {
  .doc-header {
    padding:10px 16px
  }
  .doc-layout {
    padding-left:16px;
    padding-right:16px
  }
  .toc ol {
    columns:1
  }
  .card-grid,.pager,.fig-pair {
    grid-template-columns:1fr
  }
  .pager .next {
    grid-column:1
  }
  .doc-main h2 {
    font-size:20px
  }
  tbody th {
    white-space:normal;
    /* 折り返しを許すと、列の多い表で行見出しが 1 文字幅まで縮んで縦に並ぶ */
    min-width:5em
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  .doc-card,.doc-card:hover {
    transition:none;
    transform:none
  }
}
@media print {
  .doc-header,.doc-side,.pager,.doc-footer {
    display:none
  }
  .doc-layout {
    display:block;
    padding:0
  }
}
