:root {
  --primary:   #1a3a5c;
  --accent:    #e8a020;
  --accent2:   #7b3fa0;
  --bg:        #f8f7f4;
  --text:      #2c2c2c;
  --muted:     #6b6b6b;
  --border:    #e0ddd8;
  --max-w:     740px;
  --font:      'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 16px;
}

/* ─── Layout ─── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  background: var(--primary);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hero-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  opacity: .45;
}
.hero-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
/* fallback when no image */
.hero-no-img .hero-body {
  position: static;
  padding: 52px 24px 44px;
}
.hero .tag {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.5);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  letter-spacing: .15em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(19px, 3.8vw, 27px);
  font-weight: 900;
  line-height: 1.55;
  max-width: 660px;
  margin: 0 auto;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero h1 em {
  font-style: normal;
  color: #f7c96e;
}

/* ─── Lead (below hero) ─── */
.lead-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 36px 20px;
}
.lead-section .lead-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.lead-author {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
}
.lead-author-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 2px solid var(--border);
}
.lead-author-name {
  font-size: 11px;
  font-weight: bold;
  margin-top: 8px;
  line-height: 1.4;
  color: var(--text);
}
.lead-author-role {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.lead-text {
  flex: 1;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--text);
}
.lead-text p { margin-bottom: 16px; }
.lead-text p:last-child { margin-bottom: 0; }

/* ─── Author bio (EEAT) ─── */
.author-bio-section {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 40px;
}
.author-bio-label {
  font-size: 12px;
  letter-spacing: .15em;
  font-weight: bold;
  color: var(--muted);
  margin-bottom: 20px;
}
.author-bio-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.author-bio-card + .author-bio-card { margin-top: 0; }
.bio-photo-col {
  flex-shrink: 0;
  text-align: center;
  width: 90px;
}
.bio-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.bio-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 2px;
  margin-top: 8px;
}
.bio-badge-main { background: var(--primary); color: #fff; }
.bio-badge-sub  { background: var(--accent2); color: #fff; }
.bio-content {}
.bio-role {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.bio-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.bio-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 12px;
}
.bio-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bio-cred {
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 10px;
  color: var(--muted);
}

@media (max-width: 580px) {
  .lead-section .lead-inner { flex-direction: column; gap: 16px; }
  .lead-author { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; }
  .lead-author-photo { width: 52px; height: 52px; margin: 0; }
  .author-bio-card { flex-direction: column; }
  .bio-photo-col { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; }
  .bio-photo { width: 60px; height: 60px; }
}

/* ─── 担当紹介 ─── */
.authors {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.authors-label {
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--muted);
  font-weight: bold;
  margin-bottom: 4px;
}
.author-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.author-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.icon-main { background: var(--primary); }
.icon-sub  { background: var(--accent2); }
.author-info .name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.author-info .name .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .1em;
  padding: 2px 8px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 6px;
  position: relative;
  top: -1px;
}
.badge-main { background: var(--primary); color: #fff; }
.badge-sub  { background: var(--accent2); color: #fff; }
.author-info .desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Typography ─── */
h2 {
  font-size: clamp(17px, 3vw, 21px);
  font-weight: 800;
  color: var(--primary);
 /* border-left: 5px solid var(--accent);*/
  padding-left: 14px;
  margin: 52px 0 18px;
  line-height: 1.5;
}
h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 6px;
/*  border-bottom: 1px dashed var(--border);*/
}
p { margin-bottom: 18px; }
ul, ol { padding-left: 22px; margin-bottom: 18px; }
li { margin: 7px 0; }
strong { color: var(--primary); }
a { color: var(--primary); }

/* ─── TOC ─── */
.toc {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 24px 28px;
  margin: 36px 0;
  box-shadow: 0 1px 3px rgba(26, 58, 92, 0.04);
}
.toc-title {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .18em;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.toc-title::before {
  content: '■';
  margin-right: 8px;
  color: var(--accent);
  font-size: 10px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
  font-size: 14.5px;
  margin: 0;
  border-bottom: 1px dashed var(--border);
}
.toc li:last-child {
  border-bottom: none;
}
.toc a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 7px 6px 7px 2px;
  color: var(--text);
  text-decoration: none;
  position: relative;
  line-height: 1.5;
  transition: color 0.15s, padding-left 0.15s;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 24px;
  flex-shrink: 0;
}
.toc a::after {
  content: '›';
  font-size: 18px;
  margin-left: auto;
  color: var(--border);
  transition: color 0.15s, transform 0.15s;
}
.toc a:hover {
  color: var(--primary);
  padding-left: 8px;
}
.toc a:hover::before {
  color: var(--primary);
}
.toc a:hover::after {
  color: var(--primary);
  transform: translateX(4px);
}
.toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Comment corner ─── */
.comment {
  display: flex;
  gap: 22px;
  border-radius: 8px;
  padding: 22px 24px;
  margin: 28px 0;
}
.comment-main { background: #eef3f9; border-left: 4px solid var(--primary); }
.comment-sub  { background: #f5eefb; border-left: 4px solid var(--accent2); }

.comment-left {
  flex-shrink: 0;
  width: 76px;
  text-align: center;
}
.comment-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.comment-name {
  font-size: 11px;
  font-weight: bold;
  margin-top: 7px;
  line-height: 1.4;
  color: var(--text);
}
.comment-role {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.comment-body {
  flex: 1;
  font-size: 15px;
  line-height: 1.85;
}
.comment-body p { margin-bottom: 14px; }
.comment-body p:last-child { margin-bottom: 0; }

/* ─── Callout ─── */
.callout {
  border-radius: 6px;
  padding: 20px 24px;
  margin: 26px 0;
}
.callout-warn {
  background: #fff8f0;
  border-left: 4px solid var(--accent);
}
.callout-check {
  background: #f2fbf6;
  border-left: 4px solid #2a9d6a;
}
.callout-title {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .1em;
  margin-bottom: 10px;
  color: var(--muted);
}
.callout-warn .callout-title  { color: #b06000; }
.callout-check .callout-title { color: #1a7a45; }

/* ─── Step list ─── */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 22px 0; }
.steps li {
  counter-increment: s;
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(s);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ─── Stat ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.stat {
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 18px 14px;
  text-align: center;
}
.stat .n { font-size: 28px; font-weight: 900; display: block; line-height: 1.15; }
.stat .u { font-size: 13px; opacity: .8; }
.stat .l { font-size: 11px; opacity: .7; margin-top: 5px; }

/* ─── CTA ─── */
.cta {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 40px 28px;
  text-align: center;
  margin-top: 56px;
}
.cta h2 {
  color: #fff;
  border: none;
  padding: 0;
  margin: 0 0 10px;
  font-size: 19px;
}
.cta p { font-size: 15px; opacity: .9; margin-bottom: 22px; }
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  padding: 13px 34px;
  border-radius: 4px;
  text-decoration: none;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 4px;
  line-height: 1.6;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.breadcrumb li + li::before {
  content: '›';
  color: var(--border);
  margin-right: 2px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

/* ─── Entry meta (公開日 / 更新日) ─── */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 28px;
}
.entry-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.entry-date__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
}
.entry-date--modified .entry-date__label {
  color: var(--primary);
  border-color: var(--primary);
}
.entry-date time {
  color: var(--text);
  font-weight: 600;
}

/* ─── Entry footer (タグ) ─── */
.entry-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.entry-footer .tag-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-right: 8px;
  font-weight: bold;
}
.entry-footer a {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 12px;
  margin: 0 4px 6px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
}
.entry-footer a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Responsive ─── */
@media (max-width: 580px) {
  .authors { padding: 18px; }
  .comment { padding: 16px 18px; }
  .breadcrumb { font-size: 12px; padding: 12px 0 4px; }
  .entry-meta { gap: 8px 14px; font-size: 12px; }
  .entry-date__label { font-size: 10px; padding: 2px 6px; }
}
