:root {
  /* Design 02 — Midnight Orchid (dark hero + violet/pink glow, light rounded body) */
  --ink: #1a1530;
  --muted: #615d76;
  --line: #eae7f3;
  --paper: #ffffff;
  --soft: #f7f5fd;
  --brand-dark: #1b1430;      /* footer / hero base / code box */
  --accent: #a855f7;          /* violet */
  --accent-2: #f472b6;        /* pink */
  --accent-ink: #7c3aed;      /* readable violet on light (links, badges) */
  --accent-soft: #f3ebfe;
  --pink-soft: #fde8f3;
  --grad: linear-gradient(135deg, #a855f7 0%, #f472b6 100%);
  --radius: 18px;
  --btn-radius: 999px;
  --shadow: 0 18px 40px rgba(26, 21, 48, .12);
}

* { box-sizing: border-box; }

html {
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { margin: 0; min-width: 320px; font-size: 1.05rem; }

a { color: var(--accent-ink); text-decoration-thickness: .09em; text-underline-offset: .22em; }
a:hover { color: #6d28d9; }

/* キーボード操作時のフォーカスを見やすく */
a:focus-visible, .button:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 見出しへジャンプしたとき、固定ヘッダーに隠れないように */
[id] { scroll-margin-top: 88px; }

img, svg { max-width: 100%; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(790px, calc(100% - 40px)); }

h1, h2, h3 {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  margin: 0 0 .62em;
  line-height: 1.28;
  letter-spacing: -.01em;
  font-weight: 800;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.32rem; font-weight: 700; }

.lead { color: var(--muted); font-size: 1.22rem; line-height: 1.85; max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-grid;
  color: var(--ink);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}
.brand span:last-child { color: var(--muted); font-size: .85rem; font-weight: 600; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  justify-content: flex-end;
  font-size: 1rem;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.nav a:hover { color: var(--accent-ink); }

/* ---------- Buttons ---------- */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.4rem;
  border: none;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--btn-radius);
  box-shadow: 0 10px 24px rgba(168, 85, 247, .3);
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(168, 85, 247, .38); color: #fff; }

.button.secondary {
  background: transparent;
  color: var(--accent-ink);
  border: 1.5px solid #d9c7f6;
  box-shadow: none;
}
.button.secondary:hover { background: var(--accent-soft); color: var(--accent-ink); }

.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero (homepage) ---------- */
.hero {
  background:
    radial-gradient(80% 120% at 82% 0%, rgba(244, 114, 182, .42) 0%, rgba(244, 114, 182, 0) 52%),
    radial-gradient(90% 120% at 16% 16%, rgba(168, 85, 247, .48) 0%, rgba(168, 85, 247, 0) 56%),
    linear-gradient(135deg, #261746 0%, #140e26 72%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-content { padding: 104px 0 96px; max-width: 800px; }
.hero .eyebrow { color: #f5b8ec; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, .84); }
.hero .button.secondary { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .button.secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-ink);
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: .02em;
}

/* ---------- Sections ---------- */
.section { padding: 78px 0; }
.section.soft { background: var(--soft); }
.section-head { display: grid; gap: 8px; margin-bottom: 30px; max-width: 760px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 22px rgba(26, 21, 48, .05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(26, 21, 48, .12);
  border-color: #e3d6f8;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-ink); }

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: .2rem .72rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.meta { color: var(--muted); font-size: 1rem; }

/* category-colored cards */
.post-card, .cat-card { border-top: 4px solid var(--cat, var(--accent)); }
.post-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.badge--cat {
  margin-bottom: 0;
  background: color-mix(in srgb, var(--cat, var(--accent)) 14%, #fff);
  /* テキストは濃いめに寄せてコントラストを確保（特にティール系） */
  color: color-mix(in srgb, var(--cat, var(--accent-ink)) 62%, #1a1530);
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 28%, #fff);
}
.cat-card h3 a:hover { color: var(--cat, var(--accent-ink)); }
.post-card h3 a:hover { color: var(--cat, var(--accent-ink)); }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .14rem .66rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.more-link { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- Page head (inner pages) ---------- */
.page-head {
  padding: 64px 0 42px;
  background: linear-gradient(180deg, var(--soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { color: var(--muted); font-size: 1rem; }
.breadcrumb a { color: var(--accent-ink); }

/* ---------- Article ---------- */
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}
.article-body { font-size: 1.16rem; line-height: 2; }
.article-body p { margin: 0 0 1.5rem; }
.article-body h2 { margin-top: 2.7rem; font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.article-body h2[id] { scroll-margin-top: 92px; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: .55rem; }
.article-body strong { font-weight: 700; }

.toc, .author-box, .cta-box, .note-box, .prompt-box, .summary-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--paper);
}
.toc { position: sticky; top: 90px; }
.toc ul { margin: 0; padding-left: 1.2rem; }

.cta-box {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--pink-soft) 100%);
  border: 1px solid #ecd9f9;
  padding: 40px;
  text-align: center;
}
.cta-box .actions { justify-content: center; }

.note-box {
  background: var(--soft);
  border-left: 4px solid var(--accent);
}

.summary-box { background: var(--soft); }

.prompt-box {
  background: var(--brand-dark);
  color: #f3ecff;
  border: none;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

.checklist { display: grid; gap: 10px; padding: 0; }
.checklist li {
  list-style: none;
  padding: 12px 14px 12px 40px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 14px;
  color: var(--accent-ink);
  font-weight: 800;
}

/* ---------- Rich article content (hand-authored) ---------- */
.article-toc {
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 30px 0 38px;
}
.article-toc .toc-title { font-family: "Inter", "Noto Sans JP", sans-serif; font-weight: 800; font-size: 1.2rem; margin: 0 0 14px; }
.article-toc ol { margin: 0; padding-left: 1.5rem; display: grid; gap: 12px; font-size: 1.06rem; }
.article-toc li { color: var(--muted); }
.article-toc a { color: var(--ink); text-decoration: none; line-height: 1.6; }
.article-toc a:hover { color: var(--accent-ink); text-decoration: underline; }

/* underline / highlight emphasis */
.article-body .u {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: .16em;
  text-underline-offset: .18em;
  font-weight: 700;
}
.article-body .mark {
  background: linear-gradient(transparent 56%, color-mix(in srgb, var(--accent) 30%, #fff) 0);
  font-weight: 700;
  padding: 0 .08em;
}

/* figures */
.figure { margin: 32px 0; text-align: center; }
.figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.figure figcaption { margin-top: 12px; font-size: .98rem; color: var(--muted); font-weight: 600; line-height: 1.7; }

/* callouts */
.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; background: var(--soft); }
.callout__title { font-weight: 800; margin: 0 0 8px; font-size: 1.12rem; }
.callout p { margin: 0 0 .7rem; }
.callout p:last-child { margin-bottom: 0; }
.callout--point { border-left: 4px solid var(--accent); }
.callout--warn { background: #fde8f1; border-color: #f6cfe0; border-left: 4px solid var(--accent-2); }
.callout--warn .callout__title { color: var(--accent-ink); }
.callout--tip { background: #e3f5f1; border-color: #c8ece4; border-left: 4px solid #0d9488; }
.callout--tip .callout__title { color: #0d7a70; }

/* Q&A */
.faq { display: grid; gap: 14px; margin: 18px 0; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--paper); }
.faq__q { font-weight: 800; margin: 0 0 8px; font-size: 1.1rem; }
.faq__q::before { content: "Q. "; color: var(--accent-ink); }
.faq__a { margin: 0; }
.faq__a::before { content: "A. "; color: var(--accent-ink); font-weight: 800; }

/* author comment */
.author-comment { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--soft); padding: 26px 28px; margin: 34px 0; }
.author-comment h2 { margin-top: 0; }
.author-comment .sign { margin: 14px 0 0; color: var(--muted); font-weight: 700; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- 記事末ナビゲーション（関連記事・前後の記事） ---------- */
.series-nav { margin: 44px 0 0; }
.related-block h2 { font-size: 1.4rem; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.related-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--cat, var(--accent));
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 21, 48, .05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(26, 21, 48, .11); color: var(--ink); }
.related-card__title { font-weight: 700; font-size: 1.05rem; line-height: 1.55; }

.prevnext-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.prevnext {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  transition: border-color .14s ease, background .14s ease;
}
.prevnext:hover { border-color: #d9c7f6; background: var(--accent-soft); color: var(--ink); }
.prevnext.next { text-align: right; }
.prevnext__label { font-size: .95rem; font-weight: 700; color: var(--accent-ink); }
.prevnext__title { font-size: 1.02rem; font-weight: 600; line-height: 1.5; }
.series-back { margin: 26px 0 0; text-align: center; }
.series-back a { font-weight: 700; }

/* ---------- 学習ロードマップ（Educationトップ） ---------- */
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.roadmap-step {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--cat, var(--accent));
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(26, 21, 48, .05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.roadmap-step:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(26, 21, 48, .12); color: var(--ink); }
.roadmap-step__no { font-family: "Inter", sans-serif; font-weight: 800; font-size: .95rem; color: var(--cat, var(--accent-ink)); letter-spacing: .04em; }
.roadmap-step__title { font-size: 1.3rem; font-weight: 800; line-height: 1.4; }
.roadmap-step__desc { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.roadmap-step__count { margin-top: 4px; font-weight: 700; color: var(--cat, var(--accent-ink)); font-size: 1rem; }

/* ---------- 講座シラバス（カテゴリページの第N回リスト） ---------- */
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lesson-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--cat, var(--accent));
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.lesson-item:hover { box-shadow: 0 14px 30px rgba(26, 21, 48, .1); transform: translateY(-2px); }
.lesson-num {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  color: #fff;
  background: var(--cat, var(--accent));
  border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
  white-space: nowrap;
}
.lesson-link { display: grid; gap: 4px; padding: 16px 20px 16px 0; text-decoration: none; color: var(--ink); }
.lesson-title { font-size: 1.14rem; font-weight: 700; line-height: 1.55; }
.lesson-link:hover .lesson-title { color: var(--cat, var(--accent-ink)); }
.lesson-meta { color: var(--muted); font-size: .95rem; }

/* ---------- 図（mobile readability） ---------- */
/* PCでは最大600pxに抑える。スマホ(<=860px)は横100%表示。 */
.figure img { max-width: 600px; margin-left: auto; margin-right: auto; }
@media (max-width: 860px) { .figure img { max-width: 100%; } }

/* ---------- Footer ---------- */
.footer { padding: 52px 0; background: var(--brand-dark); color: #fff; }
.footer a { color: #fff; }
.footer p { font-size: 1.02rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 0; margin: 16px 0; }
.footer-links li { list-style: none; }
.footer-links a { min-height: 40px; display: inline-flex; align-items: center; }
.footer .meta { color: rgba(255, 255, 255, .75); font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .header-inner { display: grid; padding: 12px 0; }
  .nav { justify-content: flex-start; gap: 2px 16px; }
  .grid, .article-grid, .article-shell { grid-template-columns: 1fr; }
  .toc { position: static; }
  .hero-content { padding: 80px 0 72px; }
  h1 { font-size: 2.3rem; }
  .prevnext-nav { grid-template-columns: 1fr; }
  .prevnext.next { text-align: left; }
  .article-body { font-size: 1.12rem; }
  .section { padding: 56px 0; }
  .roadmap { grid-template-columns: 1fr; }
  .lesson-num { padding: 0 14px; font-size: .95rem; }
  .lesson-title { font-size: 1.08rem; }
  .figure { margin: 28px -6px; }
}

/* ---------- 運営者情報テーブル（会社概要・法務ページ） ---------- */
.legal-body h2 { font-size: 1.32rem; margin-top: 2.4rem; }
.legal-body h2:first-child { margin-top: 0; }
.info-table { width: 100%; border-collapse: collapse; margin: 10px 0 24px; }
.info-table th, .info-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 1.02rem; line-height: 1.75; }
.info-table th { width: 34%; color: var(--ink); font-weight: 700; background: var(--soft); }
.info-table td { color: var(--muted); }
.info-table a { font-weight: 600; word-break: break-all; }
@media (max-width: 860px) {
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td { display: block; width: auto; }
  .info-table tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
  .info-table th { background: transparent; padding: 0 0 2px; border-bottom: none; }
  .info-table td { padding: 0 0 4px; }
}

/* ---------- AI導入チェックリスト (checklist.js) ---------- */
.cl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 28px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.cl-progress { flex: 1 1 260px; }
.cl-progress__track { height: 14px; border-radius: 999px; background: #ece8f6; overflow: hidden; }
.cl-progress__fill { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .45s ease; }
.cl-progress__text { margin: 8px 0 0; color: var(--muted); font-weight: 600; }
.cl-progress__count { color: var(--accent-ink); font-size: 1.15rem; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cl-actions .button { min-height: 44px; padding: .5rem 1rem; }

.cl-phase { margin: 0 0 34px; }
.cl-phase__head { border-left: 4px solid var(--accent); padding-left: 14px; margin-bottom: 14px; }
.cl-phase__head h2 { margin: 0; font-size: 1.36rem; }
.cl-phase__note { margin: 4px 0 0; color: var(--muted); font-size: 1rem; }

.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cl-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); transition: background .15s ease, border-color .15s ease; }
.cl-item.is-checked { background: #f5fbf8; border-color: #b8ebd8; }
.cl-item__main { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 320px; cursor: pointer; }
.cl-item__main input { position: absolute; opacity: 0; width: 0; height: 0; }
.cl-box { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 1px; border: 2px solid #c9bfe4; border-radius: 8px; background: #fff; position: relative; transition: all .15s ease; }
.cl-item__main input:checked + .cl-box { background: var(--grad); border-color: transparent; }
.cl-item__main input:checked + .cl-box::after { content: ""; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.cl-item__main input:focus-visible + .cl-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.cl-item__text { font-size: 1.08rem; line-height: 1.6; font-weight: 500; }
.cl-item.is-checked .cl-item__text { color: var(--muted); text-decoration: line-through; text-decoration-color: #bcaee0; }
.cl-item__link { margin-left: auto; white-space: nowrap; font-weight: 700; font-size: .98rem; }

.cl-done { margin: 0 0 28px; padding: 24px; border: 2px solid #0d9488; border-radius: var(--radius); background: #ecfdf5; text-align: center; }
.cl-done h2 { margin: 0 0 8px; }
.cl-done p { color: var(--ink); }

@media (max-width: 860px) {
  .cl-toolbar { flex-direction: column; align-items: stretch; }
  .cl-actions .button { flex: 1; }
  .cl-item__link { margin-left: 38px; }
}

/* 印刷: ナビ・操作系・リンクを隠し、チェックリストだけを紙に */
@media print {
  .site-header, .footer, .cl-actions, .cl-item__link, .cta-box, .cl-done { display: none !important; }
  .page-head { padding: 0 0 12px; border: none; background: none; }
  .section { padding: 12px 0; }
  .cl-toolbar { border: none; background: none; padding: 0; margin-bottom: 12px; }
  .cl-item, .cl-phase { break-inside: avoid; }
  .cl-item { border: none; padding: 4px 0; }
  .cl-box { border: 2px solid #333; }
  a { text-decoration: none; color: #000; }
}
