/* フィットモ 法務ページ共通スタイル
   ------------------------------------------------------------
   設計方針：
   - アプリ本体の緑（#1DA65B）を唯一のアクセントとして継承
   - 日本の法令文書の組版慣習（第○条を版面外に置く）を採用
   - 装飾を足さない。読まれること・審査で確認されることが唯一の仕事
   ------------------------------------------------------------ */

:root {
  --ink:        #161D19;   /* 本文 */
  --ink-muted:  #5C6660;   /* 補足・メタ */
  --ink-faint:  #9AA39E;   /* 条番号・日付 */
  --paper:      #FCFDFC;   /* 地 */
  --paper-alt:  #F2F6F3;   /* 表の縞・引用 */
  --rule:       #DFE6E1;   /* 罫 */
  --green:      #1DA65B;   /* アクセント（アプリ本体と同一） */
  --green-deep: #14663A;

  --measure: 34rem;        /* 本文の行長 */
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Noto Sans JP", "Yu Gothic Medium", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1;
}

/* ---------- ヘッダー ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: #fff;
}

.site-head__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.site-head__mark {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.site-head__sub {
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

/* ---------- 本体 ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.doc-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  letter-spacing: 0.04em;
}

.doc-meta {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--ink);
  letter-spacing: 0.06em;
}

.doc-meta span + span::before {
  content: "／";
  margin: 0 0.5em;
  color: var(--rule);
}

.lead {
  margin: 0 0 3rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

/* ---------- 条 ---------- */
/* 日本の法令文書の慣習：条番号は版面の外、本文は揃える */

.article {
  margin: 0 0 2.75rem;
}

.article__no {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.16em;
  margin-bottom: 0.25rem;
}

.article__head {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.875rem;
  line-height: 1.6;
}

.article p {
  margin: 0 0 1rem;
}

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

/* 号・項 */

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

.article li {
  margin-bottom: 0.5rem;
}

.article li:last-child { margin-bottom: 0; }

.article ol { list-style: decimal; }
.article ul { list-style: none; padding-left: 1.1em; }

.article ul > li::before {
  content: "・";
  margin-left: -1.1em;
  color: var(--ink-faint);
}

/* 確定稿は「1.」「(1)」を本文に含むため、自動採番は使わずぶら下げ字下げだけ与える */

.article .para {
  padding-left: 1.4em;
  text-indent: -1.4em;
}

.article .para--cont {   /* 番号を持たない、直前の項の続きの段落 */
  text-indent: 0;
}

.article ol.items {
  list-style: none;
  padding-left: 1.4em;
}

.article ol.items > li {
  padding-left: 2.2em;
  text-indent: -2.2em;
}

.article .subhead {      /* (a) (b) の小見出し */
  margin: 0 0 0.625rem;
  margin-left: 1.4em;
  padding-left: 1.7em;
  text-indent: -1.7em;
  font-weight: 700;
}

.article ul.bullets {
  margin-left: 2.2em;
}

/* ---------- 表（特商法・料金表） ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.75;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--rule);
}

th {
  width: 34%;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--paper-alt);
  white-space: nowrap;
}

@media (max-width: 34rem) {
  th, td { display: block; width: 100%; }
  th { border-bottom: none; white-space: normal; }
  td { padding-top: 0.5rem; }
}

/* 一覧表（委託先一覧・料金表）＝見出し行を持つ多列の表。
   上の2列の表とは組み方が違うので .grid で分ける */

.grid {
  table-layout: fixed;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.grid th,
.grid td {
  padding: 0.625rem 0.75rem;
  overflow-wrap: anywhere;
}

.grid th {
  width: auto;
  white-space: normal;
  border-bottom: 1px solid var(--ink-faint);
}

.grid td:first-child {
  font-weight: 700;
  color: var(--ink);
}

/* 列幅（table-layout:fixed なので見出し行で決まる） */

.grid--entrust thead th:nth-child(1) { width: 24%; }
.grid--entrust thead th:nth-child(2) { width: 26%; }
.grid--entrust thead th:nth-child(3) { width: 28%; }
.grid--entrust thead th:nth-child(4) { width: 22%; }

.grid--plans thead th:nth-child(1) { width: 20%; }
.grid--plans thead th:nth-child(2) { width: 17%; }
.grid--plans thead th:nth-child(3) { width: 19%; }
.grid--plans thead th:nth-child(4) { width: 44%; }

/* スマホ幅：横スクロールさせず、1行を1ブロックに畳んで各セルに列名を添える */

@media (max-width: 34rem) {
  .grid { table-layout: auto; }
  .grid thead { display: none; }   /* 見出し行を消すので列幅の指定も外れる */

  .grid tr {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .grid tbody tr:last-child { border-bottom: none; }

  .grid td {
    padding: 0 0 0.625rem;
    border-bottom: none;
  }

  .grid td:last-child { padding-bottom: 0; }

  .grid td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
  }

  .grid td:first-child { font-size: 0.9375rem; }
}

/* ---------- 注記 ---------- */

.note {
  background: var(--paper-alt);
  border-left: 3px solid var(--green);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.note p { margin: 0 0 0.5rem; }
.note p:last-child { margin-bottom: 0; }

/* ---------- 差し込み待ちの目印（公開前に必ず消す） ---------- */

.todo {
  background: #FFF4E5;
  border: 1px dashed #E0A458;
  color: #7A4E12;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
}

.todo::before {
  content: "差し込み待ち";
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.375rem;
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  background: #fff;
}

.site-foot__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.site-foot a {
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  border-bottom-color: var(--green);
}

/* ---------- リンク・フォーカス ---------- */

a { color: var(--green-deep); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
