/* ==========================================================================
   Relens | X企画の仕込み帖
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   欧文表示（ナビ・見出しの英字など）：Inter（Google Fonts）を 200〜300 で細く
   和文：Noto Sans JP（本文 400 / 強調 500 / 見出し 700）
   和文中の英数字：「Relens Latin」= Inter。和文のウェイトに関わらず細く保つため、
     本文域（〜450）は Inter 300、見出し域（451〜）は Inter 500 を当てる
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Relens Latin";
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.0.18/files/inter-latin-300-normal.woff2") format("woff2");
  font-weight: 100 450;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Relens Latin";
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.0.18/files/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 451 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-text: #1a1a1a;
  --c-body: #3d3d3d;
  --c-sub: #8a8a8a;
  --c-line: #dcdcdc;
  --c-line-strong: #1a1a1a;
  --c-bg: #ffffff;
  --c-light: #efefed;
  --c-tint: #fafaf9;
  --c-link: #0b57d0; /* テキストリンク（本文中のリンクなど）。ナビ・カード等の UI には使わない */

  --font-en: "Inter", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Relens Latin", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --fw-thin: 200;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  --gutter: 80px;
  --max: 1840px;
  --header-h: 96px;
}

@media (max-width: 1024px) {
  :root { --gutter: 40px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: var(--fw-regular);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* 見出しは文節で改行（対応ブラウザのみ。非対応でも通常どおり折り返す） */
h1, h2, h3, h4, .card__title, .moment__name { word-break: auto-phrase; text-wrap: pretty; }

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.site-logo { display: block; line-height: 0; transition: opacity .2s; }
.site-logo:hover { opacity: .6; }
.site-logo img { width: auto; height: 32px; }
.global-nav__list {
  display: flex;
  gap: 42px;
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: var(--fw-light);
  letter-spacing: -0.005em;
}
.global-nav__list a { position: relative; transition: opacity .2s; }
.global-nav__list a:hover { opacity: .55; }
.global-nav__list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
}
.menu-toggle { display: none; width: 40px; height: 40px; position: relative; }
.menu-toggle span {
  position: absolute; left: 6px; right: 6px; height: 1px; background: var(--c-text);
  transition: transform .25s, top .25s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 24px; }
.is-menu-open .menu-toggle span:nth-child(1) { top: 20px; transform: rotate(20deg); }
.is-menu-open .menu-toggle span:nth-child(2) { top: 20px; transform: rotate(-20deg); }

@media (max-width: 1024px) {
  .global-nav__list { gap: 24px; font-size: 16px; }
}
@media (max-width: 860px) {
  .site-logo img { height: 24px; }
  .menu-toggle { display: block; }
  .global-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--c-bg);
    padding: 24px var(--gutter);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
  }
  .is-menu-open .global-nav { opacity: 1; visibility: visible; }
  .global-nav__list { flex-direction: column; gap: 0; font-size: 28px; }
  .global-nav__list li { border-bottom: 1px solid var(--c-line); }
  .global-nav__list a { display: block; padding: 16px 0; }
  .global-nav__list a[aria-current="page"]::after { display: none; }
  .is-menu-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Page heading (Top / Articles)  — Takram "Projects" style
   -------------------------------------------------------------------------- */
.page-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
  padding: 176px 0 140px;
}
.page-head__title {
  font-family: var(--font-en);
  font-size: clamp(44px, 5.2vw, 88px);
  font-weight: var(--fw-light);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.page-head__title small {
  display: block;
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--c-sub);
}
.page-head__lead {
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--c-text);
}
@media (max-width: 860px) {
  .page-head { grid-template-columns: 1fr; padding: 72px 0 64px; }
  .page-head__lead { font-size: 15px; line-height: 2; }
}

/* --------------------------------------------------------------------------
   Intro (Top) — 1カラム：タイトル → 英文サブ → 和文リード → リンク
   -------------------------------------------------------------------------- */
.intro { padding: 136px 0 128px; }
.intro__title {
  font-size: clamp(40px, 5.6vw, 92px);
  font-weight: var(--fw-light);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.intro__sub {
  margin-top: 16px;
  font-family: var(--font-en);
  font-size: clamp(18px, 1.75vw, 28px);
  font-weight: var(--fw-light);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.intro__lead {
  margin-top: 44px;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
}
.intro__more {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: var(--fw-light);
  transition: opacity .2s;
  color: var(--c-link);
}
.intro__more:hover { opacity: .55; }
@media (max-width: 860px) {
  .intro { padding: 64px 0 72px; }
  .intro__lead { margin-top: 32px; font-size: 15px; }
  .intro__lead br { display: none; }
}

/* Filter */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 36px;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: var(--fw-light);
  color: var(--c-sub);
}
.filter__item { transition: color .2s; }
.filter__item:hover { color: var(--c-text); }
.filter__item sup { font-size: 0.55em; margin-left: 2px; vertical-align: super; line-height: 0; }
.filter__item.is-active {
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
@media (max-width: 640px) { .filter { font-size: 15px; gap: 6px 16px; } }

/* --------------------------------------------------------------------------
   Section heading (Top)
   -------------------------------------------------------------------------- */
.section { padding-bottom: 140px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  margin-bottom: 40px;
  border-top: 1px solid var(--c-line-strong);
}
.section__title {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: var(--fw-light);
  letter-spacing: -0.02em;
}
.section__title small {
  margin-left: 16px;
  font-size: 12px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.08em;
  color: var(--c-sub);
}
.more-link {
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: var(--fw-light);
  white-space: nowrap;
  transition: opacity .2s;
}
.more-link::after { content: " →"; }
.more-link:hover { opacity: .55; }
@media (max-width: 640px) {
  .section { padding-bottom: 88px; }
  .section__title { font-size: 24px; }
  .section__title small { display: block; margin: 4px 0 0; }
}

/* --------------------------------------------------------------------------
   Article cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 72px 32px;
}
@media (max-width: 1024px) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: 56px 24px; } }
@media (max-width: 640px)  { .card-grid { grid-template-columns: 1fr; gap: 48px; } }

.card { display: block; }
.card[hidden] { display: none; }
.card__thumb { overflow: hidden; }
.card__thumb > * { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { a.card:hover .card__thumb > * { transform: scale(1.03); } }
.card__title {
  margin-top: 22px;
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 1.55;
  letter-spacing: 0.03em;
}
.card__sub {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: var(--c-body);
}
.card__meta {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--c-sub);
}
.card__meta span + span::before { content: "｜"; margin: 0 4px; }
.empty { padding: 80px 0; color: var(--c-sub); font-size: 15px; }

/* --------------------------------------------------------------------------
   Eyecatch（カードのサムネイル / 記事詳細のヒーロー）
   背景は全カテゴリ共通の --c-light。中央にアイコン＋記事タイトル、右上に「Calendar 01月」
   -------------------------------------------------------------------------- */
.visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: max(8px, 1.6cqw);
  aspect-ratio: 1.9 / 1;
  padding: 0 12%;
  background: var(--c-light);
  color: var(--c-text);
  overflow: hidden;
  container-type: inline-size;
}
.visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.visual__icon {
  flex: none;
  width: max(28px, 7.5cqw);
  height: max(28px, 7.5cqw);
}
.visual__icon * {
  vector-effect: non-scaling-stroke;
  stroke-width: max(1px, 0.14cqw);
}
.visual__title {
  font-family: var(--font-ja);
  font-size: max(16px, 5.2cqw);
  font-weight: var(--fw-medium);
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-align: center;
  text-wrap: balance;
  word-break: auto-phrase; /* 和文を文節で改行（対応ブラウザのみ） */
}
.visual__label {
  position: absolute;
  right: 5%;
  top: 9%;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  font-family: var(--font-en);
  font-size: max(12px, 2.2cqw);
  font-weight: var(--fw-light);
  letter-spacing: 0.01em;
  line-height: 1;
}
.visual__label small { font-size: 1em; }

/* --------------------------------------------------------------------------
   Article detail — 記事の枠（全記事共通）
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-top: 24px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--c-body);
}
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--c-line); }
.breadcrumb a:hover { color: var(--c-text); }
.breadcrumb li:last-child a { color: var(--c-sub); }

.article { --toc-w: 300px; --col-gap: 106px; --body-w: 880px; }
.article__inner { max-width: calc(var(--toc-w) + var(--col-gap) + var(--body-w)); }

.article-head { padding: 104px 0 80px; max-width: 920px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--c-sub);
}
.article-meta__cat { color: var(--c-text); }
.article-title {
  margin-top: 24px;
  font-size: clamp(26px, 2.8vw, 44px);
  font-weight: var(--fw-medium);
  line-height: 1.45;
  letter-spacing: 0.03em;
}
.article-subtitle {
  margin-top: 16px;
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.article-summary {
  margin-top: 36px;
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--c-body);
}
.hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 32px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--c-sub);
}

.article-hero { margin-bottom: 120px; }

.article-layout {
  display: grid;
  grid-template-columns: var(--toc-w) minmax(0, var(--body-w));
  gap: var(--col-gap);
  align-items: start;
  padding-bottom: 160px;
}

/* TOC */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border-top: 1px solid var(--c-sub);
  padding-top: 22px;
}
.toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 15px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-align: left;
}
.toc__icon { position: relative; width: 12px; height: 12px; }
.toc__icon::before, .toc__icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor;
  transition: transform .25s;
}
.toc__icon::after { transform: rotate(90deg); }
.toc__head[aria-expanded="true"] .toc__icon::after { transform: rotate(0deg); }
.toc__list { margin-top: 22px; display: grid; gap: 12px; }
.toc__list[hidden] { display: none; }
.toc__list a {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--c-sub);
  transition: color .2s;
}
.toc__list a:hover, .toc__list a.is-current { color: var(--c-text); }

/* --------------------------------------------------------------------------
   Article body — 記事ごとに構成が変わる前提で、素のHTML要素だけで組めるようにしています。
   Markdown を変換したHTMLをそのまま .article-body に入れても整う設計です。

   素の要素（class 不要）：h2（目次に出る）/ h3 / h4 / p / strong / a / ul / ol /
                         table / blockquote / hr / img / figure + figcaption / iframe
   任意の部品：
     .table-wrap  … 横に長い表をスマホで横スクロールさせたいとき table を包む
     .embed       … X などの埋め込み（iframe / blockquote）を包む
     .callout     … 「企画のヒント」などの補足ボックス。先頭に .callout__title
     .points      … 「先に結論」などの要点まとめ（ul に付ける。番号付きのボックスになる）
   -------------------------------------------------------------------------- */
.article-body {
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--c-body);
  overflow-wrap: anywhere;
}
.article-body > * + * { margin-top: 1.5em; }
.article-body strong { color: var(--c-text); font-weight: var(--fw-bold); }
.article-body a { color: var(--c-link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: opacity .2s; }
.article-body a:hover { opacity: .65; }

/* 見出し：罫線を使わず、余白と文字サイズだけで区切る（ウェイトは 500 に統一） */
.article-body h2 {
  margin-top: 160px;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: var(--fw-medium);
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.article-body h3 {
  position: relative;
  margin-top: 88px;
  padding-left: 1.6em;
  font-size: 20px;
  font-weight: var(--fw-medium);
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.article-body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 1em;
  height: 1px;
  background: currentColor;
}
.article-body h4 {
  margin-top: 48px;
  font-size: 17px;
  font-weight: var(--fw-medium);
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.article-body h2 + * { margin-top: 40px; }
.article-body h3 + *, .article-body h4 + * { margin-top: 20px; }
.article-body h2 + h3 { margin-top: 56px; }
.article-body > :first-child { margin-top: 0; }
/* 事例など h4 が連続するまとまりは、前のまとまりと間をあける */
.article-body > :not(h2, h3, h4) + h4 { margin-top: 80px; }
.article-body h3 + h4 { margin-top: 40px; }

.article-body ul, .article-body ol { display: grid; gap: .6em; }
.article-body li { position: relative; }
.article-body ul > li { padding-left: 1.4em; }
.article-body ul > li::before {
  content: ""; position: absolute; left: .2em; top: 1.05em;
  width: .5em; height: 1px; background: var(--c-text);
}
.article-body ol { counter-reset: n; }
.article-body ol > li { padding-left: 2.2em; counter-increment: n; }
.article-body ol > li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: .1em;
  font-family: var(--font-en); font-size: .85em; font-weight: var(--fw-light);
  color: var(--c-sub);
}
.article-body li > ul, .article-body li > ol { margin-top: .6em; }

.article-body blockquote {
  padding-left: 24px;
  border-left: 1px solid var(--c-line-strong);
  color: var(--c-text);
}
.article-body hr { border: 0; border-top: 1px solid var(--c-line); margin: 64px 0; }
.article-body figcaption { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--c-sub); }

/* Table */
.table-wrap { overflow-x: auto; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.article-body th, .article-body td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.article-body thead th {
  white-space: nowrap;
  padding-top: 0;
  font-size: 13px;
  font-weight: var(--fw-regular);
  color: var(--c-sub);
  border-bottom-color: var(--c-sub);
}
.article-body tbody td { color: var(--c-text); }
/* 2列の表（項目｜内容）は1列目を見出し扱いにする */
.article-body tbody th,
.article-body tbody td:first-child:nth-last-child(2) {
  width: 11em;
  font-weight: var(--fw-regular);
  color: var(--c-sub);
}
/* 3列以上の表は1列目を少し強める。4列以上はスマホで横スクロール */
.article-body tbody td:first-child:not(:nth-last-child(-n + 2)) { color: var(--c-text); font-weight: var(--fw-medium); }
.article-body td a { text-decoration-color: color-mix(in srgb, var(--c-link) 35%, transparent); }
.table-wrap table:has(th:nth-child(4)) { min-width: 720px; }

/* Embed (X など)。iframe は .embed で包んでも、包まずに置いてもOK */
.article-body .embed { max-width: 550px; }
.article-body > iframe,
.article-body .embed iframe {
  display: block;
  width: 100%;
  max-width: 550px;
  border: 0;
  transition: height .2s;
}
.article-body .embed .twitter-tweet { margin: 0 !important; }
.article-body > :is(iframe, .embed) + p { margin-top: 24px; }

/* 埋め込み直下の「Xで投稿を見る」リンク */
.article-body > :is(iframe, .embed) + p:has(> a:only-child) {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.article-body > :is(iframe, .embed) + p:has(> a:only-child) a { color: var(--c-link); }
.article-body > :is(iframe, .embed) + p:has(> a:only-child) a::after { content: " ↗"; }
.article-body > :is(iframe, .embed) + p:has(> a:only-child) + p { margin-top: 28px; }

/* チェックリスト（Markdown の - [ ] を変換したもの） */
.article-body li:has(> input[type="checkbox"]) { padding-left: 1.9em; }
.article-body li:has(> input[type="checkbox"])::before { content: none; }
.article-body li > input[type="checkbox"] {
  appearance: none;
  position: absolute;
  left: 0;
  top: .45em;
  width: 1.05em;
  height: 1.05em;
  margin: 0;
  border: 1px solid var(--c-sub);
  background: var(--c-bg);
}
.article-body li > input[type="checkbox"]:checked { background: var(--c-text); border-color: var(--c-text); }

/* Points（「先に結論」などの要点まとめ）。ul に class="points" を付けて使う
   各 li は「<strong>要点の一文</strong> 説明」の形。番号は自動で振られる */
.article-body ul.points {
  counter-reset: point;
  display: block;
  padding: 8px 40px;
  background: var(--c-tint);
}
.article-body ul.points > li {
  position: relative;
  padding: 28px 0 28px 4.2em;
  counter-increment: point;
  font-size: 15px;
  line-height: 2;
}
.article-body ul.points > li + li { border-top: 1px solid var(--c-line); }
.article-body ul.points > li::before {
  content: counter(point, decimal-leading-zero);
  left: 0;
  top: 28px;
  width: auto;
  height: auto;
  background: none;
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: var(--fw-thin);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.article-body ul.points > li > strong:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: var(--fw-medium);
  line-height: 1.7;
  letter-spacing: 0.03em;
}
@media (max-width: 640px) {
  .article-body ul.points { padding: 4px 20px; }
  .article-body ul.points > li { padding: 22px 0 22px 3em; font-size: 14px; }
  .article-body ul.points > li::before { top: 22px; font-size: 22px; }
  .article-body ul.points > li > strong:first-child { font-size: 16px; }
}

/* Callout */
.article-body .callout {
  padding: 24px 28px;
  background: var(--c-tint);
  font-size: 15px;
  line-height: 2;
  color: var(--c-text);
}
.article-body .callout > * + * { margin-top: .6em; }
.article-body .callout__title {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
}

/* Related */
.related { padding: 0 0 160px; }

@media (max-width: 1100px) {
  .article { --toc-w: 240px; --col-gap: 56px; }
}
@media (max-width: 860px) {
  .article-head { padding: 56px 0 48px; }
  .article-summary { font-size: 15px; line-height: 2; }
  .article-hero { margin-bottom: 56px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-bottom: 96px; }
  .toc { position: static; }
  .article-body { font-size: 15px; line-height: 2; }
  .article-body h2 { margin-top: 104px; }
  .article-body h3 { margin-top: 64px; font-size: 18px; }
  .article-body h4 { font-size: 16px; }
  .article-body table { font-size: 14px; }
  .article-body tbody th,
  .article-body tbody td:first-child:nth-last-child(2) { width: 7.5em; }
  .article-body .callout { padding: 20px; font-size: 14px; }
}

/* --------------------------------------------------------------------------
   Moment calendar（moments/index.html）
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 凡例・ドット */
.mlegend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 24px;
  font-size: 12px;
  color: var(--c-sub);
}
/* 凡例の直後の最初の月は、凡例に寄せる */
.mlegend + .timeline > .month:first-child { margin-top: 20px; }
.mlegend li { display: inline-flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c-bg); border: 1px solid var(--c-text); }
.dot--a { background: var(--c-text); }
.dot--b { background: var(--c-sub); border-color: var(--c-sub); }
.dot--c { border-color: var(--c-sub); }

/* タイムライン */
.timeline { padding-bottom: 120px; }
.month {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0 56px;
  margin-top: 96px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.month[hidden] { display: none; }
.month__head {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  padding-top: 20px;
  border-top: 1px solid var(--c-line-strong);
}
.month__title { display: flex; align-items: flex-start; gap: 4px; font-weight: var(--fw-thin); }
.month__num {
  font-family: var(--font-en);
  font-size: 96px;
  line-height: .85;
  letter-spacing: -0.05em;
}
.month__num--text { font-family: var(--font-ja); font-size: 40px; font-weight: var(--fw-light); line-height: 1.2; letter-spacing: 0.02em; }
.month__unit { font-size: 16px; font-weight: var(--fw-light); }
.month__en {
  margin-top: 14px;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: var(--fw-light);
}
.month__now { display: none; margin-left: 10px; padding: 1px 8px; background: var(--c-text); color: var(--c-bg); font-size: 11px; vertical-align: 2px; }
.month.is-now .month__now { display: inline-block; }
.month__count { margin-top: 4px; font-family: var(--font-en); font-size: 12px; font-weight: var(--fw-light); color: var(--c-sub); }

.month__list { position: relative; border-top: 1px solid var(--c-line-strong); }
.month__list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--c-line);
}
.moment {
  position: relative;
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  gap: 4px 24px;
  padding: 26px 0 26px 36px;
  border-bottom: 1px solid var(--c-line);
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: background-color .4s;
}
.moment[hidden] { display: none; }
.moment::before {
  content: "";
  position: absolute;
  left: 0;
  top: 33px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--c-sub);
  background: var(--c-bg);
}
.moment[data-priority="A"]::before { background: var(--c-text); border-color: var(--c-text); }
.moment[data-priority="B"]::before { background: var(--c-sub); }
.moment:target { background: var(--c-tint); }

.moment__date {
  font-family: var(--font-ja);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.moment__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--c-sub);
}
.moment__id { font-family: var(--font-en); font-weight: var(--fw-light); }
.moment__name {
  margin-top: 4px;
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 1.55;
  letter-spacing: 0.03em;
}
.moment__name a { color: var(--c-link); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.moment__name a:hover { opacity: .55; }
.moment__tags { margin-top: 6px; font-size: 13px; letter-spacing: 0.03em; color: var(--c-sub); }
.moment__pattern { margin-top: 8px; font-size: 14px; line-height: 1.85; letter-spacing: 0.03em; color: var(--c-body); }
.moment__note { margin-top: 4px; font-size: 12px; line-height: 1.8; color: var(--c-sub); }
.moment__note::before { content: "※ "; }
.moment__article {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: opacity .2s;
  color: var(--c-link);
}
.moment__article::after { content: " →"; }
.moment__article:hover { opacity: .55; }

@media (max-width: 860px) {
  .month { grid-template-columns: minmax(0, 1fr); margin-top: 72px; }
  .month__head { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-bottom: 12px; }
  .month__num { font-size: 64px; }
  .month__en, .month__count { margin-top: 0; }
  .month__list { border-top: 0; }
  .moment { grid-template-columns: minmax(0, 1fr); padding: 22px 0 22px 28px; }
  .moment::before { top: 29px; }
}

/* 記事詳細 → モーメントカレンダーへのリンク */
.article-moment {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: opacity .2s;
  color: var(--c-link);
}
.article-moment::after { content: " →"; }
.article-moment:hover { opacity: .55; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--c-line); padding: 56px 0 48px; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.site-footer .site-logo img { height: 28px; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--font-en); font-size: 15px; font-weight: var(--fw-light); }
.site-footer__nav a:hover { opacity: .55; }
.site-footer__copy { width: 100%; font-family: var(--font-en); font-size: 12px; font-weight: var(--fw-light); color: var(--c-sub); }

/* ==========================================================================
   Mobile（スマホ向けの調整をここにまとめる）
   ========================================================================== */
@media (max-width: 860px) {
  /* ヘッダーの backdrop-filter があると、固定配置のメニューがヘッダー内に閉じ込められて
     背景が透けてしまうため、スマホでは使わない */
  .site-header { backdrop-filter: none; background: var(--c-bg); }
  .global-nav { overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

  /* タップしやすさ：小さなテキストリンクの押せる範囲を広げる */
  .breadcrumb a { display: inline-block; padding: 10px 0; }
  .breadcrumb { padding-top: 8px; }
  .article-moment,
  .moment__article,
  .intro__more { display: inline-block; padding: 10px 0; }
  .article-moment { margin-top: 10px; }
  .article-body > :is(iframe, .embed) + p:has(> a:only-child) { margin-top: 4px; }
  .article-body > :is(iframe, .embed) + p:has(> a:only-child) a { display: inline-block; padding: 10px 0; }
  .article-body > :is(iframe, .embed) + p:has(> a:only-child) + p { margin-top: 16px; }
  .toc__list { gap: 0; }
  .toc__list a { padding: 8px 0; }
  .toc__head { padding: 6px 0; }
  .filter__item { padding: 6px 0; }
  .site-footer__nav a { display: inline-block; padding: 8px 0; }
  .site-footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  /* 大見出しは1行に収まりやすいサイズに（モーメントカレンダー など） */
  .intro__title { font-size: clamp(28px, 8.4vw, 40px); }

  /* 3列以上の表は、1行ずつ「項目名：値」の縦並びにする（main.js が data-label を付与） */
  .article-body .table-wrap:has(table.is-stackable) { overflow: visible; }
  .article-body .table-wrap table.is-stackable { min-width: 0; }
  .article-body table.is-stackable thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .article-body table.is-stackable,
  .article-body table.is-stackable tbody,
  .article-body table.is-stackable tr,
  .article-body table.is-stackable td { display: block; width: auto; }
  .article-body table.is-stackable { border-top: 1px solid var(--c-sub); }
  .article-body table.is-stackable tr { padding: 18px 0; border-bottom: 1px solid var(--c-line); }
  .article-body table.is-stackable td {
    display: grid;
    grid-template-columns: 7em minmax(0, 1fr);
    gap: 12px;
    padding: 0;
    border: 0;
    font-size: 14px;
    line-height: 1.8;
  }
  .article-body table.is-stackable td + td { margin-top: 4px; }
  .article-body table.is-stackable td::before {
    content: attr(data-label);
    font-size: 12px;
    line-height: 2.1;
    color: var(--c-sub);
  }
  .article-body table.is-stackable td:first-child {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: var(--fw-medium);
    color: var(--c-text);
  }
  .article-body table.is-stackable td:first-child::before { content: none; }

  .mlegend { gap: 4px 16px; font-size: 12px; }

  /* タイムライン：スクロール中も今どの月かわかるよう、月見出しを上に固定 */
  .month { margin-top: 56px; }
  .month__head {
    position: sticky;
    top: var(--header-h);
    z-index: 2;
    background: var(--c-bg);
    padding-top: 12px;
    border-bottom: 1px solid var(--c-line);
  }
  .month__num { font-size: 48px; }
}

