@charset "UTF-8";

/* ==========================================================================
   21-domain.com  規約ページ共通スタイル
   サイト共通デザイン（html.css）／申込フォーム（Form/newhandle.css）と同トーン
   ========================================================================== */

:root {
  color-scheme: light;

  --brand: #2c6fb2;
  --brand-deep: #143557;
  --brand-soft: #4b8ccd;
  --brand-tint: rgba(44, 111, 178, .12);
  --accent: #f2b552;
  --accent-tint: rgba(255, 226, 193, .45);
  --accent-text: #8a5606;

  --text: #143557;
  --muted: #4c6f96;
  --faint: #6f8fb8;
  --line: rgba(44, 111, 178, .18);
  --surface: #fff;
  --page: #f4f8ff;

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-card: 0 12px 24px rgba(15, 40, 70, .08);
  --shadow-header: 0 10px 22px rgba(43, 99, 163, .22);
  --container: 940px;
}

* { box-sizing: border-box; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.95;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, #e6f0fe 0%, rgba(230, 240, 254, 0) 60%),
    var(--page);
  font-size: 15px;
}

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: #0b4e8d; text-decoration: underline; }

:where(a, button):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

.page {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
  padding-block: 20px 40px;
}

/* ---------- ヘッダー・パンくず ------------------------------------------ */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2b63a3, #4b8ccd);
  box-shadow: var(--shadow-header);
  color: #fff;
}

.site-header__brand { display: inline-flex; }

.site-header__logo {
  width: clamp(180px, 26vw, 250px);
  border-radius: 8px;
  filter: drop-shadow(0 4px 10px rgba(9, 27, 51, .2));
}

.site-header__tag {
  margin: 0;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .92);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 4px 16px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--faint);
}

.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span[aria-hidden] { opacity: .6; }
.breadcrumb [aria-current] { color: var(--muted); }

/* ---------- ドキュメント本体 -------------------------------------------- */

.doc {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-card {
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.doc__eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

h1 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: clamp(1.45rem, 3.4vw, 1.85rem);
  line-height: 1.5;
}

.doc__lead {
  margin: 0;
  color: var(--muted);
}

.doc__updated {
  display: inline-block;
  margin: 16px 0 0;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

/* 参照ページへの導線 */

.doc-note {
  margin: 18px 0 0;
  padding: 14px 18px;
  border: 1px solid rgba(255, 181, 79, .45);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 14px;
}

.doc-note a { color: #7a4a03; text-decoration: underline; }
.doc-note strong { color: #7a4a03; }

/* ---------- 目次 -------------------------------------------------------- */

.toc { margin-top: 22px; }

.toc__title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--brand-deep);
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.toc__chapter {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fbff;
}

.toc__chapter > a,
.toc__chapter > .toc__chapter-title {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 14px;
}

.toc__chapter ul li { margin-top: 2px; }

.toc__chapter ul a,
.toc__chapter ul li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.toc__chapter ul a:hover { color: var(--brand); }

/* ---------- 章・条 ------------------------------------------------------ */

.chapter { scroll-margin-top: 16px; }

.chapter > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--brand);
  font-size: 1.2rem;
  line-height: 1.6;
}

.chapter > h2::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 26px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2c6fb2, #4b8ccd);
}

.article {
  scroll-margin-top: 16px;
  padding-top: 4px;
}

.article + .article {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

.article > h3 {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 1.02rem;
  line-height: 1.7;
}

.doc-card > .body > *:first-child,
.article > *:nth-child(2) { margin-top: 0; }

/* 本文 */

.body p,
.article p { margin: 0 0 1em; }

.body p:last-child,
.article p:last-child { margin-bottom: 0; }

.body ul,
.body ol,
.article ul,
.article ol {
  margin: 0 0 1em;
  padding-left: 1.6em;
}

.body li,
.article li { margin-bottom: .4em; }

.body ul ul,
.body ol ol,
.body ul ol,
.body ol ul,
.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul { margin-top: .5em; }

/* 定義リスト（旧アーカイブページの章立て） */

.body dl { margin: 0 0 1.4em; }

.body dt {
  margin-bottom: .4em;
  color: var(--brand-deep);
  font-weight: 700;
}

.body dd {
  margin: 0 0 .8em 1.4em;
  color: var(--muted);
}

/* 箇条書きの見出し（旧デザインで <b> だった行） */

.body b,
.article b { color: var(--brand-deep); }

/* 条番号なしの素の一覧（英文規約など） */

.body > ul,
.body > ol { margin-top: 0; }

/* ---------- 表 ---------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.table-wrap table {
  width: 100%;
  min-width: 560px; /* 狭い画面では潰さず横スクロールさせる */
  border-collapse: collapse;
  font-size: 14px;
}

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

.table-wrap tr:last-child th,
.table-wrap tr:last-child td { border-bottom: 0; }

.table-wrap th {
  background: #f8fbff;
  color: var(--brand-deep);
  font-weight: 700;
}

/* ---------- 更新履歴 ---------------------------------------------------- */

.history > h2 {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 1.15rem;
}

.history ol,
.history ul {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  font-size: 14px;
}

.history li { margin-bottom: .5em; }

/* ---------- ページ内リンク・戻り導線 ------------------------------------ */

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}

.doc-link:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

/* ---------- フッター ---------------------------------------------------- */

.site-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- レスポンシブ ------------------------------------------------ */

@media (max-width: 640px) {
  .page { width: min(100% - 20px, var(--container)); }
  .site-header { justify-content: center; text-align: center; }
  .toc > ul { grid-template-columns: 1fr; }
  .doc-link { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; }
  .site-header, .breadcrumb, .toc, .site-footer, .doc-links { display: none; }
  .doc-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
