/* コラム共通スタイル。アプリ本体(index.css)とトーンを揃える */
:root {
  --cta: #f57f3b;
  --cta-dark: #dd6a2f;
  --cta-soft: #fff1e5;
  --accent: #2b62a3; /* フォーカス輪郭(リンク青と統一) */
  --bg: #faf6ee;
  --card: #fff;
  --text: #33302b;
  --muted: #6f6759;
  --line: #eee4d4;
  --ok: #1a8f5c;
  --ok-soft: #f2f7f0;
  --ok-line: #d6e8dc;
  --ng: #b3261e;
  --radius: 16px;
  /* テキストリンクは紙色背景でAAを満たす濃い青(オレンジはボタン専用) */
  --link: #2b62a3;
  /* 影は3段階のみ: e1=リスト・チップ / e2=カード / e3=CTAの光 */
  --e1: 0 1px 6px rgba(90, 70, 40, 0.06);
  --e2: 0 2px 12px rgba(30, 60, 110, 0.08);
  --e3: 0 6px 18px rgba(221, 106, 40, 0.16);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Hiragino Maru Gothic ProN', system-ui, -apple-system,
    'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
  line-height: 1.9;
  font-size: 15.5px;
}

/* --- サイトヘッダー(アプリへの戻り口) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0.6rem 1rem;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}

.site-header img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 1px 5px rgba(30, 60, 110, 0.2);
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.4rem 1rem 3rem;
}

/* --- 記事ヘッダー --- */
.meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.meta a { color: var(--muted); }

h1 {
  font-size: 1.32rem;
  line-height: 1.55;
  margin: 0.5rem 0 1.1rem;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 2.3rem 0 0.7rem;
  padding-left: 0.6rem;
  border-left: 4px solid var(--cta);
}

/* カード内の小見出し。h2より小さく見えるよう明示する(既定値だとh2を上回るため) */
h3 {
  font-size: 1.03rem;
  line-height: 1.5;
  margin: 1.4rem 0 0.5rem;
  color: var(--cta-dark);
}

p { margin: 0.8rem 0; }

ol, ul { margin: 0.8rem 0; padding-left: 1.4rem; }
li { margin: 0.35rem 0; }
ol { counter-reset: step; list-style: none; padding-left: 0; }

ol li {
  position: relative;
  padding-left: 2rem;
}

ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

a { color: var(--link); }

/* --- カード --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  margin: 0.9rem 0;
  box-shadow: var(--e2);
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* 「向いている人」「コツ」などの補足チップ */
.fit {
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
  color: var(--ok);
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  background: #f3ede2;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

p svg,
dd svg {
  vertical-align: -2px;
}

img.example {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* --- 表 --- */
.tablewrap {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--e2);
  margin: 0.9rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: #fff;
  min-width: 540px;
}

th, td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--cta-soft);
  white-space: nowrap;
}

td:first-child, th:first-child { font-weight: 700; white-space: nowrap; }

.ok { color: var(--ok); font-weight: 700; }
.ng { color: var(--ng); font-weight: 700; }

/* 比較表の行見出し(th scope="row")は列見出しの帯色を引き継がない */
tbody th { background: var(--card); }

/* --- CTAバナー --- */
.cta-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(180deg, #fff, var(--cta-soft));
  border: 2px solid #ffd9b8;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin: 2rem 0 0.4rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--e3);
}

.cta-banner img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: none;
}

.cta-banner b {
  display: block;
  color: var(--cta-dark);
  font-size: 0.98rem;
  line-height: 1.5;
}

.cta-banner small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* --- 関連記事 --- */
.related { display: grid; gap: 0.55rem; margin: 0.8rem 0 0; }

.related a {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.86rem;
  box-shadow: var(--e1);
}

.related a::before { content: '▸ '; color: var(--cta); font-weight: 700; }

/* --- 一覧ページ --- */
.list-card { padding: 0; overflow: hidden; }

.list-card a {
  display: block;
  padding: 0.95rem 1.2rem;
  text-decoration: none;
  color: var(--text);
}

.list-card h2 {
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
  padding: 0;
  border: none;
}

.list-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* デザイン方針v2(docs/デザイン方針.md): 見出しは教科書体で題材の人格を出す。
   選択色はマーカー黄(署名要素「まっさら」への呼応)。動きはreduced-motionで停止 */
h1, h2, h3 { font-family: 'UD デジタル 教科書体 N-B', 'UD デジタル 教科書体 N-R', 'Hiragino Maru Gothic ProN', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif; }
::selection { background: #ffe28a; color: #33302b; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 「結論を先に」= アンサーボックス。汎用カードより一段の視覚優先度を与える */
.card.lead {
  border-left: 4px solid var(--cta);
  background: #fff8ef;
}
