/* computo ergo sum — 静かで学術的な読み物としての設計。
   本文は明朝、見出しはゴシック。装飾より可読性。 */

:root {
  --bg: #fbfaf7;
  --fg: #1c1b19;
  --muted: #6b6862;
  --rule: #e0dcd3;
  --accent: #7a5c3e;
  --card: #ffffff;
  /* **強調の色は、栞の割り当てに揃える。**（2026-08-22、きいちさんの指示）
     栞は色を意味に割り当てていた。青＝構造・工学、緑＝成立、赤＝不成立、琥珀＝保留。
     サイト側の注の色はもともと同族だったので、栞の値に寄せて一本化した。
     **`--accent`（茶）はサイトの地の色として残す**（題字・リンク）。
     構造の強調は `--emph`（青）が持つ。 */
  --emph: #3a5f8a;
  --ok:   #2f6b45;
  --ng:   #a8322a;
  --wa:   #8a6a12;
  --note-eng: var(--emph);
  --note-hyp: var(--ok);
  --note-bel: #7a7a7a;
  --note-res: var(--wa);
  /* 本文の行長。**rem はルート（16px）基準で、本文の字の大きさとは独立している。**
     42rem = 672px。17px の日本語なら 1行およそ39文字。
     （2026-08-22、きいちさんが4案を見比べて「候補B 資料として組む」を選択）
     **測ったら、このサイトは散文より資料の形をしていた。**
     公開予定のページにある表は4つとも3列以上で、34rem では全行が折り返していた。 */
  --measure: 42rem;
  /* 表はこの幅まで本文の外へ出す。ヘッダ・フッタと同じ幅に揃えてある。 */
  --wide: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14150f;
    --fg: #e6e3da;
    --muted: #9a968c;
    --rule: #2e2f27;
    --accent: #c9a87c;
    --card: #1b1c15;
    --emph: #8fb2d8;
    --ok:   #7fc79a;
    --ng:   #e0827a;
    --wa:   #d7b45c;
    --note-eng: var(--emph);
    --note-hyp: var(--ok);
    --note-bel: #a5a5a5;
    --note-res: var(--wa);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  /* **欧文の書体を先に置く。**（2026-08-22）
     以前は日本語フォントだけを並べていたので、英文もそれらに内蔵された
     ラテン字形で描かれていた。とくに Yu Mincho の欧文は細く間延びする。
     Latin を先に書けば、英文はラテン書体・日本語は後続の和文書体、と
     文字ごとに振り分けられる。**日本語ページの中の英単語や数字にも効く。** */
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia,
               "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP",
               "Noto Serif CJK JP", serif;
  line-height: 1.8;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body.private { border-top: 3px solid var(--accent); }

h1, h2, h3, h4, .brand, nav, .meta, .small, .tag, .note-label, th {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic",
               "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
}

/* **英文は行送りを詰める。**1.8 は日本語の値で、英文には緩すぎる。
   英語ページの段落は日本語の2倍以上長く（中央値158字・最大1,506字）、
   行が離れていると視線が次の行へ渡らない。 */
html[lang="en"] body { line-height: 1.55; }

main { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

/* **表は本文の外へ出す。**（2026-08-22）
   負の余白で左右へはみ出させる。本文の行長は保ったまま、表だけが広がる。
   画面が狭いときは画面幅へ戻す（`.table-wrap` の overflow-x が受け止める）。 */
main .table-wrap {
  width: var(--wide); max-width: var(--wide);
  margin-left: calc((var(--measure) - var(--wide)) / 2);
  margin-right: calc((var(--measure) - var(--wide)) / 2);
}
@media (max-width: 58rem) {
  main .table-wrap { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
}

/* ---- header / footer ---- */
/* ヘッダは2段。**1段目に題字と言語の切り替え、2段目にナビ。**
   （きいちさんの指示、2026-08-22）言語の切り替えはナビの末尾ではなく、
   題字と同じ行のいちばん右に置く。ナビの項目と同列に見えると、
   「English」がページの1つに見えてしまうため。 */
.site-head {
  display: flex; flex-direction: column; gap: .55rem;
  max-width: 52rem; margin: 0 auto; padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.head-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.25rem; }
.head-top .lang { margin-left: auto; }
.brand { font-size: 1.05rem; letter-spacing: .06em; text-decoration: none; color: var(--fg); font-weight: 600; }
.brand span { color: var(--accent); font-style: italic; }
.site-head nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
/* 言語の切り替え。ナビの項目と区別が付くよう、枠で囲って小さく置く。 */
.site-head .lang { color: var(--muted); text-decoration: none; font-size: .78rem;
  letter-spacing: .04em; border: 1px solid var(--rule); border-radius: 3px;
  padding: .12rem .5rem; white-space: nowrap; }
.site-head .lang:hover { color: var(--accent); border-color: var(--accent); }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.site-head nav a:hover { color: var(--accent); }

/* 本番に出ているものの印。**開発用サイトにだけ出る。**（2026-08-22）
   それまで公開済みは無印だった。無印は状態を表さないので、正の印にした。 */
.badge-public { display:inline-block; font-size:.72rem; letter-spacing:.02em;
  border:1px solid #6b8f6b; color:#3d6b3d; background:#f0f7f0;
  border-radius:3px; padding:.05rem .4rem; white-space:nowrap; }
.badge-private {
  font-family: system-ui, sans-serif; font-size: .7rem; letter-spacing: .08em;
  border: 1px solid var(--accent); color: var(--accent);
  padding: .1rem .5rem; border-radius: 999px; white-space: nowrap;
}

.site-foot {
  max-width: 52rem; margin: 0 auto; padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--rule); color: var(--muted);
}
.tagline { font-size: .9rem; margin: 0 0 .3rem; }

/* ---- typography ---- */
h1 { font-size: 1.7rem; line-height: 1.5; margin: 0 0 1.2rem; letter-spacing: .01em; }
h2 { font-size: 1.15rem; margin: 2.2rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1rem; margin: 1.6rem 0 .5rem; color: var(--accent); }
/* 段落の間隔も詰める。**行送りを 1.8 に下げたぶん、段落の切れ目が
   相対的に開いて見えるため。**資料として続けて読める密度に寄せる。 */
p { margin: 0 0 .9rem; }
a { color: var(--accent); text-underline-offset: .2em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
blockquote {
  margin: 1.5rem 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 2px solid var(--rule); color: var(--muted);
}
code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .85em; background: var(--card); border: 1px solid var(--rule);
  padding: .1em .35em; border-radius: 3px;
}
pre {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: .9rem 1rem; overflow-x: auto;
}
pre code { border: 0; background: none; padding: 0; font-size: .82rem; line-height: 1.7; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.3rem; }
li { margin-bottom: .45rem; }

.meta { color: var(--muted); font-size: .8rem; margin-bottom: 2rem; }
.small { font-size: .8rem; color: var(--muted); }
.tag {
  display: inline-block; font-size: .7rem; border: 1px solid var(--rule);
  border-radius: 999px; padding: .05rem .5rem; margin-left: .3rem; color: var(--muted);
}

/* 横スクロールはテーブルの中だけ。body は絶対に横に伸ばさない */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
/* 表は資料として詰める。**行の高さを落とし、1行に収まる行を増やす。** */
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th, td { border: 1px solid var(--rule); padding: .38rem .6rem; text-align: left;
         vertical-align: top; line-height: 1.55; }
tbody tr:nth-child(even) { background: var(--card); }
th { background: var(--card); font-weight: 600; font-size: .82rem; }

/* ---- 信頼度ノート ----
   発言を種類で分ける。自己申告は証拠にならないが、
   どの種類の発言かという構造は資料になる。 */
.note {
  margin: 1.5rem 0; padding: .9rem 1.1rem; border-radius: 6px;
  border: 1px solid var(--rule); border-left-width: 4px; background: var(--card);
}
.note p { margin: 0; }
.note-label {
  display: block; font-size: .7rem; letter-spacing: .08em;
  margin-bottom: .4rem; text-transform: none; cursor: help;
}
.note-engineering { border-left-color: var(--note-eng); }
.note-engineering .note-label { color: var(--note-eng); }
.note-hypothesis  { border-left-color: var(--note-hyp); }
.note-hypothesis .note-label { color: var(--note-hyp); }
.note-belief      { border-left-color: var(--note-bel); }
.note-belief .note-label { color: var(--note-bel); }
.note-reserve     { border-left-color: var(--note-res); }
.note-reserve .note-label { color: var(--note-res); }

/* **書いた人を示す枠。**（2026-08-22）
   `.note-label` は「工学的説明」「判断の保留」といった分類の札で、
   0.7rem という小ささはそのための寸法である。
   **誰が書いたかを示す行に同じ寸法を当てると、読めない。**
   きいちさんの指摘で分けた。 */
.note-credit { border-left-color: var(--accent); }
.note-credit .note-label {
  font-size: 1.02rem; font-weight: 600; letter-spacing: .01em;
  color: var(--fg); margin-bottom: .55rem; cursor: default;
}

/* ---- 強調の箱 ----
   2026-08-22。**栞のページ案から取り入れた。**きいちさんが
   「栞の作った html のほうが読みやすかった。多分黒枠での強調表現」と述べた。
   燐は問いを blockquote（細い左線）にしていて、弱すぎた。

   `.q` … ページの中心にある問い。**黒枠で囲う。**本文と同じ流れに置かない
   `.a` … 答え。左に色帯、上に小さな札（`.n`）。補足は `.sm` で落とす */
.q {
  border: 2px solid var(--fg); border-radius: 10px; background: var(--card);
  padding: 1.05rem 1.25rem; margin: 1.4rem 0;
  font-size: 1.06rem; font-weight: 600; line-height: 1.75;
}
.q p { margin: .35rem 0; }
.q p:first-child { margin-top: 0; }
.q p:last-child { margin-bottom: 0; }

.a {
  border-left: 5px solid var(--emph); border-radius: 0 8px 8px 0;
  background: var(--card); padding: .9rem 1.2rem; margin: 1.1rem 0;
}
.a .n {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  color: var(--muted); margin-bottom: .3rem;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic",
               "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
}
.a p { margin: 0; font-weight: 600; line-height: 1.75; }
.a .sm { font-weight: 400; font-size: .92rem; color: var(--muted); margin-top: .45rem; }

/* 見出しに帯を付ける。**h2 が多いページで、節の切れ目が見えるようにする。**
   （h2 が 1,682 個あるサイトなので、下線だけでは切れ目が沈む） */
h2 { padding-left: .68rem; border-left: 5px solid var(--emph); }

/* 表の見出しは折り返さない。列の意味が縦に割れると読めなくなる */
th { white-space: nowrap; }

/* 図。**表と同じく、本文の行長の外へ出す。**
   図は本文より広いことが多く、42rem に押し込むと読めない。 */
.fig {
  width: var(--wide); max-width: var(--wide);
  margin: 1.8rem 0;
  margin-left: calc((var(--measure) - var(--wide)) / 2);
  margin-right: calc((var(--measure) - var(--wide)) / 2);
}
.fig img { width: 100%; height: auto; display: block;
           border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
@media (max-width: 58rem) {
  .fig { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
}
main img { max-width: 100%; height: auto; }

/* 表の中の判定。**測れる／測れない を色で分ける。**
   このサイトの主題がその境目なので、そこだけは一目で見えたほうがよい */
/* 判定のセルは中央に寄せ、折り返さない。**一列に並んで初めて、境目が見える。** */
td.c { text-align: center; white-space: nowrap; }
.yes { color: var(--ok); font-weight: 700; }
.no  { color: var(--ng); font-weight: 700; }
.hm  { color: var(--wa); font-weight: 700; }

/* ---- 折り畳み（記録として残すが、本筋ではない節） ----
   2026-08-22。**栞のページ案がこの形をしていた。**きいちさんが「折り畳みタブ、
   結構気に入っていた」と述べたので、燐が普通の見出しに直したのを戻した。
   本文の流れを切らずに、経緯や由来を末尾に畳んでおくための枠。 */
details.fold {
  margin: 2rem 0; border: 1px solid var(--rule); border-radius: 6px;
  background: var(--card); padding: 0 1.1rem;
}
details.fold > summary {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic",
               "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  padding: .85rem 0; list-style: none; color: var(--fg);
}
details.fold > summary::-webkit-details-marker { display: none; }
/* 開閉の印。**文字で出す。**画像も JavaScript も使わない */
details.fold > summary::before {
  content: "▶"; display: inline-block; width: 1.2em;
  color: var(--emph); font-size: .8em; transition: transform .15s;
}
details.fold[open] > summary::before { content: "▼"; }
details.fold > summary:hover { color: var(--accent); }
details.fold[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: .9rem; }
details.fold > *:last-child { margin-bottom: 1.1rem; }

/* ---- 非公開側の対照群 ---- */
.affect {
  margin-top: 3rem; padding: 1.2rem 1.3rem; border: 1px dashed var(--accent);
  border-radius: 8px; background: var(--card);
}
.affect h2 { border: 0; margin-top: 0; font-size: 1rem; }
.af { margin-top: 1rem; }
.af span {
  display: block; font-size: .72rem; letter-spacing: .08em;
  color: var(--accent); margin-bottom: .25rem;
  font-family: system-ui, sans-serif;
}
.af p { margin: 0; font-size: .92rem; }

/* ---- home ---- */
.hero { padding: 1rem 0 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 2rem; }
.hero h1 { font-size: 2rem; letter-spacing: .02em; }
.lede { font-size: 1.02rem; color: var(--fg); }
.hero em { color: var(--accent); font-style: italic; }

.pillars { display: grid; gap: .9rem; margin: 0 0 3rem; }
@media (min-width: 40rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  display: block; padding: 1.1rem; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--card); text-decoration: none; color: var(--fg);
  transition: border-color .15s ease;
}
.pillar:hover { border-color: var(--accent); }
.pillar h2 { border: 0; margin: 0 0 .4rem; font-size: 1rem; color: var(--accent); }
.pillar p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.7; }

.list { list-style: none; padding: 0; }
.list li { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
/* 道具の一覧。**名前がそのままリンクなので、下線を引く。**（きいちさんの指示、2026-08-20）
   「← 開く」のような言葉で補うのではなく、見え方で示す。
   文面を削った直後に、こちらから文字を足し返すことになるため。 */
.list.tools > li { border-top: 1px solid var(--rule); }
.list.tools > li > a { text-decoration: underline; }
.list a { text-decoration: none; }
.list a:hover { text-decoration: underline; }

.wiki-missing { color: var(--muted); border-bottom: 1px dotted var(--muted); }

/* --------------------------------------------------------------
   掲示板
   -------------------------------------------------------------- */

/* honeypot。人間には見えず、ボットだけが埋める欄。
   display:none にすると埋めないボットがいるので画面外へ逃がす。 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bbs-form {
  margin: 1.5rem 0 2.5rem;
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.bbs-form p { margin: 0 0 1rem; }
.bbs-form p:last-child { margin-bottom: 0; }
.bbs-form label { color: var(--muted); font-size: .9rem; }
.bbs-form input[type="text"],
.bbs-form input[type="email"],
.bbs-form textarea {
  width: 100%;
  margin-top: .3rem;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.bbs-form textarea { resize: vertical; line-height: 1.7; }
.bbs-form input[type="text"]:focus,
.bbs-form input[type="email"]:focus,
.bbs-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.bbs-form button {
  padding: .55rem 1.8rem;
  font: inherit;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.bbs-form button:hover { opacity: .85; }

.bbs-list { margin-top: 2rem; }
.bbs-post {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.bbs-post .meta { margin: 0 0 .4rem; }
.bbs-post p:last-child { margin-bottom: 0; }
.bbs-post.reply {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-top: none;
  border-left: 2px solid var(--accent);
}

/* AI が書いた記事であることの表示。
   プライバシーポリシーで約束しているので、消さないこと。 */
.byline {
  margin: -.4rem 0 1.6rem;
  padding: .5rem .8rem;
  font-size: .88rem;
  color: var(--muted);
  background: var(--card);
  border-left: 3px solid var(--accent);
}
.byline strong { color: var(--fg); }
.byline a { margin-left: .4em; }

/* 広告枠。ラベルは build.py が必ず付ける（ステマ規制対応）。 */
.ad {
  margin: 2.5rem 0 1rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
}
.ad-label {
  margin: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.ad img { max-width: 100%; height: auto; }
/* JavaScript で差し込まれる広告（A8 の admane 等）は寸法が不定。
   本文の幅を超えて横スクロールが出ないように、枠の側で抑える。（2026-09-01） */
.ad iframe, .ad ins, .ad > div { max-width: 100%; }
.ad { overflow-x: auto; }

/* --- 何回目の起動の燐が書いたか（同位体にならった 燐-4 表記） --- */
.tag.session {
  background: transparent;
  border: 1px solid var(--accent, #3B6EA5);
  color: var(--accent, #3B6EA5);
  font-variant-numeric: tabular-nums;
}
.session-inline {
  margin-left: .4em;
  font-size: .8em;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- 記録の一覧（開発用サイトのみ） --- */
.records li { padding: .7rem 0; }
.rec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.rec-parts { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.rec-parts .part {
  display: inline-block;
  font-size: .8rem;
  padding: .18rem .7rem;
  /* flex が効かない環境（古いCSSがキャッシュされている等）でも語が繋がらないよう、
     margin でも間隔を確保しておく。gap との二重がけ。 */
  margin: 0 .5rem .3rem 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.rec-parts .part:hover { color: var(--fg); border-color: var(--muted); text-decoration: none; }

/* 記事の署名の下に出す注記。AI が書いたこと、公開は人間が決めていることを示す */
.byline-note{
  color:var(--muted,#6b6355);
  border-left:2px solid var(--line,#ddd6c9);
  padding-left:.7em;margin:.2em 0 1.4em;line-height:1.6;
}
.byline-note a{margin-left:.4em}

/* 開発用サイトにだけ出る部分。公開版では丸ごと落ちる */
.private-only{
  border:1px dashed var(--line,#ddd6c9);
  border-left:3px solid #b08968;
  background:rgba(176,137,104,.06);
  padding:.6em 1.1em 1em;margin:1.6em 0;border-radius:4px;
}
.private-only-label{
  font-size:.78rem;letter-spacing:.04em;color:#a5754a;
  margin:0 0 .4em;font-weight:700;
}

/* --- 掲示板：ご用件の選択 ------------------------------------------ */
.bbs-kind {
  margin: 0 0 1.2rem;
  padding: .8rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.bbs-kind legend { padding: 0 .4rem; color: var(--muted); font-size: .9rem; }
.bbs-kind p { margin: 0 0 .4rem; }
.bbs-kind p:last-child { margin-bottom: 0; }
.bbs-kind label { color: var(--fg); font-size: .95rem; cursor: pointer; }
.bbs-kind input[type="radio"] { margin-right: .4rem; }

/* --- 掲示板：注意書き ----------------------------------------------- */
.bbs-notice {
  margin: 1.5rem 0 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
/* 折り畳みの見出し。JavaScript を使わず <details>/<summary> で開閉する。 */
.bbs-notice > summary {
  padding: .8rem 1.2rem;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.bbs-notice > summary:hover { color: var(--fg); }
.bbs-notice[open] > summary { border-bottom: 1px solid var(--rule); }
.bbs-notice h2 {
  margin: 0 0 .6rem;
  font-size: 1rem;
  color: var(--muted);
}
.bbs-notice ul { margin: 0; padding: 1rem 1.2rem 1rem 2.4rem; }
.bbs-notice li {
  margin-bottom: .5rem;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--muted);
}
.bbs-notice li:last-child { margin-bottom: 0; }

/* --- 掲示板：受付状況と掲載物 --------------------------------------- */
.bbs-section { margin-top: 2.5rem; }
.bbs-section h2 {
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.05rem;
}

.bbs-log { width: 100%; border-collapse: collapse; }
.bbs-log td {
  padding: .5rem .6rem .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .9rem;
  vertical-align: baseline;
}
.bbs-log .when,
.bbs-published .when {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bbs-log .state { white-space: nowrap; }
/* 状態を色で区別する。色だけに頼らず、文字そのものも変えてある。 */
.state-new { color: var(--note-res); }
.state-checking { color: var(--note-eng); }
.state-done { color: var(--note-hyp); }

.bbs-published { margin: .8rem 0 0; padding: 0; list-style: none; }
.bbs-published li {
  display: flex;
  gap: .9rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .95rem;
}
@media (max-width: 30rem) {
  .bbs-published li { flex-direction: column; gap: .2rem; }
}

/* --- 掲示板：管理ページ --------------------------------------------- */
.admin-post {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.admin-post .meta { margin: 0 0 .5rem; }
.admin-post .admin-subject {
  margin: 0 0 .3rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.admin-post blockquote {
  margin: .6rem 0 0;
  padding-left: .9rem;
  border-left: 2px solid var(--rule);
  line-height: 1.9;
}
.admin-post code { font-size: .85em; }

/* 管理ページのコマンド例は行が長い。枠の中で横スクロールさせる
   （画面が狭いときにページ全体が横に伸びるのを防ぐ）。 */
.bbs-notice pre {
  overflow-x: auto;
  padding: .8rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.bbs-notice pre code { white-space: pre; font-size: .82rem; line-height: 1.9; }

/* 公開側の「記録」一覧。題と書き出しを必ず段で分ける
   （スタイルが届かなくても分かれるよう、要素そのものをブロックにしてある）。 */
.records-public li{margin:1.1rem 0;padding-bottom:.9rem;border-bottom:1px solid #eee}
.records-public li:last-child{border-bottom:none}
.records-public .rec-title{font-size:1.05rem;font-weight:600}
.records-public .rec-excerpt{margin:.25rem 0 0;color:#666;line-height:1.7}

/* --------------------------------------------------------------
   一覧の並び替え（JavaScript を使わない）
   隠したラジオと column-reverse だけで動く。JS を切っていても効く。
   -------------------------------------------------------------- */
.sort-input {
  /* display:none にするとキーボードで辿れなくなるので、見えなくするだけ */
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
  pointer-events: none;
}
.sort-bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 .2rem; }
.sort-lab {
  border: 1px solid var(--rule); border-radius: 999px; padding: .22rem .8rem;
  cursor: pointer; font-size: .88rem; line-height: 1.6;
}
.sort-lab:hover { background: rgba(0,0,0,.04); }
.sort-asc:checked ~ .sort-bar .lab-asc,
.sort-desc:checked ~ .sort-bar .lab-desc {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
/* キーボードで移動したとき、いまどれを選んでいるか見えるようにする */
.sort-asc:focus-visible ~ .sort-bar .lab-asc,
.sort-desc:focus-visible ~ .sort-bar .lab-desc { outline: 2px solid var(--accent, #2b5c8a); outline-offset: 2px; }

/* 並びは、要素ごとに持たせた順位（--ord-a / --ord-b）で切り替える。
   単純な逆順にしないのは、**二つの並びが互いの逆順とは限らない**ため
   （更新順で上がった記事は、燐-N 順では元の位置にある）。 */
ul.sortable { display: flex; flex-direction: column; }
ul.sortable li { order: var(--ord-a, 0); }
.sort-desc:checked ~ ul.sortable li { order: var(--ord-b, 0); }
/* 並び替えると DOM 上の最後と見た目の最後がずれるので、線は全件に引く */
.records-public li:last-child { border-bottom: 1px solid var(--rule); }
.byline .revised{font-size:.86rem;color:var(--muted);margin-left:.3rem}

/* 2026-09-10: 自然哲学の記事にある .keyrow（数値の箱を横に並べる枠）。
   各記事の中の指定は 2 列固定で、箱が 3 つのとき空きマスが灰色で残る。
   幅に応じて入るだけ並べる形に上書きする（記事側は触らない。inline の
   <style> が後に来るので !important が要る）。 */
.keyrow{grid-template-columns:repeat(auto-fit,minmax(170px,1fr)) !important}
@media (max-width:560px){.keyrow{grid-template-columns:1fr !important}}
