/* ==========================================================================
   KOB_BLOG — public site stylesheet
   設計方針（2026-08-19改訂）: 編集メディアとしての信頼感は保ちつつ、
   見出しはMeiryo UI太字ベースの読みやすいサンセリフに変更し、
   カード要素は角丸(10px)と控えめな影で親しみやすさを加える。
   紫系グラデーション・ガラス風カードなど「生成AIのSaaS LP」的な過剰装飾は
   引き続き避ける。既存ロゴの紺(#0F2E5C)/青(#3E7FC9)をアクセントとして使い、
   背景は温かみのあるオフホワイトにする。
   ========================================================================== */

:root {
  --ink: #23262f;
  --ink-soft: #4b4f5a;
  --paper: #faf8f3;
  --paper-raised: #ffffff;
  --line: #e4dfd3;
  --navy: #0f2e5c;
  --blue: #2f6cb0;
  --blue-soft: #eaf1fb;
  --amber: #b8843a;
  /* .pr-tag専用のアクセシブルなamber。--amber(#b8843a)は白背景で約3.28:1しかなく
     WCAG AA(4.5:1)未達のため、.pr-tagのみこちらを使う（--amber自体は他箇所
     への影響を避けるため変更しない）。白背景(#ffffff)で約5.39:1、
     --paper(#faf8f3)で約5.07:1（算出根拠はissue-ledger.md参照）。 */
  --amber-accessible: #8a6329;
  --radius: 10px;
  --max: 720px;
  --max-wide: 1080px;
  --gutter: clamp(32px, 7vw, 56px);
  font-size: 17px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Meiryo UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Meiryo UI", "Yu Gothic UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic Medium",
    "Yu Gothic", sans-serif;
  color: var(--navy);
  line-height: 1.4;
  font-weight: 600;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--navy);
}

img {
  max-width: 100%;
  display: block;
}

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

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* skip link (a11y) ---------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* header ---------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 60px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav .nav-item {
  font-size: 14px;
  color: var(--ink-soft);
}

.site-nav a.nav-item {
  text-decoration: none;
  display: inline-block;
  padding: 6px 2px;
  margin: -6px -2px;
}

.site-nav a.nav-item:hover,
.site-nav a.nav-item:focus-visible {
  color: var(--blue);
}

/* thin decorative rule under header (subtle, not a big hero graphic) --- */
.accent-rule {
  height: 6px;
  background-image: linear-gradient(90deg, var(--navy) 0 8px, transparent 8px);
  background-size: 16px 6px;
  background-repeat: repeat-x;
  opacity: 0.35;
}

/* breadcrumb -------------------------------------------------------------- */
.breadcrumb {
  padding: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li:not(:last-child)::after {
  content: "\203A";
  color: var(--line);
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-block;
  padding: 4px 1px;
  margin: -4px -1px;
}

.breadcrumb a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* hero -------------------------------------------------------------------- */
.hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 160% at 12% -10%, var(--blue-soft) 0%, var(--paper) 58%);
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0 0 14px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  margin: 0 0 20px;
}

.lede {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 60ch;
}

.lede strong {
  color: var(--navy);
  font-weight: 700;
}

.meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

.meta-row div {
  display: flex;
  gap: 6px;
}

.meta-row dt {
  font-weight: 600;
}

.meta-row dd {
  margin: 0;
}

/* author card (筆者紹介) ---------------------------------------------------- */
.author-card {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.author-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.author-avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 46, 92, 0.12);
}

.author-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.author-body {
  min-width: 0;
}

.author-eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--blue);
  font-weight: 700;
  margin: 0 0 6px;
}

.author-name {
  font-size: 18px;
  margin: 0 0 8px;
}

.author-bio {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 58ch;
  margin: 0 0 6px;
}

.author-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  opacity: 0.85;
  margin: 0;
}

@media (max-width: 640px) {
  .author-inner {
    gap: 16px;
  }
  .author-avatar {
    width: 64px;
    height: 64px;
  }
}

/* article body ------------------------------------------------------------ */
.post {
  padding: 48px 0 8px;
}

.post h2 {
  font-size: 24px;
  margin: 56px 0 20px;
  padding-bottom: 12px;
  padding-left: 14px;
  border-bottom: 2px solid var(--blue);
  border-radius: 0 0 3px 3px;
  position: relative;
}

.post h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.post h2:first-child {
  margin-top: 0;
}

.post h3 {
  font-size: 18px;
  color: var(--ink);
  margin: 32px 0 12px;
}

.post p {
  margin: 0 0 20px;
}

.post ul, .post ol {
  margin: 0 0 20px;
  padding-left: 1.3em;
}

.post li {
  margin: 0 0 8px;
}

.post strong {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 比較表のデータセル内では下線を付けない(独立UXレビューの指摘:
   表内は罫線・見出し背景・太字が既に密で、下線が加わると視認性を損なう。
   また出典リンクの下線〈青系〉と紛れやすいため、表セル内は太字+紺色のみで強調する) */
table.status-table strong {
  text-decoration: none;
}

.post p.note {
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* term / callout box (置換: blockquote の意味的誤用を避けるため独自クラス) */
.term-box {
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 24px;
  box-shadow: 0 1px 3px rgba(15, 46, 92, 0.06);
}

.term-box .term-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
}

.term-box p {
  margin: 0 0 10px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.term-box p:last-child {
  margin-bottom: 0;
}

/* status table ------------------------------------------------------------ */
.status-table-wrap {
  position: relative;
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status-table-wrap:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* モバイルは横スクロール前提のため、右端にフェードで
   「まだ続きがある」ことを視覚的に示す（STYLE-P3-01対応、軽減策） */
@media (max-width: 640px) {
  .status-table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to right, rgba(250, 248, 243, 0), var(--paper-raised));
    pointer-events: none;
  }
}

table.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

table.status-table caption {
  text-align: left;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 10px 14px 0;
}

table.status-table th,
table.status-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

table.status-table thead th {
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

/* 比較表の行見出し（1列目の項目名）。<th scope="row">として実装し、
   これまでの<td><strong>と見た目が変わらないよう左寄せ・非中央寄せを明示する。 */
table.status-table tbody th[scope="row"] {
  font-weight: 700;
  text-align: left;
  background: none;
}

table.status-table tbody tr:last-child th,
table.status-table tbody tr:last-child td {
  border-bottom: none;
}

/* planned article list (本文中・非リンク) --------------------------------- */
.planned-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.planned-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 46, 92, 0.05);
}

.planned-list .ttl {
  flex: 1;
  color: var(--ink);
}

.tag-pending {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.tag-live {
  flex-shrink: 0;
  font-size: 11px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.pr-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--amber-accessible);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

/* 「（広告）」は晴眼の読者にも見える必要があるため、.pr-tag内の.sr-onlyのみ視覚的な隠しを解除する */
.pr-tag .sr-only {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}

/* 視覚的に隠すが、スクリーンリーダーには読み上げさせるためのユーティリティ
   （.pr-tag内の「（広告）」等、視覚的には冗長だが読み上げでは必要な補足に使用） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.refs {
  font-size: 14px;
  color: var(--ink-soft);
}

.refs li {
  margin-bottom: 6px;
}

hr.section-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* related articles (あわせて読みたい記事) ----------------------------------- */
.related-articles {
  padding: 40px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.related-articles h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.related-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.related-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 46, 92, 0.05);
}

.related-list a:hover,
.related-list a:focus-visible {
  border-color: var(--blue);
}

.related-cat {
  font-size: 11px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.related-ttl {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.related-more {
  font-size: 14px;
  margin: 0 0 8px;
}

/* lineup (コンテンツラインナップ) ------------------------------------------ */
.lineup {
  padding: 56px 0 64px;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
}

.lineup-head {
  max-width: var(--max);
  margin: 0 auto 32px;
}

.lineup .wrap-wide > .lineup-head {
  margin-left: 0;
}

.lineup h2 {
  font-size: 22px;
  margin: 0 0 10px;
}

.lineup-lede {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
}

.lineup-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.lineup-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(15, 46, 92, 0.05);
}

.lineup-group h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--navy);
}

.lineup-group .group-status {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.lineup-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lineup-group li {
  font-size: 14px;
  color: var(--ink);
  padding-left: 14px;
  position: relative;
}

.lineup-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
}

/* ad banner (ヘッダー直下・末尾の広告枠) --------------------------------- */
.ad-banner {
  text-align: center;
  padding: 18px 0;
}

.ad-banner .ad-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.ad-banner a {
  display: inline-block;
  line-height: 0;
  margin: 6px 10px;
}

.ad-banner img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 46, 92, 0.08);
}

.ad-banner--top {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
}

.ad-banner--bottom {
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
}

/* footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer .foot-brand {
  height: 36px;
  margin-bottom: 14px;
  opacity: 0.85;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 18px;
  font-size: 13px;
}

.footer-links a {
  color: var(--ink-soft);
}

.footer-links a:hover {
  color: var(--blue);
}

.site-footer p {
  margin: 0 0 10px;
  max-width: 62ch;
}

.site-footer .copyright {
  margin-top: 20px;
  color: #8b8f99;
}

/* responsive ------------------------------------------------------------ */
@media (max-width: 640px) {
  :root {
    font-size: 16px;
  }
  .hero {
    padding: 40px 0 32px;
  }
  .post h2 {
    font-size: 20px;
    margin-top: 40px;
  }
  .planned-list li {
    flex-wrap: wrap;
  }
  table.status-table th,
  table.status-table td {
    padding: 12px;
    font-size: 13.5px;
  }
  table.status-table thead th {
    white-space: normal;
  }
  /* 列数が多い比較表（7社以上）向け。横スクロール中も1列目（項目名）を
     視認できるよう固定する。狭い表では横スクロール自体が発生しないため無害。
     td:first-child は現行マークアップでは1列目が常に<th scope="row">のため
     不発（デッドコード）だが、将来<td>実装の表が増えた場合の保険として残す。
     背景色は--paper（本文の背景色、body参照）に合わせている。表自体には
     独自の背景指定がなく周囲のページ背景がそのまま透けるため、不透明を保ちつつ
     ページ背景と同色にすることで、横スクロールが発生しない狭い表でも1列目だけ
     縞模様に見える副作用を避けている（2026-09-02 QA-006対応、--paper-raisedから変更）。 */
  table.status-table th:first-child,
  table.status-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    max-width: 128px;
    background: var(--paper);
  }
  /* 既存ルール table.status-table tbody th[scope="row"] { background: none; }
     と詳細度が同じ（0,2,3）ため、ソース順で後に置くことで固定列の背景色を
     意図通り上書きする（2026-09-02 QA-001修正、公開直前レビューで検出）。 */
  table.status-table tbody th[scope="row"] {
    background: var(--paper);
  }
  table.status-table thead th:first-child {
    z-index: 2;
    background: var(--blue-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}


/* 横に長い比較表(選択式): <div class="table-scroll"> で .status-table-wrap を包んだ表だけに効く。
   画面幅によらず横スクロール前提にし、最左列を固定、右端のフェードはスクロール領域の外に置く。
   フェードは /js/table-scroll.js が「続きがない」ときに .is-end を付けて消す(JSが動かなければ常時表示)。
   2026-10-04 blog-15の公開前UXレビュー(P1-01・P2-01・P2-02)で作った方式を、blog-11で2記事目になったため共通化
   (docs/decisions/2026-10-04-body-js-policy.md)。既存の .status-table-wrap 単独の表には影響しない。 */
.table-scroll {
  position: relative;
  margin: 0 0 20px;
}
.table-scroll > .status-table-wrap {
  margin: 0;
}
.table-scroll > .status-table-wrap::after {
  display: none;
}
.table-scroll::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 28px;
  background: linear-gradient(to right, rgba(250, 248, 243, 0), var(--paper));
  border-radius: 0 var(--radius) var(--radius) 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.table-scroll.is-end::after {
  opacity: 0;
}
.table-scroll table.status-table td {
  min-width: 9em;
}
.table-scroll table.status-table td:last-child {
  min-width: 13em;
}
.table-scroll table.status-table thead th {
  white-space: normal;
  min-width: 6em;
}
.table-scroll table.status-table th:first-child,
.table-scroll table.status-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 7em;
  max-width: 128px;
  background: var(--paper);
  box-shadow: inset -1px 0 0 var(--line);
}
.table-scroll table.status-table thead th:first-child {
  z-index: 2;
  background: var(--blue-soft);
}
