/* 検証ノート（/notes/*.html）共通。LP・FAQ と同じダーク配色に揃える。
   記事 HTML は docs/seo/tools/build-note.mjs が生成する。 */
:root {
  --bg: #090b12;
  --surface: #0f1220;
  --surface-2: #131830;
  --border: #1c2240;
  --text: #e8eaf0;
  --body: #c9cfdb;
  --muted: #94a3b8;
  --accent: #1ec8e8;
  --pending: #f5b946;
  --radius: 10px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", -apple-system, "Hiragino Sans", sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
a {
  color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- ヘッダー・フッター（faq.html と同じ） ---- */
header {
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-logo {
  height: 40px;
  width: auto;
  display: block;
}
.header-cta,
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #07192b;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}
.header-cta:hover,
.cta-btn:hover {
  opacity: 0.88;
}
footer {
  border-top: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
}
footer div a {
  margin: 0 8px;
}
.draft-banner {
  background: var(--pending);
  color: #1a1203;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 8px 16px;
}

/* ---- 記事 ---- */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}
.crumbs {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 36px;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--text);
}
.note .eyebrow,
.notes-index .eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.note h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.note .byline {
  margin: 16px 0 40px;
  font-size: 13px;
  color: var(--muted);
}
.note h2 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
  text-wrap: balance;
  margin: 72px 0 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.note h3 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  margin: 40px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.note p,
.note li {
  font-family: "Noto Sans JP", -apple-system, "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.95;
  color: var(--body);
}
.note p + p {
  margin-top: 1.1em;
}
.note strong {
  color: var(--text);
  font-weight: 700;
}
.note ul,
.note ol {
  margin: 1em 0 1.2em;
  padding-left: 1.5em;
  display: grid;
  gap: 0.5em;
}
.note code {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
}
/* コピーして使うプロンプト（記事 J）。日本語の長い行を折り返し、スマホで横にはみ出さない */
.note pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 1em 0 1.4em;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.note pre code {
  font-family: inherit;
  font-size: 0.92em;
  color: var(--body);
  background: none;
  padding: 0;
  border-radius: 0;
}
.note .lead {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 1.6em;
}
.note .lead + p {
  margin-top: 0;
}

/* 表は記事幅を越えたら表だけを横スクロールさせる */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* 列の多い表は、本文の幅（760px）を越えて最大 1080px まで広げる */
@media (min-width: 900px) {
  .table-wrap.wide {
    width: min(1080px, calc(100vw - 48px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .table-wrap.wide table {
    width: 100%;
  }
  .table-wrap.wide td:not(:first-child),
  .table-wrap.wide th:not(:first-child) {
    min-width: 0;
  }
}
.note table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 14px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.note th,
.note td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--body);
}
.note th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.note tr:last-child td {
  border-bottom: none;
}
/* 列の多い表を横スクロールしても、どの行か分かるよう 1 列目（項目名）を左端に固定する */
.table-wrap.wide th:first-child,
.table-wrap.wide td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}
.table-wrap.wide td:first-child {
  background: var(--bg);
}
/* 列が多い比較表は詰めずに横スクロールさせる（1 列 9em を下限に） */
.note td:not(:first-child),
.note th:not(:first-child) {
  min-width: 9em;
}
.note td:first-child {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
/* 1 列目に長い説明がある表（build-note.mjs が .wrap-first を付ける）は 1 列目も折り返し、横スクロールを出さない */
.table-wrap.wrap-first td:first-child {
  white-space: normal;
  min-width: 7em;
}
/* 同じ表の数値の列は詰めてよい（列ごとの下限 9em をやめ、見出しも折り返す）。スマホでも横に収める */
.table-wrap.wrap-first td:not(:first-child),
.table-wrap.wrap-first th:not(:first-child) {
  min-width: 0;
}
/* 右寄せの列（数値）は 1 行に保つ。説明の列は折り返してよい */
.table-wrap.wrap-first td[align="right"] {
  white-space: nowrap;
}
.table-wrap.wrap-first th {
  white-space: normal;
}

.note .fig {
  margin: 28px 0 32px;
}
.note .fig svg,
.note .fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.note figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.note .cta {
  margin: 28px 0 8px;
}
.note .cta-btn {
  font-size: 15px;
  padding: 12px 22px;
}

/* 出典（補足情報）: 本文より小さく控えめに。URL は折り返して横にはみ出さない */
.note .note-sources {
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.note .note-sources .note-sources-title {
  font-size: 15px;
  margin: 0 0 10px;
  padding-top: 0;
  border-top: none;
  color: var(--muted);
}
.note .note-sources p,
.note .note-sources li {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.note .note-sources ul {
  gap: 0.35em;
  margin-top: 0.6em;
}
.note .note-sources a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.note .note-sources a:hover {
  color: var(--text);
}

/* 下書きプレビューでだけ現れる */
.note .pending {
  border: 1px dashed var(--pending);
  color: var(--pending);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 16px 0;
}

@media (max-width: 600px) {
  header {
    padding: 14px 20px;
  }
  .header-logo {
    height: 32px;
  }
  .header-cta {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
  }
  main {
    padding: 28px 16px 80px;
  }
  .note h1 {
    font-size: 25px;
  }
  .note h2 {
    font-size: 20px;
    margin-top: 56px;
  }
  .note p,
  .note li {
    font-size: 15.5px;
  }
  .note .lead {
    padding: 16px 18px;
  }
  footer {
    padding: 16px 20px;
    flex-direction: column;
  }
}

/* ---- モデルごとの説明（左に小さなキャラクター画像、右に説明。記事 I の「〜としてのくせ」） ---- */
.note .personas {
  display: grid;
  gap: 20px;
  margin: 28px 0 8px;
}
.note .persona {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  align-items: start;
}
.note .persona img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.note .persona .persona-name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
}
.note .persona .persona-name + p {
  margin-top: 2px;
}
@media (max-width: 600px) {
  .note .persona {
    grid-template-columns: 56px 1fr;
    gap: 14px;
  }
  .note .persona img {
    width: 56px;
    height: 56px;
  }
}

/* ---- 検証ノートの一覧（/notes/。docs/seo/tools/build-notes-index.mjs が書き出す） ----
   カードはトップページ（index.html の .note-card）と同じ見た目。トップ側は notes.css を
   読み込まないので、カードの見た目を変えるときは両方を直す */
main.notes-index {
  max-width: 1100px;
}
.notes-index h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.4;
  margin: 8px 0 12px;
}
.notes-index .notes-lead {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 40px;
  max-width: 46em;
}
.notes-group {
  margin: 0 0 56px;
}
.notes-group h2 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  margin: 0 0 6px;
}
.notes-group .notes-group-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 20px;
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.note-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.note-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.note-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.note-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.note-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.note-card-meta {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.note-card h3 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  text-wrap: balance;
  margin: 0;
}
.note-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}
.note-card-more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
@media (max-width: 960px) {
  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
}
