/* Japan by Kana(仮) — シンプルで上品な編集デザイン
   方針: カード化・角丸・シャドウ・グラデーションなし。細い罫線と余白で個性を出す。
   アクセント色(朱): リンク・小ラベルのみに使う */
:root {
  --ink: #1d1d1b;
  --ink-soft: #55524d;
  --rule: #d9d4cc;
  --rule-soft: #e8e4dd;
  --accent: #b04a3a;      /* 朱色: リンク・ラベル専用 */
  --paper: #fcfbf8;
  --measure: 44rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); padding: 2.25rem 0 0; }
.site-name { margin: 0; font-size: 1.6rem; letter-spacing: .02em; }
.site-name a { color: var(--ink); }
.site-tagline {
  margin: .2rem 0 1.1rem;
  color: var(--ink-soft);
  font-size: .85rem;
  font-family: system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.site-nav {
  display: flex; flex-wrap: wrap; gap: .1rem 1.15rem;
  padding: .6rem 0;
  border-top: 1px solid var(--rule-soft);
  font-family: system-ui, sans-serif;
  font-size: .82rem;
}
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

main { padding: 2.5rem 0 4rem; min-height: 55vh; }

/* ---------- shared ---------- */
.kicker, .box-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .4rem;
}
.section-heading {
  font-size: .95rem;
  font-family: system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .45rem;
  margin: 3rem 0 1rem;
  font-weight: 600;
}
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-bottom: 1px dotted var(--rule); }
.article-item { display: block; padding: .95rem 0; color: var(--ink); }
.article-item:hover { text-decoration: none; }
.article-item:hover .item-title { color: var(--accent); }
.item-meta {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--ink-soft);
}
.item-title { display: block; font-size: 1.12rem; line-height: 1.45; margin-top: .15rem; }
.item-desc { display: block; font-size: .9rem; color: var(--ink-soft); margin-top: .25rem; }

/* ---------- home ---------- */
.home-feature { padding-bottom: .5rem; }
.feature-title { font-size: 1.9rem; line-height: 1.35; margin: 0 0 .5rem; font-weight: 500; }
.feature-title a { color: var(--ink); }
.feature-meta { font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-soft); margin: 0 0 .6rem; }
.feature-lead { color: var(--ink-soft); margin: 0; }
.more-link { font-family: system-ui, sans-serif; font-size: .88rem; margin-top: 1rem; }
.home-about p { color: var(--ink-soft); }

/* ---------- listing ---------- */
.listing-heading { font-size: 1.7rem; font-weight: 500; margin: 0 0 .4rem; }
.listing-lead { color: var(--ink-soft); margin: 0 0 .3rem; }
.listing-count {
  font-family: system-ui, sans-serif; font-size: .78rem;
  color: var(--ink-soft); border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem; margin-bottom: .3rem;
}
.pagination { margin-top: 2rem; display: flex; gap: .8rem; font-family: system-ui, sans-serif; }
.page-now { color: var(--ink); border-bottom: 2px solid var(--accent); }

/* ---------- article ---------- */
.breadcrumb { font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--ink-soft); }
.article-title { font-size: 1.85rem; line-height: 1.35; font-weight: 500; margin: 0 0 .5rem; }
.article-meta { font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-soft); margin: 0 0 1.6rem; }
.disclosure {
  font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-soft);
  border-top: 1px dotted var(--rule); border-bottom: 1px dotted var(--rule);
  padding: .6rem 0; margin: 0 0 1.6rem;
}
.conclusion-box { border: 1px solid var(--rule); padding: 1.1rem 1.25rem; margin: 0 0 1.6rem; }
.conclusion-box p { margin: 0; }
.key-fig { color: var(--accent); font-weight: 600; }
.toc { border-bottom: 1px solid var(--rule-soft); padding-bottom: 1.2rem; margin-bottom: 2rem; }
.toc ol { margin: 0; padding-left: 1.3rem; font-size: .92rem; }
.toc a { color: var(--ink); }

.article-body h2 {
  font-size: 1.35rem; font-weight: 500; line-height: 1.4;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .4rem; margin: 2.6rem 0 1rem;
}
.article-body h3 { font-size: 1.1rem; font-weight: 600; margin: 2rem 0 .6rem; }
.article-body blockquote {
  margin: 1.4rem 0; padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--rule); color: var(--ink-soft);
}
.article-body code { font-size: .9em; background: #f1ede6; padding: .1em .35em; }

/* directive blocks */
.guide-box, .caution-box, .edit-memo { margin: 1.6rem 0; }
.guide-box { border: 1px solid var(--rule); padding: 1rem 1.25rem; }
.guide-row { display: flex; gap: 1rem; padding: .4rem 0; border-bottom: 1px dotted var(--rule-soft); }
.guide-row:last-child { border-bottom: none; }
.guide-label { flex: 0 0 38%; font-family: system-ui, sans-serif; font-size: .85rem; color: var(--ink-soft); }
.guide-value { flex: 1; font-size: .95rem; }
.steps-list { list-style: none; margin: 1.6rem 0; padding: 0; counter-reset: step; }
.step-item { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px dotted var(--rule-soft); }
.step-no { font-family: system-ui, sans-serif; color: var(--accent); font-size: .9rem; padding-top: .15rem; }
.step-title { font-weight: 600; display: block; }
.step-body { margin: .2rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.ng-list { list-style: none; margin: 1.6rem 0; padding: 0; }
.ng-item { display: flex; gap: .9rem; padding: .8rem 0; border-bottom: 1px dotted var(--rule-soft); }
.ng-badge {
  font-family: system-ui, sans-serif; font-size: .7rem; letter-spacing: .08em;
  color: var(--accent); border: 1px solid var(--accent);
  padding: .1rem .45rem; height: fit-content; margin-top: .3rem; white-space: nowrap;
}
.ng-title { font-weight: 600; display: block; }
.ng-body { margin: .2rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.caution-box { border: 1px solid var(--accent); padding: .9rem 1.1rem; font-size: .95rem; }
.caution-label {
  display: block; font-family: system-ui, sans-serif; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem;
}
.edit-memo { border-top: 1px dotted var(--rule); border-bottom: 1px dotted var(--rule); padding: .9rem 0; }
.edit-memo p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.memo-label {
  display: block; font-family: system-ui, sans-serif; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem;
}
.table-scroll { overflow-x: auto; margin: 1.6rem 0; }
.compare-intro { color: var(--ink-soft); }
.compare-table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.compare-table th, .compare-table td {
  border: 1px solid var(--rule); padding: .55rem .7rem; text-align: left; vertical-align: top;
}
.compare-table thead th { font-family: system-ui, sans-serif; font-size: .8rem; background: #f5f2ec; }
.compare-table .row-label { font-weight: 600; white-space: nowrap; }

/* markdown tables (素のMarkdown表にも同じ見た目を当てる) */
.article-body table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 1.6rem 0; }
.article-body th, .article-body td { border: 1px solid var(--rule); padding: .55rem .7rem; text-align: left; }
.article-body thead th { font-family: system-ui, sans-serif; font-size: .8rem; background: #f5f2ec; }

/* faq / sources / author */
.faq h2, .sources h2 { font-size: 1.35rem; font-weight: 500; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; margin: 2.6rem 0 1rem; }
.faq details { border-bottom: 1px dotted var(--rule); padding: .7rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .6rem 0 .2rem; color: var(--ink-soft); }
.sources ul { padding-left: 1.3rem; font-size: .9rem; }
.author-box { border: 1px solid var(--rule); padding: 1rem 1.25rem; margin: 2.6rem 0 0; }
.author-box p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; }
.footer-about { color: var(--ink-soft); font-size: .9rem; margin: 0 0 1rem; }
.footer-nav { display: flex; gap: 1.2rem; font-family: system-ui, sans-serif; font-size: .82rem; }
.footer-copy { font-family: system-ui, sans-serif; font-size: .78rem; color: var(--ink-soft); margin-top: 1.2rem; }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .feature-title { font-size: 1.5rem; }
  .article-title { font-size: 1.5rem; }
  .guide-row { flex-direction: column; gap: .1rem; }
  .guide-label { flex: none; }
}
