/* 介護のお給料ものさし：共通スタイル
   コンセプト：結果を「給与明細」の形で見せる。目立たせるのは明細と合計額だけで、ほかは静かに */
:root {
  --paper: #f2f6f4;   /* 背景：明細用紙の淡いグリーン */
  --sheet: #ffffff;   /* 明細・カードの紙 */
  --ink: #1e2b28;     /* 文字 */
  --sub: #55655f;     /* 補足の文字 */
  --green: #2f6f5e;   /* アクセント（ボタン・見出しの線） */
  --rule: #c9dcd5;    /* 罫線 */
  --marker: #ffe58a;  /* 合計額のマーカー */
  --minus: #a2462f;   /* マイナス差額 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
}
a { color: var(--green); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* ヘッダー・フッター */
.site-header, main, .site-footer { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.site-header { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding-top: 18px; padding-bottom: 6px; }
.logo { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; margin-right: auto; }
.site-header nav { display: flex; gap: 16px; font-size: 15px; }
.pr { max-width: 680px; margin: 0 auto; padding: 0 16px; font-size: 13px; color: var(--sub); }
.site-footer { margin-top: 64px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--sub); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }

/* 見出しと本文 */
h1 { font-size: 28px; line-height: 1.4; margin: 28px 0 8px; }
h2 { font-size: 22px; line-height: 1.5; margin: 44px 0 12px; padding-left: 12px; border-left: 4px solid var(--green); }
h3 { font-size: 18px; margin: 28px 0 8px; }
.lead { color: var(--sub); margin: 0 0 24px; }
.note { font-size: 14px; color: var(--sub); }
table.plain { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
table.plain th, table.plain td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; }
table.plain td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 入力フォーム */
.calc { display: grid; gap: 14px; }
.calc label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.calc select, .calc input[type="text"] {
  font: inherit; font-weight: 400; width: 100%;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink);
}
.calc .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.calc .check input { width: 20px; height: 20px; accent-color: var(--green); }

/* 結果：給与明細 */
.slip {
  margin: 28px 0 8px; background: var(--sheet); border: 1px solid var(--rule); border-top: 6px solid var(--green);
  padding: 18px 18px 14px; font-variant-numeric: tabular-nums;
}
.slip-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); border-bottom: 1px dashed var(--rule); padding-bottom: 8px; }
.slip table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.slip th { text-align: left; font-weight: 400; padding: 6px 0; }
.slip td { text-align: right; padding: 6px 0; white-space: nowrap; }
.slip tr + tr th, .slip tr + tr td { border-top: 1px solid var(--rule); }
.slip .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; }
.slip .total b { font-size: 40px; line-height: 1.2; background: linear-gradient(transparent 62%, var(--marker) 62%); }
.slip .sub-total { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); }
.advice { margin: 16px 0 0; }
.advice p { margin: 6px 0; }

/* 次の一歩への誘導 */
.next { margin: 28px 0; padding: 16px 18px; background: var(--sheet); border-left: 4px solid var(--green); }
.next a { font-weight: 700; }

/* 広告ボタン（記事内の [[cta:…]]） */
.cta { margin: 16px 0 24px; }
.cta a {
  display: block; text-align: center; padding: 14px 16px; border-radius: 8px;
  background: var(--green); color: #fff; font-weight: 700; text-decoration: none;
}
.cta a:hover { filter: brightness(1.1); }
.cta img { display: block; width: 1px; height: 1px; }

/* 記事一覧 */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.posts a { font-weight: 700; text-decoration: none; }
.posts p { margin: 4px 0 0; font-size: 15px; color: var(--sub); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media (max-width: 480px) { h1 { font-size: 24px; } .slip .total b { font-size: 34px; } }
